<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/diagnostics/vk-bindings.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-04T21:58:54+00:00</updated>
<entry>
<title>Fix warning about push constants, shaderRecordEXT (#6269)</title>
<updated>2025-02-04T21:58:54+00:00</updated>
<author>
<name>cheneym2</name>
<email>acheney@nvidia.com</email>
</author>
<published>2025-02-04T21:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=78a6389aa4b01cfe4f8b4ec34d48b2cbfc092865'/>
<id>urn:sha1:78a6389aa4b01cfe4f8b4ec34d48b2cbfc092865</id>
<content type='text'>
* Fix warning about push constants, shaderRecordEXT

These resources should not warn about missing vk::binding.

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[slangc] generate an error when `-entry` is not specified for targets that require them. (#3679)</title>
<updated>2024-03-05T21:11:17+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-03-05T21:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f2e325758ba4aae40dd15689f3d3c8a090ef2603'/>
<id>urn:sha1:f2e325758ba4aae40dd15689f3d3c8a090ef2603</id>
<content type='text'>
* [slangc] generate an error when `-entry` is not specified for targets that require them.

* Fix.

* Fix.</content>
</entry>
<entry>
<title>Feature/test improvements (#934)</title>
<updated>2019-04-02T13:22:13+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-04-02T13:22:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2896aa39a529a00673a30ef4a9c3ebe76f401fea'/>
<id>urn:sha1:2896aa39a529a00673a30ef4a9c3ebe76f401fea</id>
<content type='text'>
* First pass extract the test information by 'running tests'.

* * Checking renderer availablilty
* Using TestInfo to determine which tests are run and synthesized
* Display if test is synthesized and what render api it's targetting

* * Improved comments
* Removed some dead code

* Display ignored tests.

* TestInfo -&gt; TestRequirements

* * Added DIAGNOSTIC_TEST type - test always runs (ie has no requirements).
* Made diagnostic tests use DIAGNOSTIC_TEST
* TestInfo -&gt; TestRequirements
* TestDetails holds TestRequirements and TestOptions

* Fix debug typo.
</content>
</entry>
<entry>
<title>Hotfix/crash invalid vk binding (#875)</title>
<updated>2019-03-05T22:24:44+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-03-05T22:24:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=dcd9e574782b87d6280f1db8ee9ba6dbb7c96c8b'/>
<id>urn:sha1:dcd9e574782b87d6280f1db8ee9ba6dbb7c96c8b</id>
<content type='text'>
* Add diagnostic for vk::binding failure.

* Add test for vk::binding failure.

* Add the expected output for glsl-layout-define.hlsl

* * Copy over initialize expr if available when validating unchecked
* Fix unloop - because now it always has one parameter (when before it could have none)
* Split vk::binding and layout tests with invalid parameters
* Removed the diagnostic for 2 ints expected
* Added vk::binding that doesn't specify set in vk-bindings.slang

* * Fix typo
* Improve comments.
</content>
</entry>
<entry>
<title>Allow parameter blocks to be explicitly bound to spaces (#736)</title>
<updated>2018-11-30T23:03:31+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-11-30T23:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7f2d2c9a248a9413e236826a4c6473a6fc104714'/>
<id>urn:sha1:7f2d2c9a248a9413e236826a4c6473a6fc104714</id>
<content type='text'>
* Don't look at VK bindings when compiling for D3D and vice versa

The compiler had been looking at all the modifiers on a declaration when piecing together binding information, whether or not those modifiers should apply on the chosen target API. This was working in practice because the "layout resource kinds" used by each API target were disjoint, for the most part.

This change ensures that we don't even look at modifiers that don't apply on the chosen target, and furthermore adds a new warning that applies if the user is compiling a shader with explicit `register` bindings for Vulkan, if there are no corresponding `[[vk::binding(...)]]` attributes (under the assumption that if they want to be explicit in one case, they probably want to be explicit in all cases).

* Allow explicit space/set bindings on parameter blocks

The syntax for the D3D case is to specify a `space` in a `register` modifier, without any other register class:

```hlsl
ParameterBlock&lt;X&gt; myBlock : regsiter(space999);
```

In the Vulkan case, the user must apply the `[[vk::binding(...)]]` attribute and is expected to use a `binding` of zero:

```hlsl
[[vk::binding(0,999)]]
ParameterBlock&lt;X&gt; myBlock;
```

This change includes a reflection test for the new capability (where we also confirm that it produces the expected output when compared with fxc), and a test for the diagnostic messages when the user messes up bindings for Vulkan.

The implementation itself is fairly straightforward, since the compiler already treats registe spaces/sets as a resource that parameters can consume directly.

Note: the test case for explicit parameter block space/set bindings includes some commented out code that lead to a compiler crash. I would like to fix the underlying issue, but it seemed sensible to keep the bug fix out of a change like this that is adding functionality.
</content>
</entry>
</feed>
