<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tools/slang-unit-test, 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>Add check for NVRTC backend in unit test cudaCodeGenBug (#8611)</title>
<updated>2025-10-06T20:55:39+00:00</updated>
<author>
<name>Sami Kiminki (NVIDIA)</name>
<email>235843927+skiminki-nv@users.noreply.github.com</email>
</author>
<published>2025-10-06T20:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f4449d9376f0a5c32274fd812d135f3595159bae'/>
<id>urn:sha1:f4449d9376f0a5c32274fd812d135f3595159bae</id>
<content type='text'>
Test `slang-unit-test-tool/cudaCodeGenBug.internal` requires that the
CUDA toolkit is available. Add a check for the NVRTC backend to avoid a
failure when this is not the case.

Fixes #6636</content>
</entry>
<entry>
<title>Fix crash when compiling specialized generic entrypoint containing a static const decl. (#8392)</title>
<updated>2025-09-10T18:50:30+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-09-10T18:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c5607e9d68e9082ada9441f1949937f6b16d5c7f'/>
<id>urn:sha1:c5607e9d68e9082ada9441f1949937f6b16d5c7f</id>
<content type='text'>
Closes #8184.

We fixed three issues with this regression test:
1. After generating IR for a `SpecializeComponentType`, we should also
strip the frontend
decorations from the IR so there is no HighLevelDeclDecoration that will
go into the backend.
2. When lowering a static const inside a generic function, we should not
give the static const
a linkage, because it won't such constant will not appear in global
scope. Trying to give it a
linkage decoration will lead to the parent generic (for the function) to
have two duplicate
Export/Import decorations with different mangle names, and confuses the
linker.
3. Make sure internal exceptions does not leak through
    `IComponentType::getEntryPointCode`/`getTargetCode`.</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>Add static functions to create blobs from data (#8179)</title>
<updated>2025-08-15T20:16:09+00:00</updated>
<author>
<name>jarcherNV</name>
<email>jarcher@nvidia.com</email>
</author>
<published>2025-08-15T20:16:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=af27de01532904508e6a630c213249e93fdd1c66'/>
<id>urn:sha1:af27de01532904508e6a630c213249e93fdd1c66</id>
<content type='text'>
Add helper functions to create ISlangBlob and load module data from
source.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Allow specializing entrypoints with generic value args or variadic types from API (#8119)</title>
<updated>2025-08-09T16:43:25+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-08-09T16:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=dcdebc1a76a0a6ffbfd6a5805354f8f679c60202'/>
<id>urn:sha1:dcdebc1a76a0a6ffbfd6a5805354f8f679c60202</id>
<content type='text'>
Closes #8110.
Closes #8011.</content>
</entry>
<entry>
<title>Fix FunctionReflection getName() returning null for overloaded functions (#8113)</title>
<updated>2025-08-08T00:34:05+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-08-08T00:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c7c4816146bb9ec055e9a8f8c3f975624f2fdb07'/>
<id>urn:sha1:c7c4816146bb9ec055e9a8f8c3f975624f2fdb07</id>
<content type='text'>
When using Slang reflection API to find functions by name in a type,
`FunctionReflection::getName()` would return `nullptr` for overloaded
functions instead of the expected function name.

The issue occurred in `spReflectionFunction_GetName` when
`findFunctionByNameInType` returned a `SlangReflectionFunction` wrapping
an `OverloadedExpr` (for overloaded functions) instead of a single
`DeclRef&lt;FunctionDeclBase&gt;`. The `convertToFunc()` function would fail
for `OverloadedExpr` objects, causing `getName()` to return `nullptr`.

**Example of the bug:**
```cpp
// This code would fail before the fix
public interface IBase {
    public void step(inout float f);
}

public struct Impl : IBase {
    public void step(inout float f) { f += 1.0f; }
}

// Using reflection API:
auto implType = reflection-&gt;findTypeByName("Impl");
auto stepFunction = reflection-&gt;findFunctionByNameInType(implType, "step");
auto name = stepFunction-&gt;getName(); // Would return nullptr
```

**Fix:**
Modified `spReflectionFunction_GetName` to handle overloaded functions
by falling back to the name of the first overload candidate when
`convertToFunc` fails. This follows the same pattern already used by
`spReflectionFunction_specializeWithArgTypes`.

The fix ensures that:
- Overloaded function containers return the correct function name
- Individual overload candidates also return their names correctly  
- Non-overloaded functions continue to work as before
- No regression in existing functionality

**Testing:**
Added comprehensive test cases covering both the original issue scenario
and explicit function overloading. All existing reflection tests
continue to pass.

Fixes #8047.

&lt;!-- START COPILOT CODING AGENT TIPS --&gt;
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

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;
Co-authored-by: ArielG-NV &lt;159081215+ArielG-NV@users.noreply.github.com&gt;
Co-authored-by: slangbot &lt;ellieh+slangbot@nvidia.com&gt;
Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Add reflection api for overload candidate filtering. (#8066)</title>
<updated>2025-08-06T08:07:41+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-08-06T08:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=68b0125226464cb3c9e9b7f50bfb53cda97723b4'/>
<id>urn:sha1:68b0125226464cb3c9e9b7f50bfb53cda97723b4</id>
<content type='text'>
* Add reflection api for overload candidate filtering.

* Fix API.

* Fix.

* Update build.

* Update test.

* Update formatting.</content>
</entry>
<entry>
<title>disable ray-tracing-pipeline test (#8023)</title>
<updated>2025-08-01T17:02:02+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-08-01T17:02:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=374026df12021ce2f90cbd86d6e7ec6a181f6038'/>
<id>urn:sha1:374026df12021ce2f90cbd86d6e7ec6a181f6038</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix bug in ci test (#8005)</title>
<updated>2025-07-31T20:50:55+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-07-31T20:50:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4a255d211834a5d0218cf1d166180930754b16cd'/>
<id>urn:sha1:4a255d211834a5d0218cf1d166180930754b16cd</id>
<content type='text'>
This commit fixes two problems.
 1. uninitialized file handle for lock-file test
 2. uninitialized static variable for lock-file test

The first bug is more of speculartive rather than actual bug.
The second bug was causing heap corruption when it was retried, because
the counter was not reset to zero on "retry" and it wrote data to an
invalida range in an array.</content>
</entry>
</feed>
