KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

Reporting wrong DescriptorType if Sampler/SampledImage share slot

Open
#5,901 0 comments 0 reactions 1 assignee Claimed by @spencer-lunarg View on GitHub
Bug ShaderVal
Dominant language
C++
Stars
1k
Forks
504
Avg merge
11h 35m
Merged PRs (30d)
224

Description

The `NegativePipelineLayout.DescriptorTypeMismatchNonCombinedImageSampler` in https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/5900 shows we report the following two errors on the same shader

> Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-layout-07989 ] ... pCreateInfos[0] has a type mismatch for descriptor slot [Set 0 Binding 1] for shader (VK_SHADER_STAGE_FRAGMENT_BIT), uses type **VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE** but expected (**VK_DESCRIPTOR_TYPE_SAMPLER** or **VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER**).

and

> Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-layout-07989 ] ... pCreateInfos[0] has a type mismatch for descriptor slot [Set 0 Binding 1] for shader (VK_SHADER_STAGE_FRAGMENT_BIT), uses type **VK_DESCRIPTOR_TYPE_SAMPLER** but expected (**VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE** or **VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER**).

We should only be suggesting `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER` as a valid option

----

This can be observed in the difference between [GLSL](https://github.com/SaschaWillems/Vulkan/blob/master/shaders/glsl/conservativeraster/fullscreen.frag) and [HLSL](https://github.com/SaschaWillems/Vulkan/blob/master/shaders/hlsl/conservativeraster/fullscreen.frag) where both use (Set 0, Binding 1)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.