Skip to content

Commit

Permalink
Fix memory corruption properly in test
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Nov 30, 2023
1 parent 01820aa commit 10bdf61
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions util/test/demos/vk/vk_parameter_zoo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ void main()
{10, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 0, VK_SHADER_STAGE_VERTEX_BIT},
}));

vkh::DescriptorSetLayoutCreateInfo refsetlayoutcreateinfo = vkh::DescriptorSetLayoutCreateInfo({
std::vector<VkDescriptorSetLayoutBinding> refsetlayoutbinds = {
{0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_VERTEX_BIT},
{1, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_VERTEX_BIT},
{2, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_VERTEX_BIT},
Expand All @@ -482,10 +482,12 @@ void main()
{7, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_VERTEX_BIT},
{8, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_VERTEX_BIT},
{9, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_VERTEX_BIT},
});
};

VkDescriptorSetLayout refsetlayout = createDescriptorSetLayout(refsetlayoutcreateinfo);
VkDescriptorSetLayout refsetlayout_copy = createDescriptorSetLayout(refsetlayoutcreateinfo);
VkDescriptorSetLayout refsetlayout =
createDescriptorSetLayout(vkh::DescriptorSetLayoutCreateInfo(refsetlayoutbinds));
VkDescriptorSetLayout refsetlayout_copy =
createDescriptorSetLayout(vkh::DescriptorSetLayoutCreateInfo(refsetlayoutbinds));

VkSampler invalidSampler = (VkSampler)0x1234;
VkSampler validSampler = createSampler(vkh::SamplerCreateInfo(VK_FILTER_LINEAR));
Expand Down

0 comments on commit 10bdf61

Please sign in to comment.