<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/compute/unbounded-array-of-array-syntax.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-08-25T05:20:41+00:00</updated>
<entry>
<title>Fix#8084: Batch-8: Enable cuda tests (#8268)</title>
<updated>2025-08-25T05:20:41+00:00</updated>
<author>
<name>Harsh Aggarwal (NVIDIA)</name>
<email>haaggarwal@nvidia.com</email>
</author>
<published>2025-08-25T05:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1562f98c07954ae17f9e7ef186f6c8eb029740ab'/>
<id>urn:sha1:1562f98c07954ae17f9e7ef186f6c8eb029740ab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert uint&lt;-&gt;int implicit cast cost to prefer promotion to unsigned. (#5480)</title>
<updated>2024-11-03T03:35:22+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-11-03T03:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f4d5aa73fb72a483f04bb6b014e80192331504ea'/>
<id>urn:sha1:f4d5aa73fb72a483f04bb6b014e80192331504ea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Switch to direct-to-spirv backend as default. (#4002)</title>
<updated>2024-04-23T19:14:21+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-04-23T19:14:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f1de1817ca10e34ec6a844100f10f0de3340c9f2'/>
<id>urn:sha1:f1de1817ca10e34ec6a844100f10f0de3340c9f2</id>
<content type='text'>
* Switch to direct-to-spirv backend as default.

* Fix slang-test.

* Fix.

* Fix.</content>
</entry>
<entry>
<title>Enable NonUniformResourceIndex support for glsl, hlsl and spirv (#3899)</title>
<updated>2024-04-19T16:12:56+00:00</updated>
<author>
<name>sriramm-nv</name>
<email>85252063+sriramm-nv@users.noreply.github.com</email>
</author>
<published>2024-04-19T16:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7c162eba5329eae7755e55298a455a144fcb0dce'/>
<id>urn:sha1:7c162eba5329eae7755e55298a455a144fcb0dce</id>
<content type='text'>
Fixes #387676* ForceInline SampleLevel to allow decorations to apply

* explictly add all the SPIRVAsmOperand Insts in non-differentiable list, which might get inadvertently processed when these functions are inlined into the main shader

* Support NonUniformResourceIndex for SPIR-V target

Fixes #3876

* add a new IR instruction for NonUniformResourceIndex

* slang ir emitter for nonuniform resource index

* update the hlsl meta slang

* Add test cases for NonUniformResourceIndex access for buffers and textures, with/without cast, nested access etc.

* add default c-like emitter for nonuniformresourceinfo

* added hlsl emitter

* added glsl emitter

* requisites for spirv enabling

- new decorator for nonuniformresourceindex
- emitter for nonuniformresourceindex signature change

* add hasResourceType checker

* add rwStructBuffType in resourcetype checker

* add a case for nonuniformres in emitDecorations

* DO NOT COMMIT: This change adds special handling for RWStructBuf within the isResourceType function, if it is a pointer to this resource, return true to make it work with nonuniformres test

* spirv emitter for decorations - update the emitLocalInst to perform decorations at the end

* added main spirv emitter code

* slang emit spirv bugfix

* hacky way of supporting Call Inst

* move code to cleanup nonuniform inst into helper function

* remove stale codefrom test

* add spirv decoration for nonuniform

* update test to remove global variables

* update coherent-2 test

* update comment for special handling

* update the spirv legalize to handle nested nonuniforms

improved logic that handles call ops, rwstructbuf, nested nonuniforms
etc.

* update nonuniform-array-of-tex test

* missed removing nonuniform inst causing duplicate decorations

* add glsl and hlsl variants of nonuniform tests

* repurpose the hasResource function into something specific for nonuniform inst decoration helper

* clean up comments and code around spirv-legalization to emit nonuniform inst by recursively looking into the inst

* use the helper canDecorateNonUniformInst to convert `nonUniformResourceInfo` inst to decoration

* converted compute/unbounded-array-of-array cross compile test into a simple check test

* update contains Resource helper function to be more generic

* clean up the case for opcall handling with nonuniform resource inst

* update ptr to struct buffer check to be more explicit and rename the function to check for ptr to resource type

* update comments and fix the test for coherent

* fix typos

* update logic on spirv legalize to delete dead instructions - for some reason this doesn't automatically happen

* add comments to declarations

* add NonuniformResourceIndex to the non-differential inst list</content>
</entry>
<entry>
<title>Warning on lossy implicit casts. (#2367)</title>
<updated>2022-08-18T06:08:34+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-08-18T06:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=adaea0e993fd8db351b5dad92802e47ed6d0ec77'/>
<id>urn:sha1:adaea0e993fd8db351b5dad92802e47ed6d0ec77</id>
<content type='text'>
* Warning on bool to float conversion.

* Fix test cases.

* Improve.

* LanguageServer: don't show constant value for non constant variables.

* Fix tests.

* Fix warnings in tests.

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Remove old code paths from render-test (#1760)</title>
<updated>2021-03-17T19:55:30+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2021-03-17T19:55:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6e5d85efb9fa5f647f7f0c7ef784a9fd09b29023'/>
<id>urn:sha1:6e5d85efb9fa5f647f7f0c7ef784a9fd09b29023</id>
<content type='text'>
* Remove old code paths from render-test

Historically, the `render-test` tool was using three different code paths:

* One based on `gfx` and manual (non-reflection-based) parameter setting, used for OpenGL, D3D11, D3D12, and Vulkan
* One for CPU that used reflection-based parameter setting but shared no code with the first
* One for CUDA that used reflection-based parameter setting and shared some, but not all, code with the CPU path

Recently we've updated `render-test` to include a fourth option:

* Using `gfx` and the "shader object" system it exposes for a unified reflection-based parameter-setting system taht works across OpenGL, D3D11, D3D12, Vulkan, CUDA, and CPU

This change removes the first three options and leaves only the single unified path. A sa result, a bunch of code in `render-test` is no longer needed, and the codebase no longer relies on things like the `IDescriptorSet`-related APIs in `gfx`.

Several existing tests had to be disabled to make this change possible. Those tests will need to be audited and either re-enabled once we fix issues in the shader object system, or permanently removed if they don't test stuff we intend to support in the long run (e.g., global-scope type parameters, which aren't a clear necessity).

* fixup: CUDA detection logic</content>
</entry>
<entry>
<title>Add a CPU renderer implementation (#1750)</title>
<updated>2021-03-12T19:58:14+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2021-03-12T19:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d6a37a0f151e390808f196998c48a341bc4c7b60'/>
<id>urn:sha1:d6a37a0f151e390808f196998c48a341bc4c7b60</id>
<content type='text'>
* Add a CPU renderer implementation

This change adds a CPU back-end to `gfx` and ensures that most of our existing CPU tests pass when using it.

Detailed notes:

* Most of the CPU renderer implementation is copy-pasted from the CUDA case, so they share a lot of similar logic

* The main addition to the CPU renderer is a semi-complete implementation of host-memory textures. The logic here handles all the main shapes (Buffer, 1D, 2D, 3D, Cube) and all the currently-supported `Format`s that are sample-able as-is (no D24S8). The implementation is not intended to be fast, and it currently only does nearest-neighbor sampling, but otherwise it tries to avoid cutting too many corners and should be ar reasonable starting point for a more complete (but not performance-oriented) implementation.

* Refactored the CPU prelude `IRWTexture` interface to inherit from `ITexture`, since in most cases a single type will end up implementing both. It might be worth it to collapse it all down to a single interface later.

* Changed the CPU prelude `ITexture`/`IRWTexture` interface so that it takes both a pointer *and* a size for output arguments. This change seems necessary to allow a shader variable declared as a `Texture2D&lt;float&gt;` to fetch a single `float` when the underlying texture might be using RGBA32F.

* Added to the `IComponentType` public API so that we can query a "host callable" for an entry point and not just a binary.

* Turned off the `-shaderobj` flag on two tests that weren't yet compatible with shader objects but still had the flag left in on the path (since previously the CPU path always used the non-`gfx` non-shader-object logic anyway)

* Disabled one test (`dynamic-dispatch-11`) that relied on the `ConstantBuffer&lt;IInterface&gt;` idiom that we know we are planning to chagne soon anyway.

* Made a few changes to the CUDA path to bring it into line with what I added for the CPU path. These were mostly bug fixes around indexing logic for sub-objects and resources.

* fixup</content>
</entry>
<entry>
<title>Convert more tests to use shader objects (#1659)</title>
<updated>2021-01-15T20:10:06+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2021-01-15T20:10:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2a5d5b32348c33aac7ca62aa9a4c2bb7cff8e08a'/>
<id>urn:sha1:2a5d5b32348c33aac7ca62aa9a4c2bb7cff8e08a</id>
<content type='text'>
This change converts a large number of our existing tests to use the `ShaderObject` support that was added to the `gfx` layer.

In many cases, tests were just updated to pass `-shaderobj` and the result Just Worked.
In other cases, a `name` attribute had to be added to one or more `TEST_INPUT` lines.

For tests that did not work with shader objects "out of the box," I spent a little bit of time trying to get them work, but fell back to letting those tests run in the older mode.
Future changes to the infrastructure will be needed to get those additional tests working in the new path.

Along with the changes to test files, the following implementation changes were made to get additional tests working:

* Because the shader object mode uses explicit register bindings (from reflection), the hacky logic that was offseting `u` registers for D3D12 based on the number of render targets gets disabled (by another hack).

* The "flat" reflection information coming from Slang was not correctly reporting "binding ranges" for things that consumed only uniform data (which would be everything on CUDA/CPU), so it was refactored to properly include binding ranges for anything where the type of the field/variable implied a binding range should be created (even if the `LayoutResourceKind` was `::Uniform`).

* A few fixes were made to the CUDA implementation of `Renderer`, in order to get additional tests up and running. Most of these changes had to do with texture bindings, which hadn't really been tested previously.

In addition, a few changes were made that were attempts at getting more tests working, but didn't actually help. These could be dropped if requested:

* As a quality-of-life feature (not being used) the `object` style of `TEST_INPUT` line is upgraded to support inferring the type to use from the type of the input being set.

* Any `object` shader input lines get ignored in non-shader-object mode.</content>
</entry>
<entry>
<title>CUDA global scope initialization of arrays without function calls. (#1320)</title>
<updated>2020-04-14T21:00:11+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2020-04-14T21:00:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=fbac017938343724407ab036abd736c942b4e187'/>
<id>urn:sha1:fbac017938343724407ab036abd736c942b4e187</id>
<content type='text'>
* Fix CUDA output of a static const array if values are all literals.

* Fix bug in Convert definition.

* Output makeArray such that is deconstructed on CUDA to fill in based on what the target type is. Tries to expand such that there are no function calls so that static const global scope definitions work.

* Fix unbounded-array-of-array-syntax.slang to work correctly on CUDA.

* Remove tabs.

* Check works with static const vector/matrix.

* Fix typo in type comparison.

* Shorten _areEquivalent test.

* Rename _emitInitializerList. Some small comment fixes.

Co-authored-by: Tim Foley &lt;tfoleyNV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Optimize creation of memberDictionary (#1305)</title>
<updated>2020-04-02T21:06:16+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2020-04-02T21:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=00e1dba744dc8d09bc59d0a46f18076e3704c566'/>
<id>urn:sha1:00e1dba744dc8d09bc59d0a46f18076e3704c566</id>
<content type='text'>
* Improve performance of building members dictionary by adding when needed.

* Fix unbounded-array-of-array-syntax.slang, that DISABLE_TEST now uses up an index. Use IGNORE_TEST.

* Improve variable name.
Small improvements.

Co-authored-by: Tim Foley &lt;tfoleyNV@users.noreply.github.com&gt;</content>
</entry>
</feed>
