summaryrefslogtreecommitdiffstats
path: root/tests/bugs/gh-5339.slang
Commit message (Collapse)AuthorAge
* Use Offset instead of ConstOffset for GLSL function textureGatherOffset (#5426)Jay Kwak2024-10-29
* Use Offset instead of ConstOffset for GLSL function textureGatherOffset This commit changes to use `Offset` option on OpImageGather instruction when translating `textureGatherOffset` to SPIR-V code. Interestingly GLSL allows the offset value to be a variable not constant just for the function `textureGatherOffset` while all other offset variants of texture sampling functions require the offset to be a constant value. From a few experiments, I found that the spirv-optimizer changes `Offset` to `ConstOffset` if the offset is a compile-time value. I also found that when the offset value is zero, it changes to `None` with no offset value.