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
Compile the same shader for the SPIR-V by adding the -spirv flag dxc.exe -T ps_6_0 -E PSMain -spirv issue_shader.txt and observe the compiler output:
fatal error: generated SPIR-V is invalid: Expected Sampled Type to be a 32-bit int or float scalar type for Vulkan environment
%type_2d_image = OpTypeImage %bool 2D 2 0 0 1 Unknown
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
Expected result
Validation/compilation succeeds.
Actual result
Validation/compilation fails when targeting either DXIL or SPIR-V
Further technical details
Note: the same happens when using bool2, bool3 or bool4 as the Texture2D template argument. For convenience, here's the link to the original example on shader-playground.
The text was updated successfully, but these errors were encountered:
Title
Using Texture2D<bool*>.Load results in validation errors with both DXIL and SPIR-V backends (not with FXC)
Functional impact
Cannot use bool typed textures. Breaks compatibility with FXC.
Minimal repro steps
dxc.exe -T ps_6_0 -E PSMain issue_shader.txt
:-spirv
flagdxc.exe -T ps_6_0 -E PSMain -spirv issue_shader.txt
and observe the compiler output:Expected result
Validation/compilation succeeds.
Actual result
Validation/compilation fails when targeting either DXIL or SPIR-V
Further technical details
Note: the same happens when using
bool2
,bool3
orbool4
as the Texture2D template argument. For convenience, here's the link to the original example on shader-playground.The text was updated successfully, but these errors were encountered: