<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/reflection/parameter-block.slang.1.expected, 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-28T01:52:14+00:00</updated>
<entry>
<title>Add inner texture type to reflection json (#6416)</title>
<updated>2025-02-28T01:52:14+00:00</updated>
<author>
<name>Devon</name>
<email>devonrutledge03@gmail.com</email>
</author>
<published>2025-02-28T01:52:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cd20e94af9f384c03e8be69f6c8ce9e97212cc9b'/>
<id>urn:sha1:cd20e94af9f384c03e8be69f6c8ce9e97212cc9b</id>
<content type='text'>
* Add inner texture type to reflection json

* Add expected result of test

* Adjust test expected results

* Fix ci test result

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Fixed stage and result field names in json reflection (#5927)</title>
<updated>2024-12-21T16:14:56+00:00</updated>
<author>
<name>Stan</name>
<email>109335133+stanoddly@users.noreply.github.com</email>
</author>
<published>2024-12-21T16:14:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=76fdeaa477a5d21176facf0296f77e28e2d59477'/>
<id>urn:sha1:76fdeaa477a5d21176facf0296f77e28e2d59477</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Cover a few corner cases in reflection API (#1163)</title>
<updated>2020-01-08T22:45:06+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2020-01-08T22:45:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0a856f458ff9f17d76bc646d008602713c6c66d1'/>
<id>urn:sha1:0a856f458ff9f17d76bc646d008602713c6c66d1</id>
<content type='text'>
This change adds some new entry points to the reflection API to cover corner cases that a majority of applications won't care about.
These are most likely to come up for users who want to make a complete copy of the Slang reflection information into a data format of their own design.

All of the information is stuff that we already computed as part of layout, and just hadn't exposed:

* Alignment information for type layouts. This is only useful for ordinary/uniform data; in all other cases alignment is always one. Even for uniform/ordinary data, it is unlikely that any application would actually make use of it.

* Layout information for the result of an entry point function. This would be useful for applications that need to enumerate the varying outputs (user- or system-defined) of a shader. Having information available for `out` parameters but not the function result was inconsistent.

* The "element type" of a parameter block type (e.g., going from `ParameterBlock&lt;X&gt;` to `X`). This seems to have been an oversight since `ConstantBuffer&lt;X&gt;` appears to have been implemented, and the case for a type *layout* was handled.

* The "container" variable layout for a parameter block or constant buffer. It took a while for us to arrive at the current representation of layout for parameter groups, and most client code continues to use the original API that requires us to generated kludged "do what I mean" data. However, if we don't expose the more useful new representation fully, there is no way for users to take advantage of it!

The reflection test tool has been updated to print the new information where it makes sense, which provides us some level of coverage for the new code.
Unfortunately, this led to some cascading changes:

* First, a bunch of the tests had their output changed since they include new information. That's the easy bit.

* Next, the "container" and "element" var layouts don't actually have names (because there is no actual variable underlying them), which means that the code to emit variable names in the JSON dump needed to be condition.

* Making the `"name"` output conditional messed up a lot of the delicate logic that had been dealing with when to emit commas for the output JSON (JSON uses commas as separators, and doesn't allow trailing commas). I added a bit of new infrastructure to make it simple(-ish) to track when a comma actually needs to be output.</content>
</entry>
<entry>
<title>Use register spaces by default for D3D12 targets (#734)</title>
<updated>2018-11-30T18:42:42+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-11-30T18:42:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e40c106d6f8c4218de5a16450f201c0e395f8167'/>
<id>urn:sha1:e40c106d6f8c4218de5a16450f201c0e395f8167</id>
<content type='text'>
The change here is that the logical that used to be controlled by `-parameter-blocks-use-register-spaces` is now turned on unconditionally, meaning that a `ParameterBlock&lt;X&gt;` will get its own register `space` by default when targetting D3D Shader Model 5.1 and later.

I had originally made this feature optional because I wasn't sure whether Shader Model 5.1 should default to using register spaces or not, because D3D 11 doesn't support spaces at the API level and MSDN documetnation made it sound like SM5.1 was available for D3D11 as well. Subsequent reading has led me to understand that MSDN is wrong on this front, and SM5.1 and later are D3D12-only, so it is always safe to use spaces.

The new logic is now that we automatically use spaces for parameter blocks any time it is possible (SM5.1+ and any Vulkan target), and otherwise fall back to not using spaces (SM5.0 and earlier).

I updated a reflection test case that was covering parameter blocks to confirm the output differs between SM5.0 and 5.1.</content>
</entry>
</feed>
