<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-parameter-binding.cpp, 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-10-07T00:21:37+00:00</updated>
<entry>
<title>Use symbol alias instead of wrapper synthesis to implement link-time types. (#8603)</title>
<updated>2025-10-07T00:21:37+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-07T00:21:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6af3381f47e3c22e1657c0e0064fa466e8bde0f6'/>
<id>urn:sha1:6af3381f47e3c22e1657c0e0064fa466e8bde0f6</id>
<content type='text'>
This change achieves link-time type resolution with a different
mechanism.

For `extern struct Foo : IFoo = FooImpl;`,
instead of synthesizing a wrapper type `Foo` that has a `FooImpl inner`
field and dispatches all interface method calls to `inner.method()`,
this PR completely removes this synthesis step, and instead just lower
such `extern`/`export` types as `IRSymbolAlias` instructions that is
just a reference to the type being wrapped.

Then we extend the linker logic to clone the referenced symbol instead
of the SymbolAlias insts itself during linking.

By doing so, we greatly simply the logic need to support link-time
types, and achieves higher robustness by not having to deal with many
AST synthesis scenarios.

Closes #8554.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix pointers and C-like layout in varying parameters (#8425)</title>
<updated>2025-09-10T18:41:07+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-09-10T18:41:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ec42c4a20facbcae441cd172bfd607614e761907'/>
<id>urn:sha1:ec42c4a20facbcae441cd172bfd607614e761907</id>
<content type='text'>
Closes #8409, but ended up being more about fixing another bug. While
the issue itself seems to only be a simple typo fix (see second commit
in this PR), I found out during writing a test that pointers never got
correct locations regardless of layout. Their locations were always
assigned to zero due to lacking a resource usage entry in `TypeLayout`.
They were also missing the `Flat` decoration, so I went ahead and added
that too.

I can split this up into two separate PRs if that's preferred; both
aspects just share a test right now and fix a similar-looking issue in
the resulting SPIR-V.</content>
</entry>
<entry>
<title>Relax restriction on using link-time types for shader parameters. (#8387)</title>
<updated>2025-09-06T05:37:34+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-09-06T05:37:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=bc6b82666fa4deda932c36cea93ee2059e0992b2'/>
<id>urn:sha1:bc6b82666fa4deda932c36cea93ee2059e0992b2</id>
<content type='text'>
This change relaxes a previous restriction on link-time types and
constants, so that we now allow them to be used to define shader
parameters.

Doing so will result in a parameter layout that is incomplete prior to
linking. The PR added a test to call the reflection API on a fully
linked program and ensure that we can report correct binding info.</content>
</entry>
<entry>
<title>Implement SV_VulkanSamplePosition (#8236)</title>
<updated>2025-08-21T00:30:44+00:00</updated>
<author>
<name>davli-nv</name>
<email>davli@nvidia.com</email>
</author>
<published>2025-08-21T00:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=05f0f5603561daed2c134e13bc64649362759968'/>
<id>urn:sha1:05f0f5603561daed2c134e13bc64649362759968</id>
<content type='text'>
-Adds semantic SV_VulkanSamplePosition that emits corresponding
gl_SamplePosition and SpvBuiltinSamplePosition
-Adds gl_SamplePosition property to glsl.meta.slang
-Adds SPIRV and GLSL tests for the semantic and property
-Plan is to later implement SV_SamplePosition that follows HLSL range of
-0.5 to +0.5,
and emits GetRenderTargetSamplePosition(SV_SampleIndex) which needs more
complicated IR manipulation for HLSL and Metal

Fixes #7906

---------

Co-authored-by: ArielG-NV &lt;159081215+ArielG-NV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix compiler crash when enum is used as vertex output data (#7915)</title>
<updated>2025-07-25T05:05:51+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-25T05:05:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=528ca0d0e55df88a9a97ba071ae803a62a34ae5a'/>
<id>urn:sha1:528ca0d0e55df88a9a97ba071ae803a62a34ae5a</id>
<content type='text'>
* Initial plan

* Initial investigation and plan for enum vertex output fix

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix compiler crash when enum is used as vertex output data

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix compiler crash when enum is used as vertex output data

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Address reviewer feedback: use SLANG_ASSERT and improve CHECK directives

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix Conditioanl&lt;T, false&gt; fields with a semantic. (#7855)</title>
<updated>2025-07-22T04:35:44+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-07-22T04:35:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9d47a352960efd71494c7dfa0918debd5b405077'/>
<id>urn:sha1:9d47a352960efd71494c7dfa0918debd5b405077</id>
<content type='text'>
* Fix Conditioanl&lt;T, false&gt; fields with a semantic.

* Add unit test.

* Fix test.</content>
</entry>
<entry>
<title>Fix spurious vk::binding warnings when attribute is present (#7581)</title>
<updated>2025-07-02T17:44:43+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-02T17:44:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cd28357bbeb56427032fd1e56c8b3749bcfeb854'/>
<id>urn:sha1:cd28357bbeb56427032fd1e56c8b3749bcfeb854</id>
<content type='text'>
* Initial plan

* Fix spurious vk::binding warnings when attribute is present

- Modified _maybeDiagnoseMissingVulkanLayoutModifier to check for GLSLBindingAttribute before warning
- Changed function to return bool indicating if warning was actually issued
- Updated call sites to properly track warning state to reduce duplicates
- Tested fix resolves the issue while preserving correct warnings when needed

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Add test case for vk::binding spurious warning fix

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Update test to use filecheck format as requested

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Remove full file path from CHECK directives as requested

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix code formatting with clang-format

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix behavioral regression in vk-bindings test caused by warning flag logic

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Resolve 'extern' types during type layout generation if possible (#6450)</title>
<updated>2025-02-28T21:22:58+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2025-02-28T21:22:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=618b4c7657f539e66f032cd40554798bc0d68f6d'/>
<id>urn:sha1:618b4c7657f539e66f032cd40554798bc0d68f6d</id>
<content type='text'>
* Resolve 'extern' types during type layout generation if possible

Closes https://github.com/shader-slang/slang/issues/5994
Closes https://github.com/shader-slang/slang/issues/6437

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add warning for ignored binding attributes on uniforms (#6373)</title>
<updated>2025-02-18T12:01:52+00:00</updated>
<author>
<name>Mukund Keshava</name>
<email>mkeshava@nvidia.com</email>
</author>
<published>2025-02-18T12:01:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=64dfdbda7185cdc54523e038d2f52a6530bacd1e'/>
<id>urn:sha1:64dfdbda7185cdc54523e038d2f52a6530bacd1e</id>
<content type='text'>
Fixes #4251

When binding attributes (like [[vk::binding]]) are specified on uniforms
that get packed into the default constant buffer, these binding
attributes are effectively ignored since the uniform will always be
placed at descriptor set 0, binding 0. This can be confusing for users
who expect their explicit bindings to take effect.

This change adds a new warning (71) that informs users when their
binding attributes on uniforms will be ignored, and suggests declaring
the uniform inside a constant buffer to preserve the explicit binding.

The warning helps users understand:
1. Why their binding attribute isn't having the expected effect
2. That the uniform is being packed into the default constant buffer
3. How to fix it by using a constant buffer declaration

Added test case in tests/bugs/binding-attribute-ignored.slang to verify
the warning behavior.

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<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>
</feed>
