-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPIR-V] Support EvaluateAttribute* intrinsics #3649
Comments
KhronosGroup/SPIRV-Tools#4220 is the spirv-opt PR. |
We have two use three instructions |
We are also relying on EvaluateAttributeAtSample() HLSL instruction in our code. This is now the only thing we haven't been able to port to Vulkan. Not dramatic, but our tree shadows looked better in D3D11, what is a bit frustrating. Is there any update on that issue ? Thanks a lot ! |
I'm also interested in this. I tried using the SPIR-V intrinsics but not sure how to get the interpolant into the Input storage class. Here is what I tried:
which outputs:
|
The GLSL 450 InterpolateAt* instructions should be treated as a load by dead code elimination. This is part of microsoft/DirectXShaderCompiler#3649.
The GLSL 450 InterpolateAt* instructions should be treated as a load by dead code elimination. This is part of microsoft/DirectXShaderCompiler#3649.
Emits SPIR-V InterpolateAt* instructions from the GLSL.std.450 extended instruction set for EvaluateAttribute*. Relies on the optimizer's copy propagate passes to ensure that these instructions are passed valid pointers in the Input storage class after legalization. Fixes microsoft#3649
Emits SPIR-V InterpolateAt* instructions from the GLSL.std.450 extended instruction set for EvaluateAttribute*. Relies on the optimizer's copy propagate passes to ensure that these instructions are passed valid pointers in the Input storage class after legalization. Fixes microsoft#3649
The GLSL 450 InterpolateAt* instructions should be treated as a load by dead code elimination. This is part of microsoft/DirectXShaderCompiler#3649.
Currently, SPIR-V backend does not support
EvaluateAttribute*
intrinsics.According to the discussion in KhronosGroup/glslang#2584,
OpInterpolate*
needs a pointer operand rather thanOpLoad
. Based on the offline discussion with @greg-lunarg we need a spirv-opt pass to replaceOpLoad
operand ofOpInterpolate*
to the pointer loaded by theOpLoad
.When a spirv-opt pass is prepared, we can simply let DXC emit
OpInterpolate*
forEvaluateAttribute*
. Since it will just follow typical code generation routine, it will useOpLoad
for its operand. We can rely on the spirv-opt pass to make it correct (as a part of the legalization pass).The text was updated successfully, but these errors were encountered: