update renderpassmanager

This commit is contained in:
turanszkij
2018-06-01 15:05:36 +01:00
parent 1fb2f50301
commit b290e50995
5 changed files with 631 additions and 558 deletions
-8
View File
@@ -642,14 +642,6 @@ namespace wiGraphicsTypes
SAFE_INIT(cs);
}
};
struct RenderPassDesc
{
Texture* RTs[8] = {};
Texture* DS = nullptr;
UINT NumRTs = 0;
RenderPassDesc() {}
};
struct IndirectDrawArgsInstanced
{
UINT VertexCountPerInstance;
File diff suppressed because it is too large Load Diff
+11 -5
View File
@@ -72,7 +72,6 @@ namespace wiGraphicsTypes
struct RenderPassManager
{
bool active = false;
bool dirty = true;
VkImageView attachments[9] = {};
@@ -81,11 +80,18 @@ namespace wiGraphicsTypes
uint32_t attachmentLayers = 0;
VkClearValue clearColor[9] = {};
VkPipeline pso = VK_NULL_HANDLE;
VkRenderPass renderPass = VK_NULL_HANDLE;
VkFramebuffer fbo = VK_NULL_HANDLE;
struct RenderPassAndFramebuffer
{
VkRenderPass renderPass = VK_NULL_HANDLE;
VkFramebuffer frameBuffer = VK_NULL_HANDLE;
};
// RTFormats hash <-> renderpass+framebuffer
std::unordered_map<uint32_t, RenderPassAndFramebuffer> renderPassCollection;
uint32_t activeRTHash = 0;
GraphicsPSODesc* pDesc = nullptr;
std::unordered_map<VkPipeline, VkFramebuffer> renderPassFrameBuffers;
VkRenderPass overrideRenderPass = nullptr;
VkFramebuffer overrideFramebuffer = nullptr;
struct ClearRequest
{
-1
View File
@@ -273,7 +273,6 @@ namespace wiGraphicsTypes
{
SAFE_INIT(resource_DX12);
pipeline_Vulkan = WI_NULL_HANDLE;
renderPass_Vulkan = WI_NULL_HANDLE;
}
GraphicsPSO::~GraphicsPSO()
{
-17
View File
@@ -391,7 +391,6 @@ namespace wiGraphicsTypes
friend class GraphicsDevice_Vulkan;
private:
ID3D12PipelineState* resource_DX12;
wiHandle renderPass_Vulkan;
wiHandle pipeline_Vulkan;
GraphicsPSODesc desc;
@@ -418,22 +417,6 @@ namespace wiGraphicsTypes
~ComputePSO();
};
class RenderPass
{
friend class GraphicsDevice_DX11;
friend class GraphicsDevice_DX12;
friend class GraphicsDevice_Vulkan;
private:
RenderPassDesc desc;
public:
const RenderPassDesc& GetDesc() const { return desc; }
RenderPass();
~RenderPass();
};
}
#endif // _GRAPHICSRESOURCE_H_