diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2020-02-10 13:09:37 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-10 13:09:37 -0800 |
| commit | 56771d655d77395e4fe879cc19771d461aa01190 (patch) | |
| tree | 1ea915ae2db4a1e164f2676014c17f8c3c796629 /source/core/slang-text-io.cpp | |
| parent | 60dfb62e638a06ebdcef27138b63033b828ec2ef (diff) | |
Fix output GLSL for primitive ID in a geometry shader (#1214)
We had been translating an `SV_PrimitiveID` input in a shader over to `gl_PrimitiveID` in GLSL.
That translation seemed to work just fine for users, so we thought it was correct.
It turns out that `gl_PrimitiveID` is the correct GLSL for a primitive ID input in every stage *except* a geometry shader.
In a geometry shader, `gl_PrimitiveID` is a primitive ID *output*, and if you want the input case you have to write `gl_PrimitiveIDIn` (note the `In` suffix).
This change sets aside my bewilderment at the above long enough to implement a workaround in the GLSL legalization step.
I also modified our current geometry shader cross compilation test to make use of an input primitive ID.
Diffstat (limited to 'source/core/slang-text-io.cpp')
0 files changed, 0 insertions, 0 deletions
