<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/bugs/gh-3825.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-12-09T12:48:03+00:00</updated>
<entry>
<title>Allow pointers to existential values. (#5793)</title>
<updated>2024-12-09T12:48:03+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-12-09T12:48:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=09a9d673322ebf4ca2fcb7d48f13a44e015ea33f'/>
<id>urn:sha1:09a9d673322ebf4ca2fcb7d48f13a44e015ea33f</id>
<content type='text'>
* Fix pointer offset logic and add executable tests.

* Fix.

* Fix test.

* Add existential ptr test.

* Allow pointers to existential values.

* Fix.

* Fix.

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Fix spirv lowering logic around pointer to unsized array. (#5243)</title>
<updated>2024-10-09T14:35:10+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-10-09T14:35:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ac6f04c15995061ebe8e0ddf62ecf7eb979afb65'/>
<id>urn:sha1:ac6f04c15995061ebe8e0ddf62ecf7eb979afb65</id>
<content type='text'>
* Fix spirv lowering logic around pointer to unsized array.

* Fix.

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Fix incorrect SPV stride for unsized array (#3837)</title>
<updated>2024-03-27T20:30:34+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-03-27T20:30:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=56928794d0800824dc91e150cb345b5fec24d930'/>
<id>urn:sha1:56928794d0800824dc91e150cb345b5fec24d930</id>
<content type='text'>
* Fix incorrect SPV stride for unsized array (#3825)

In '-emit-spirv-directly' mode, slang generates the stride 0
for unsized array in `OpDecorate` instructions.

For unsized array, the stride is invalid, but we need to provide
a non-zero value to pass the spirv validator.

* Decorate struct with unsized array field as 'Block'

For the struct having unsized array fields, it has to be decorated
as "Block", otherwise it will fails the spirv-val.

So we add a check at in 'emitGlobalInst' when emitting spirv for
'kIROp_StructType', where if there is unsized array field inside
the struct, emit a decorate instruction for above purpose.

* Update decoration for kIROp_SizeAndAlignmentDecoration

When add a decoration node for kIROp_SizeAndAlignmentDecoration,
we implicitly convert the 64 bit size to 32 bit. In most cases, this
should not be a problem because we won't have that large data type.
However, we use 64-bit -1 to represent the size of unsized-array,
so in that case, the conversion will change the size to 0, which is
incorrect. So change that decoration to use 64-bit size.

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
