<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/docs/user-guide/10-link-time-specialization.md, 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:29:05+00:00</updated>
<entry>
<title>Use loadModuleFromSourceString in specialization example snippet (#8616)</title>
<updated>2025-10-07T00:29:05+00:00</updated>
<author>
<name>aidanfnv</name>
<email>aidanf@nvidia.com</email>
</author>
<published>2025-10-07T00:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9f9d28c1f496132dc71b80252b0eeddfa28cc8bc'/>
<id>urn:sha1:9f9d28c1f496132dc71b80252b0eeddfa28cc8bc</id>
<content type='text'>
Fixes #8221

This modifies the code snippet used to demonstrate link-time
specialization to use the public `loadModuleFromSourceString` API
instead of the internal `UnownedRawBlob::create`.
It also corrects a couple variable names in the snippet as well.</content>
</entry>
<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>Remove ForceUnroll attribute from link-time specialization documentation (#8225)</title>
<updated>2025-09-01T06:51:31+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-09-01T06:51:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b46f46c5e8603fdafca258028227adf25f95807f'/>
<id>urn:sha1:b46f46c5e8603fdafca258028227adf25f95807f</id>
<content type='text'>
The link-time specialization documentation contained an incorrect
example that used `[ForceUnroll]` with a link-time type method call,
which would cause a compilation error. The issue was that
`[ForceUnroll]` requires loop bounds to be known at compile time, but
`sampler.getSampleCount()` is a method call that returns a value at
runtime.

**Problem:**
The documentation example showed:
```csharp
Sampler sampler;
[ForceUnroll]
for (int i = 0; i &lt; sampler.getSampleCount(); i++)
    output[tid] += sampler.sample(i);
```

This would fail with error: `loop does not terminate within the limited
number of iterations, unrolling is aborted.`

**Solution:**
Removed the `[ForceUnroll]` attribute entirely, leaving a simple loop:
```csharp
Sampler sampler;
for (int i = 0; i &lt; sampler.getSampleCount(); i++)
    output[tid] += sampler.sample(i);
```

Since the loop bounds come from a runtime method call, there's no way
for the loop to be unrolled regardless of the directive used, so the
simplest solution is to remove the unroll attribute completely.

- [x] Remove ForceUnroll attribute from documentation example
- [x] Remove explanatory note about unroll vs ForceUnroll
- [x] Remove test cases for the removed functionality
- [x] Fix missing closing backticks in code block

Fixes #8161.

&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: bmillsNV &lt;163073245+bmillsNV@users.noreply.github.com&gt;
Co-authored-by: expipiplus1 &lt;857308+expipiplus1@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix broken links in User Guide (#7938)</title>
<updated>2025-07-27T16:58:31+00:00</updated>
<author>
<name>aidanfnv</name>
<email>aidanf@nvidia.com</email>
</author>
<published>2025-07-27T16:58:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6d399804a353154259cf4410940f144db8f9b5cf'/>
<id>urn:sha1:6d399804a353154259cf4410940f144db8f9b5cf</id>
<content type='text'>
* Fix broken links in User Guide

* Fix link text with filename, use title</content>
</entry>
<entry>
<title>Fix user-guide typos (#6789)</title>
<updated>2025-04-11T22:34:07+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>gtong@nvidia.com</email>
</author>
<published>2025-04-11T22:34:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8e6af6259bd1dd47d81c36f0562ff362ca5d42c3'/>
<id>urn:sha1:8e6af6259bd1dd47d81c36f0562ff362ca5d42c3</id>
<content type='text'>
* Fix user-guide typos

Use LLM to scan each of the markdown files to fix typos.
Try not to change anything but the typos in this CL.

* typo not caught by LLM

* add output of ./build_toc.ps1</content>
</entry>
<entry>
<title>Fix tiny typos (#5944)</title>
<updated>2024-12-28T17:22:00+00:00</updated>
<author>
<name>Yuki Nishidate</name>
<email>30839669+yknishidate@users.noreply.github.com</email>
</author>
<published>2024-12-28T17:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c4429bc33450be32ed82358c3974da58e5ec25ab'/>
<id>urn:sha1:c4429bc33450be32ed82358c3974da58e5ec25ab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>docs: Reduce typo count (#5671)</title>
<updated>2024-11-29T07:02:19+00:00</updated>
<author>
<name>Bruce Mitchener</name>
<email>bruce.mitchener@gmail.com</email>
</author>
<published>2024-11-29T07:02:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c3557978cf0184aaf75c27c309bc87e84fd6ab79'/>
<id>urn:sha1:c3557978cf0184aaf75c27c309bc87e84fd6ab79</id>
<content type='text'>
Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Add documentation for debugging. (#3656)</title>
<updated>2024-03-01T21:39:25+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-03-01T21:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ff48854b1133935ecc2d32fc3bc35631d0a68e17'/>
<id>urn:sha1:ff48854b1133935ecc2d32fc3bc35631d0a68e17</id>
<content type='text'>
* Add documentation for debugging.

* typo</content>
</entry>
<entry>
<title>Add documentation for link-time specialization. (#3638)</title>
<updated>2024-02-27T21:32:43+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-02-27T21:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1e5d0b31d28bdbf0d220c89debe5f9cc6b82a6fa'/>
<id>urn:sha1:1e5d0b31d28bdbf0d220c89debe5f9cc6b82a6fa</id>
<content type='text'>
</content>
</entry>
</feed>
