Issue |
150678
|
Summary |
[HLSL][SPIRV] Invalid SPIRV produced when compiling code using D3DCOLORtoUBYTE4
|
Labels |
new issue
|
Assignees |
|
Reporter |
spall
|
Seeing the following validation error when compiling this code
```
StructuredBuffer<float4> In0 : register(t0);
RWStructuredBuffer<uint4> Out0 : register(u1);
[numthreads(1,1,1)]
void main() {
Out0[0] = D3DCOLORtoUBYTE4(In0[0]);
Out0[1] = D3DCOLORtoUBYTE4(float4(0, 11.11, -50.5, 100));
}
```
https://godbolt.org/z/47WrPdhav
```
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282
# | vkCreateShaderModule(): pCreateInfo->pCode (spirv-val produced an error):
# | Specialization constant operation Bitcast requires Kernel capability
# | %43 = OpSpecConstantOp %uint Bitcast %38
```
This `%42 = OpSpecConstantOp %3 Bitcast %37` requires the Kernel capability, but HLSL does not support Kernel SPIRV.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs