vulkan: Update vulkan.h for revision 89 -- Bug #13743
Generalizing the VkDescriptorSetLayoutChain object.
diff --git a/tests/vkrenderframework.cpp b/tests/vkrenderframework.cpp
index 25d2098..861fd7a 100644
--- a/tests/vkrenderframework.cpp
+++ b/tests/vkrenderframework.cpp
@@ -331,9 +331,9 @@
return m_nextSlot++;
}
-VkDescriptorSetLayoutChain VkDescriptorSetObj::GetLayoutChain() const
+VkPipelineLayout VkDescriptorSetObj::GetPipelineLayout() const
{
- return m_layout_chain.obj();
+ return m_pipeline_layout.obj();
}
VkDescriptorSet VkDescriptorSetObj::GetDescriptorSetHandle() const
@@ -367,10 +367,16 @@
layout.pBinding = &bindings[0];
m_layout.init(*m_device, layout);
-
vector<const vk_testing::DescriptorSetLayout *> layouts;
layouts.push_back(&m_layout);
- m_layout_chain.init(*m_device, layouts);
+
+ // create VkPipelineLayout
+ VkPipelineLayoutCreateInfo pipeline_layout = {};
+ pipeline_layout.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
+ pipeline_layout.descriptorSetCount = layouts.size();
+ pipeline_layout.pSetLayouts = NULL;
+
+ m_pipeline_layout.init(*m_device, pipeline_layout, layouts);
// create VkDescriptorSet
m_set = alloc_sets(*m_device, VK_DESCRIPTOR_SET_USAGE_STATIC, m_layout);
@@ -1084,10 +1090,10 @@
head_ptr = &m_vi_state;
}
- info.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
- info.pNext = head_ptr;
- info.flags = 0;
- info.pSetLayoutChain = descriptorSet.GetLayoutChain();
+ info.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
+ info.pNext = head_ptr;
+ info.flags = 0;
+ info.layout = descriptorSet.GetPipelineLayout();
m_cb_state.attachmentCount = m_colorAttachments.size();
m_cb_state.pAttachments = &m_colorAttachments[0];
diff --git a/tests/vkrenderframework.h b/tests/vkrenderframework.h
index 09c07dc..927c190 100644
--- a/tests/vkrenderframework.h
+++ b/tests/vkrenderframework.h
@@ -353,7 +353,7 @@
void CreateVKDescriptorSet(VkCommandBufferObj *cmdBuffer);
VkDescriptorSet GetDescriptorSetHandle() const;
- VkDescriptorSetLayoutChain GetLayoutChain() const;
+ VkPipelineLayout GetPipelineLayout() const;
VkMemoryRefManager mem_ref_mgr;
@@ -368,7 +368,7 @@
vector<VkUpdateSamplerTextures> m_updateSamplerTextures;
vk_testing::DescriptorSetLayout m_layout;
- vk_testing::DescriptorSetLayoutChain m_layout_chain;
+ vk_testing::PipelineLayout m_pipeline_layout;
vk_testing::DescriptorSet *m_set;
};
diff --git a/tests/vktestbinding.cpp b/tests/vktestbinding.cpp
index c41761b..abfaca4 100644
--- a/tests/vktestbinding.cpp
+++ b/tests/vktestbinding.cpp
@@ -820,12 +820,13 @@
alloc_memory(dev);
}
-void DescriptorSetLayoutChain::init(const Device &dev, const std::vector<const DescriptorSetLayout *> &layouts)
+void PipelineLayout::init(const Device &dev, VkPipelineLayoutCreateInfo &info, const std::vector<const DescriptorSetLayout *> &layouts)
{
DEV_INIT(dev);
const std::vector<VkDescriptorSetLayout> layout_objs = make_objects<VkDescriptorSetLayout>(layouts);
+ info.pSetLayouts = &layout_objs[0];
- DERIVED_OBJECT_INIT(vkCreateDescriptorSetLayoutChain, dev.obj(), layout_objs.size(), &layout_objs[0]);
+ DERIVED_OBJECT_INIT(vkCreatePipelineLayout, dev.obj(), &info);
alloc_memory(dev);
}
diff --git a/tests/vktestbinding.h b/tests/vktestbinding.h
index a8eb41b..9a9149d 100644
--- a/tests/vktestbinding.h
+++ b/tests/vktestbinding.h
@@ -54,7 +54,7 @@
class PipelineDelta;
class Sampler;
class DescriptorSetLayout;
-class DescriptorSetLayoutChain;
+class PipelineLayout;
class DescriptorSetPool;
class DescriptorSet;
class DynamicVpStateObject;
@@ -507,10 +507,10 @@
void init(const Device &dev, const VkDescriptorSetLayoutCreateInfo &info);
};
-class DescriptorSetLayoutChain : public DerivedObject<VkDescriptorSetLayoutChain, Object> {
+class PipelineLayout : public DerivedObject<VkPipelineLayout, Object> {
public:
- // vkCreateDescriptorSetLayoutChain()
- void init(const Device &dev, const std::vector<const DescriptorSetLayout *> &layouts);
+ // vCreatePipelineLayout()
+ void init(const Device &dev, VkPipelineLayoutCreateInfo &info, const std::vector<const DescriptorSetLayout *> &layouts);
};
class DescriptorPool : public DerivedObject<VkDescriptorPool, Object> {