<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/bugs/gh-5339.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2024-10-29T16:56:07+00:00</updated>
<entry>
<title>Use Offset instead of ConstOffset for GLSL function textureGatherOffset (#5426)</title>
<updated>2024-10-29T16:56:07+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-10-29T16:56:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8b3f9048cb94164a036be4ae144b2108968b65b5'/>
<id>urn:sha1:8b3f9048cb94164a036be4ae144b2108968b65b5</id>
<content type='text'>
* 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.</content>
</entry>
</feed>
