Skip to content

Commit

Permalink
Creating test case that fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Honeybunch committed Nov 26, 2024
1 parent 7b767c9 commit 98d8a7f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions util/test/demos/vk/vk_shader_debug_zoo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ layout(set = 0, binding = 31) uniform sampler2DMSArray queryTestMS;
layout(set = 0, binding = 32) uniform texture2D depthImage;
layout(set = 0, binding = 33) uniform uimageBuffer texBufferUint;
layout(set = 0, binding = 34, rgba8ui) uniform coherent uimageBuffer storeTexBufferUint;
#if TEST_DESC_INDEXING
layout(set = 1, binding = 1) uniform sampler pointSamplers[14];
Expand Down Expand Up @@ -1576,6 +1578,17 @@ void main()
Color += vec4(1.0, 1.0, 1.0, 1.0);
break;
}
case 177:
{
Color = vec4(imageLoad(texBufferUint, int(zeroi+2)).x, 1, 0, 1);
break;
}
case 178:
{
imageStore(storeTexBufferUint, int(zeroi+2), vec4(3.1f, 4.1f, 5.9f, 2.6f));
Color = imageLoad(storeTexBufferUint, int(zeroi+2));
break;
}
default: break;
}
}
Expand Down Expand Up @@ -4118,6 +4131,8 @@ OpMemberDecorate %cbuffer_struct 17 Offset 216 ; double doublePackSource
{30, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT},
{31, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT},
{32, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT},
{33, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT},
{34, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT},
}));

std::vector<VkDescriptorSetLayout> setLayouts = {setlayout0};
Expand Down Expand Up @@ -4643,6 +4658,11 @@ OpMemberDecorate %cbuffer_struct 17 Offset 216 ; double doublePackSource
VkBufferView store_bufview = createBufferView(
vkh::BufferViewCreateInfo(store_texbuffer.buffer, VK_FORMAT_R32G32B32A32_SFLOAT));

VkBufferView bufview_uint =
createBufferView(vkh::BufferViewCreateInfo(texbuffer.buffer, VK_FORMAT_R8G8B8A8_UINT));
VkBufferView store_bufview_uint =
createBufferView(vkh::BufferViewCreateInfo(store_texbuffer.buffer, VK_FORMAT_R8G8B8A8_UINT));

setName(pointsampler, "pointsampler");
setName(linearsampler, "linearsampler");
setName(mipsampler, "mipsampler");
Expand Down Expand Up @@ -4717,6 +4737,10 @@ OpMemberDecorate %cbuffer_struct 17 Offset 216 ; double doublePackSource
vkh::WriteDescriptorSet(
descset0, 32, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
{vkh::DescriptorImageInfo(shadowview, VK_IMAGE_LAYOUT_GENERAL, VK_NULL_HANDLE)}),
vkh::WriteDescriptorSet(descset0, 33, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER,
{bufview_uint}),
vkh::WriteDescriptorSet(descset0, 34, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,
{store_bufview_uint}),
});

if(descIndexing)
Expand Down

0 comments on commit 98d8a7f

Please sign in to comment.