<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tools/slang-test/test-context.h, 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-09-22T22:46:42+00:00</updated>
<entry>
<title>Add RHI Device Caching and Test Prefix Exclusion (#8448)</title>
<updated>2025-09-22T22:46:42+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>tonggangzheng@gmail.com</email>
</author>
<published>2025-09-22T22:46:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ba8132345cbae5b749b4a01deda732ad6f8251a0'/>
<id>urn:sha1:ba8132345cbae5b749b4a01deda732ad6f8251a0</id>
<content type='text'>
# Add RHI Device Caching and Test Prefix Exclusion

## Summary

This PR introduces two key improvements to the Slang test
infrastructure:

1. **RHI Device Caching**: Implements device caching to significantly
speed up test execution by reusing graphics devices across tests, **RHI
Device Caching reduces slang-test execution time from ~15 minutes to ~5
minutes in Windows release builds**
2. **Test Prefix Exclusion**: Adds `-exclude-prefix` option to skip
tests matching specified path prefixes

## Changes

### RHI Device Caching
- **New `DeviceCache` class** (`slang-test-device-cache.h/cpp`):
Thread-safe device cache with LRU eviction (max 10 devices)
- **Cache control option**: `-cache-rhi-device` flag in both
`slang-test` and `render-test`
- Default: **enabled** in slang-test, **disabled** in render-test when
run standalone
  - Automatically skips caching for CUDA devices (due to driver issues)
- **Performance benefit**: Eliminates expensive device
creation/destruction cycles, especially beneficial for Vulkan on Tegra
platforms

### Test Prefix Exclusion
- **New `-exclude-prefix &lt;prefix&gt;` option** in slang-test
- Allows excluding entire test directories or patterns from execution
- Complements existing `-category` and individual test filtering options

### Usage Examples
```bash
# Enable device caching (default)
slang-test

# Disable device caching
slang-test -cache-rhi-device false

# Exclude tests from specific directories
slang-test -exclude-prefix tests/problematic/
slang-test -exclude-prefix tests/slow/ -exclude-prefix tests/experimental/
```

This change should significantly improve test execution performance,
particularly in CI environments with frequent device operations. This is
needed for running the GPU test in aarch64, where repeated device
creation/destroy is causing driver issues.

Needed by: https://github.com/shader-slang/slang/issues/8346

---------

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 a new slang-test option `-enable-debug-layers` (#7300)</title>
<updated>2025-06-02T23:47:16+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-06-02T23:47:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d80f4139bc4baa119a5dfcf74cdcf3a75b977efc'/>
<id>urn:sha1:d80f4139bc4baa119a5dfcf74cdcf3a75b977efc</id>
<content type='text'>
* Add a new slang-test option `-enable-debug-layers`

A variable `disableDebugLayer` is renamed to `enableDebugLayers`,
and a corresponding command-line argument is added,
`-enable-debug-layers`.

The previous option `-disable-debug-layer` is still available, but it
prints a deprecation warning message.

The reason why it is added is to make the option available to both Debug
and Release. On Debug build, it will be enabled by default, and it will
be disabled on Release build. We should be able to not only disable it,
but also enable it on Release build.

Ideally this option should be enabled all the time, but currently there
are too many VUID error messages printed and we are enabling only for
Debug build for now.

Note that the CI/CD will run with the option disabled until we resolve
all of VUID errors.</content>
</entry>
<entry>
<title>Enable Windows full debug testsuite in CI (#7085)</title>
<updated>2025-05-16T21:51:46+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>tonggangzheng@gmail.com</email>
</author>
<published>2025-05-16T21:51:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8f20632a0ba45c3bfada293842e55129949a2ae9'/>
<id>urn:sha1:8f20632a0ba45c3bfada293842e55129949a2ae9</id>
<content type='text'>
* Unify Debug Layer Control Logic and Add Disable Option for Debug Builds

This PR refactors and unifies the debug layer control logic in slang-test.
A new `-disable-debug-layers` option is introduced, allowing debug builds to skip enabling the validation (debug) layer.
This is currently needed to ensure stability in the debug test suite.

Previously, different toggles such as ENABLE_VALIDATION_LAYER, ENABLE_DEBUG_LAYER, and debugLayerEnabled were used inconsistently across different components of slang-test. This PR standardizes the logic by using a single variable, debugLayerEnabled, to control the enabling/disabling of the debug layer internally.

Notes:
By default, the debug/validation layer is enabled in debug builds and is not supported in release builds of slang-test.

Fixes: #7132

* Disable spirv-opt for the DebugFunctionDefinition issue

* Run debug build only in GCP machines

* Fix VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-02818

dstAcessMask can't include VK_ACCESS_TRANSFER_READ_BIT when stage mask
has  VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

* Set failed retry limit to 32

---------

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>Retry when a few unit tests failed. (#6912)</title>
<updated>2025-05-06T12:49:27+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-05-06T12:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b0187cdb13ebbf1eaaf101cbfe8860a73280d644'/>
<id>urn:sha1:b0187cdb13ebbf1eaaf101cbfe8860a73280d644</id>
<content type='text'>
This PR allows the failed unit-tests to be retried at the end as in a single threaded manner.

The purpose of the retry is to increase the stability of CI.</content>
</entry>
<entry>
<title>Migrate slang-test away from deprecated Slang API (#6343)</title>
<updated>2025-02-13T06:31:24+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2025-02-13T06:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8406b5647a61fb70be4e041a76c1b64b05a70452'/>
<id>urn:sha1:8406b5647a61fb70be4e041a76c1b64b05a70452</id>
<content type='text'>
This helps to address #4760.</content>
</entry>
<entry>
<title>format</title>
<updated>2024-10-29T06:49:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-10-29T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21'/>
<id>urn:sha1:f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21</id>
<content type='text'>
* format

* Minor test fixes

* enable checking cpp format in ci</content>
</entry>
<entry>
<title>Replace stdlib on Slang API with CoreModule (#5405)</title>
<updated>2024-10-25T17:14:22+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-10-25T17:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4bad669bbc5ec3ff77321f083c59cde87eb10229'/>
<id>urn:sha1:4bad669bbc5ec3ff77321f083c59cde87eb10229</id>
<content type='text'>
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them.

Following functions are renamed:

compileStdLib() -&gt; compileCoreModule()
loadStdLib() -&gt; loadCoreModule()
saveStdLib() -&gt; saveCoreModule()
slang_createGlobalSessionWithoutStdLib() -&gt; slang_createGlobalSessionWithoutCoreModule()
slang_getEmbeddedStdLib() -&gt; slang_getEmbeddedCoreModule()
hasDeferredStdLib() -&gt; hasDeferredCoreModule()
Following command-line arguments are renamed:

"-load-stdlib" -&gt; "-load-core-module"
"-save-stdlib" -&gt; "-save-core-module"
"-save-stdlib-bin-source" -&gt; "-save-core-module-bin-source"
"-compile-stdlib" -&gt; "-compile-core-module"</content>
</entry>
<entry>
<title>slang-test: retry failed test at the end. (#5255)</title>
<updated>2024-10-11T06:12:57+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-10-11T06:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=466fb5bd79c46863dc50817372cb852838a9a807'/>
<id>urn:sha1:466fb5bd79c46863dc50817372cb852838a9a807</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add WGSL support for slang-test (#5174)</title>
<updated>2024-10-07T17:16:19+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-10-07T17:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=509409ef11e3b1abd1d7e1bfb540bc172aa1a817'/>
<id>urn:sha1:509409ef11e3b1abd1d7e1bfb540bc172aa1a817</id>
<content type='text'>
* Use the assembly description as target when disassembling

I believe this is a bugfix.
It seems to have worked before because up until the WGSL case, the disassembler has been
the same executable as the one producing the binary to be disassembled.

* Add Tint as a downstream compiler

This closes issue #5104.

* Add downstream compiler for Tint.
 * Tint is wrapped in a shared library, 'slang-tint' available from [1].
 * The header file for slang-tint.dll is added in external/slang-tint-headers.
* Add some boilerplate for WGSL targets.
* Add an entry point test for WGSL.

[1] https://github.com/shader-slang/dawn/releases/tag/slang-tint-0

* Add WGSL_SPIRV as supported target for Glslang

* Add WebGPU support to slang-test

This helps to address issue #5051.

* Disable lots of crashing compute tests for 'wgpu'

This closes issue #5051.

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Implement math intrinsics for WGSL (#5078)</title>
<updated>2024-09-17T20:51:08+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-09-17T20:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=07166468c6fa706b7f35d3422e4966f62e7b86d2'/>
<id>urn:sha1:07166468c6fa706b7f35d3422e4966f62e7b86d2</id>
<content type='text'>
* Implement math intrinsics for WGSL

This commit implements math related intrinsics and a few others for
WGSL.

The implementation is based on the following doc,
 https://www.w3.org/TR/WGSL

slang-test was looking for the downstream compiler for WGSL even though
it is not used.
This commit adds a minimal change to avoid the crash.</content>
</entry>
</feed>
