Closed ArielG-NV closed 3 months ago
Also make sure you are testing that the keyword Flat is present in the emitted Spirv-asm
I added to the test, this is a good suggestion (it is a VK validation error to not have Flat
)
But I think the variable needs to be marked as Flat. I don't see anywhere in your change to make it Flat.
We do not need to add Flat
ourselves to any fragment Input
variables since the parameter being transformed is a uint
.
This means to avoid validation errors Flat
must be added anyways, and Slang implements this behavior for us.
This is behavior which Slang implements is used in more than 1 instance, so it is likely correct to be using this behavior.
fixes: #3087
Problem:
SV_InstanceID
equivalent as a builtin,SV_InstanceID
must be passed as a regularFlat
Input
from vertex shader.Solution: Slang needs to treat these SV objects as non built-in's. As a result:
Note: we do not need to add
Flat
ourselves to any fragmentInput
variables since the parameter being transformed is auint
. This means to avoid validation errorsFlat
must be added anyways, and Slang implements this behavior for us.