Vulkan: Differentiate between descriptor set layouts and bind points

This also moves the pipeline and descriptor set layouts used for texture
conversion (texel buffers) to ObjectCache, and shares a binding location
with the SSBO set.
This commit is contained in:
Stenzek
2016-11-13 15:38:32 +10:00
parent d1c89db8c8
commit cd3481fbc7
8 changed files with 106 additions and 109 deletions

View File

@ -70,17 +70,23 @@ public:
// - Same as standard, plus a single SSBO accessible from PS
// - Push Constant
// - Same as standard, plus 128 bytes of push constants, accessible from all stages.
// - Texture Conversion
// - Same as push constant, plus a single texel buffer accessible from PS.
//
// All three pipeline layouts use the same descriptor set layouts, but the final descriptor set
// (SSBO) is only required when using the BBox Enabled pipeline layout.
//
VkDescriptorSetLayout GetDescriptorSetLayout(DESCRIPTOR_SET set) const
VkDescriptorSetLayout GetDescriptorSetLayout(DESCRIPTOR_SET_LAYOUT set) const
{
return m_descriptor_set_layouts[set];
}
VkPipelineLayout GetStandardPipelineLayout() const { return m_standard_pipeline_layout; }
VkPipelineLayout GetBBoxPipelineLayout() const { return m_bbox_pipeline_layout; }
VkPipelineLayout GetPushConstantPipelineLayout() const { return m_push_constant_pipeline_layout; }
VkPipelineLayout GetTextureConversionPipelineLayout() const
{
return m_texture_conversion_pipeline_layout;
}
// Shared utility shader resources
VertexFormat* GetUtilityShaderVertexFormat() const
{
@ -157,11 +163,12 @@ private:
void DestroySharedShaders();
void DestroySamplers();
std::array<VkDescriptorSetLayout, NUM_DESCRIPTOR_SETS> m_descriptor_set_layouts = {};
std::array<VkDescriptorSetLayout, NUM_DESCRIPTOR_SET_LAYOUTS> m_descriptor_set_layouts = {};
VkPipelineLayout m_standard_pipeline_layout = VK_NULL_HANDLE;
VkPipelineLayout m_bbox_pipeline_layout = VK_NULL_HANDLE;
VkPipelineLayout m_push_constant_pipeline_layout = VK_NULL_HANDLE;
VkPipelineLayout m_texture_conversion_pipeline_layout = VK_NULL_HANDLE;
std::unique_ptr<VertexFormat> m_utility_shader_vertex_format;
std::unique_ptr<StreamBuffer> m_utility_shader_vertex_buffer;