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
Description
In task shaders, the OpEmitMeshTasksEXT will never have a payload attached even when it should. This is possibly leftover from the NV extension where the payload was implicit and not a parameter to the emit instruction.
The checks there are not complete (I'm not sure if they're intended to be a partial match or not) but the OpEmitMeshTasksEXT produced does not reference the payload when it should. This is not completely invalid but it doesn't match the HLSL which is outputting a payload.
Theory
The code in SpirvEmitter::processDispatchMesh seems to do most of the work of declaring the payload but doesn't associate it with the emit, instead always passing NULL. This patch fixes it for me though I don't know if it's complete:
Description
In task shaders, the
OpEmitMeshTasksEXT
will never have a payload attached even when it should. This is possibly leftover from the NV extension where the payload was implicit and not a parameter to the emit instruction.Steps to Reproduce
You can compile the test shader from this repository ./tools/clang/test/CodeGenSPIRV/meshshading.ext.amplification.hlsl to see the problem.
The checks there are not complete (I'm not sure if they're intended to be a partial match or not) but the OpEmitMeshTasksEXT produced does not reference the payload when it should. This is not completely invalid but it doesn't match the HLSL which is outputting a payload.
On godbolt here is a shorter example: https://godbolt.org/z/6ajvse7jW
Actual Behavior
OpEmitMeshTasksEXT
is always produced without a payload regardless of whether the HLSL shader used one or not.Environment
dxcompiler.dll: 1.8 - 1.8.2407.7 (416fab6b5); dxil.dll: 1.8(101.8.2407.12)
&libdxcompiler.so: 1.8(dev;1-e4636f06); libdxil.so: 1.8
Theory
The code in
SpirvEmitter::processDispatchMesh
seems to do most of the work of declaring the payload but doesn't associate it with the emit, instead always passing NULL. This patch fixes it for me though I don't know if it's complete:The text was updated successfully, but these errors were encountered: