Loop inside shader causes duplication of nointerpolation keyword in generated HLSL code #4922
Labels
goal:client support
Feature or fix needed for a current slang user.
kind:bug
something doesn't work like it should
Milestone
Consider the following shader:
Let's compile it to HLSL:
$ slangc -entry main -profile sm_5_0 -o shader.hlsl shader.slang
And look at the generated code:
The
nointerpolation
keyword is repeated five times in the generated code. FXC will reject the shader with the error message "duplicate usages specified". Removing the loop from the shader fixes the problem:Tested with Slang 2024.10. It does not appear to matter what is inside the body of the loop; there just being a loop anywhere causes
nointerpolation
keywords to be repeated.The text was updated successfully, but these errors were encountered: