28 static void DeInitialize();
36 vk::PushConstantRange m_pushConstants;
41 PL_DECLARE_POD_TYPE();
42 vk::RenderPass m_renderPass;
43 vk::PipelineLayout m_layout;
46 plUInt8 m_uiAttachmentCount = 0;
52 plUInt32 m_VertexBufferStrides[PL_GAL_MAX_VERTEX_BUFFER_COUNT] = {};
57 PL_DECLARE_POD_TYPE();
58 vk::PipelineLayout m_layout;
68 mutable plUInt32 m_uiHash = 0;
74 static void ResourceDeleted(
const plRefCounted* pResource);
81 vk::RenderPass m_renderPass;
86 struct FramebufferDesc
88 VkRenderPass renderPass;
98 PL_DECLARE_POD_TYPE();
99 vk::Format format = vk::Format::eUndefined;
100 vk::SampleCountFlagBits samples = vk::SampleCountFlagBits::e1;
102 vk::ImageUsageFlags usage = vk::ImageUsageFlagBits::eSampled;
104 vk::ImageLayout initialLayout = vk::ImageLayout::eUndefined;
106 vk::AttachmentLoadOp loadOp = vk::AttachmentLoadOp::eClear;
107 vk::AttachmentStoreOp storeOp = vk::AttachmentStoreOp::eStore;
108 vk::AttachmentLoadOp stencilLoadOp = vk::AttachmentLoadOp::eClear;
109 vk::AttachmentStoreOp stencilStoreOp = vk::AttachmentStoreOp::eStore;
113 struct RenderPassDesc
118 struct ResourceCacheHash
120 static plUInt32 Hash(
const RenderPassDesc& renderingSetup);
121 static bool Equal(
const RenderPassDesc& a,
const RenderPassDesc& b);
126 static plUInt32 Hash(
const FramebufferKey& renderTargetSetup);
127 static bool Equal(
const FramebufferKey& a,
const FramebufferKey& b);
129 static plUInt32 Hash(
const PipelineLayoutDesc& desc);
130 static bool Equal(
const PipelineLayoutDesc& a,
const PipelineLayoutDesc& b);
132 static bool Less(
const GraphicsPipelineDesc& a,
const GraphicsPipelineDesc& b);
133 static plUInt32 Hash(
const GraphicsPipelineDesc& desc);
134 static bool Equal(
const GraphicsPipelineDesc& a,
const GraphicsPipelineDesc& b);
136 static bool Less(
const ComputePipelineDesc& a,
const ComputePipelineDesc& b);
137 static bool Equal(
const ComputePipelineDesc& a,
const ComputePipelineDesc& b);
143 struct FrameBufferCache
145 vk::Framebuffer m_frameBuffer;
148 plUInt32 m_layers = 0;
149 PL_DECLARE_POD_TYPE();
152 static vk::RenderPass RequestRenderPassInternal(
const RenderPassDesc& desc);
153 static void GetRenderPassDesc(
const plGALRenderingSetup& renderingSetup, RenderPassDesc& out_desc);
154 static void GetFrameBufferDesc(vk::RenderPass renderPass,
const plGALRenderTargetSetup& renderTargetSetup, FramebufferDesc& out_desc);
163 static vk::Device s_device;
171 static GraphicsPipelineMap s_graphicsPipelines;
172 static ComputePipelineMap s_computePipelines;