<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/spirv/tess-factor-legalize-array-size.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>2025-02-25T00:23:15+00:00</updated>
<entry>
<title>Legalize array size of SV_TessFactor and SV_InsideTessFactor (#6409)</title>
<updated>2025-02-25T00:23:15+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-02-25T00:23:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=73a8d74bdf2849ce3290d8bf8aaf7e1c59f7bc5b'/>
<id>urn:sha1:73a8d74bdf2849ce3290d8bf8aaf7e1c59f7bc5b</id>
<content type='text'>
* Legalize array size of SV_TessFactor and SV_InsideTessFactor

When targeting SPIR-V or GLSL, the type for SV_TessFactor must be
float[4]; note that it is not a vector but an array.
Similarly the type of SV_InsideTessFactor has to be an array of
float[2].

When the user shader declare them as arrays smaller than the required
size, Slang will legalize them to the required sizes.

Note that it is not the user mistake to declare floar[3] when the hull
mode is in "tri", as an example. The unused components are expected to
be ignored.

Note also that HLSL allows the type to be float[2|3|4] whereas GLSL and
SPIR-V requires it to be always float[4].

* Change from "quad" domain mode to "tri"

* Handle error case

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
