You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which shader C compiles. Note the directive [[vk::combinedImageSampler]]. In my current code base I am getting this validation error:
"Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-layout-00756 ] Object 0: handle = 0x55fe20a67de0, name = Logical device from NVIDIA GeForce GTX 1070, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x45717876 | Shader uses descriptor slot 0.1 (expected `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE`) but not declared in pipeline layout The Vulkan spec states: layout must be consistent with all shaders specified in pStages (https://vulkan.lunarg.com/doc/view/1.3.211.0/linux/1.3-extensions/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-00756)"', crates/vulkan_bindings/src/hardware_interface.rs:914:5
After some debugging I realised that spirv-cross considers there are only separate shaders and samplers in the spirv code I am feeding it, i.e. sampeld_images is empty but separate_images has one entry.
So either shaderc has a bug and it is not recognising the directive (which is valid as per the microsoft documentation) or spirv-cross is making a mistake when parsing.
It seems the compiled shader does expect a combined image sampler, that makes me think it might be a mistake on spirv-cross's end. WHen I remove the directive I get a different error so it very much seems shaderc is correctly using the directive when making the shader?
The text was updated successfully, but these errors were encountered:
Do you have the SPIR-V? DXC (which I think shaderc has to build on?) complains with
/tmp/test.hlsl:1:3: error: 'combinedImageSampler' attribute only applies to Textures (e.g., Texture2D) and SamplerState
[[vk::combinedImageSampler]][[vk::binding(1)]]
^
I am not sure if the issue is with spirv cross or shaderc but I am leaning towards spirv-cross.
I have this HLSL shader:
Which shader C compiles. Note the directive
[[vk::combinedImageSampler]]
. In my current code base I am getting this validation error:After some debugging I realised that spirv-cross considers there are only separate shaders and samplers in the spirv code I am feeding it, i.e.
sampeld_images
is empty butseparate_images
has one entry.So either shaderc has a bug and it is not recognising the directive (which is valid as per the microsoft documentation) or spirv-cross is making a mistake when parsing.
It seems the compiled shader does expect a combined image sampler, that makes me think it might be a mistake on spirv-cross's end. WHen I remove the directive I get a different error so it very much seems shaderc is correctly using the directive when making the shader?
The text was updated successfully, but these errors were encountered: