<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tools/render-test/shader-renderer-util.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-06-18T17:38:31+00:00</updated>
<entry>
<title>Fix additional VVL violations (#7377)</title>
<updated>2025-06-18T17:38:31+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>tonggangzheng@gmail.com</email>
</author>
<published>2025-06-18T17:38:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3822f9243f7b80be4c47318cf3d0b8d9800e67dd'/>
<id>urn:sha1:3822f9243f7b80be4c47318cf3d0b8d9800e67dd</id>
<content type='text'>
* fix: add sampleCount and mipMaps to st2DMS_f32v4
Fix VUID-VkImageCreateInfo-samples-02257:
The Vulkan spec states: If an OpTypeImage has an MS operand 1,
its bound image must not have been created with
VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT

* Fix VUID-VkShaderModuleCreateInfo-pCode-08740

Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME

* fix: add sampleCount and mipMaps to st2DMS_f32v4
Fix VUID-VkImageCreateInfo-samples-02257:
The Vulkan spec states: If an OpTypeImage has an MS operand 1,
its bound image must not have been created with
VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT

* Fix VUID-VkShaderModuleCreateInfo-pCode-08740

Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME

* Fix VUID-vkCmdDispatch-None-06479
Use correct format for combined depth texture.

* Fix VUID-vkCmdDispatch-format-07753 by setting format
Parse filtering mode for sampler because the RGBA8* formats do not
support linear filtering

* Create MS texture type for sample count &gt; 1

* Use different texture formats for depth compare and gather ops

* Use clearTexture for init the data for MS textures</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>refactor render test to use latest slang-rhi (#5119)</title>
<updated>2024-09-19T15:16:48+00:00</updated>
<author>
<name>Simon Kallweit</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-09-19T15:16:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3861be7ce5bd3ffc1bc60f2c3f7f41647145d575'/>
<id>urn:sha1:3861be7ce5bd3ffc1bc60f2c3f7f41647145d575</id>
<content type='text'>
* refactor render test to use latest slang-rhi

* update slang-rhi

* update slang-rhi

* update slang-rhi

* update slang-rhi</content>
</entry>
<entry>
<title>Draft: integrate slang-rhi (#4970)</title>
<updated>2024-08-30T16:50:19+00:00</updated>
<author>
<name>Simon Kallweit</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-08-30T16:50:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f428a058ea48535a323c32d206ebc7e551c3c3e9'/>
<id>urn:sha1:f428a058ea48535a323c32d206ebc7e551c3c3e9</id>
<content type='text'>
* add slang-rhi submodule

* refactor render-test to use slang-rhi and remove OpenGL support

* remove -vk -glsl tests

* remove gl test

* disable failing test

* allow recursive submodules in github actions

* update slang-rhi

* update slang-rhi

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Remove resource `Usage` from `gfx` interface. (#1813)</title>
<updated>2021-04-24T07:17:43+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2021-04-24T07:17:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9a5672d7b8a155117a2c3f8375e3b8a5b43d91b7'/>
<id>urn:sha1:9a5672d7b8a155117a2c3f8375e3b8a5b43d91b7</id>
<content type='text'>
* Fix `model-viewer` crash when using Vulkan.

Fixing an issue in shader object layout creation for to make sure a correct descriptor set layout is calculated for types that need an implicit constant buffer.

* Fix formatting.

* Fixes.

* Fix memory leak in vulkan.

* Remove resource `Usage` from `gfx` interface.</content>
</entry>
<entry>
<title>Clean up render-test handling of input (#1766)</title>
<updated>2021-03-25T23:40:17+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2021-03-25T23:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=abb020b15c4f1057657e5f8f63c02b15615bf6ec'/>
<id>urn:sha1:abb020b15c4f1057657e5f8f63c02b15615bf6ec</id>
<content type='text'>
The original goal of this change was to streamline the `TEST_INPUT` system by eliminating options that are no longer relevant once we have eliminated the non-shader-object execution paths. The result is more or less a re-implementation/refactor of the logic around how input is parsed and represented, that tries to set things up for a more general sytem going forward.

The main changes isthat the `ShaderInputLayout` no longer tracks a simple flat list of `ShaderInputLayoutEntry` (that is a kind of pseudo-union of the various buffer/texture/value cases), and it instead uses a hierarchical representation composed of `RefObject`-derived classes to represent "values."

There are several "simple" cases of values

* Textures

* Samplers

* Uniform/ordinary data (`uniform`)

* Buffers composed of uniform/ordinary data (`ubuffer`)

Then there are composed/aggregate values that nest other values:

* An *aggregate* value is a set of *fields* which are name/value pairs. It can be used to fill in a structure, for example.

* An *array* value is a list of values for the elements of an array. It can be used to fill out an array-of-textures parameter, for example.

* A combined texture/sampler value is a pair of a texture value and a sampler value (easy enough)

* An *object* holds an optional type name for a shader object to allocate (it defaults to the type that is "under" the current shader cursor when binding), and a nested value that describes how to fill in the contents of that object

Finally there are cases of values that are just syntactic sugar:

* A `cbuffer` is just shorthand for creating an object value with a nested uniform/ordinary data value

The big idea with this recursive structure is that it gives us a way to handle more arbitrary data types with name-based binding. Supporting this new capability requires changes to both how input layouts get parsed, and also how they get bound into shader objects.

On the parsing side, things have been refactored a bit so that parsing isn't a single monolithic routine. The refactor also tries to make it so that the various options on an input item (e.g., the `size=...` option for textures) are only supported on the relevant type of entry (so you can't specify as many useless options that will be ignored).

The bigger change to parsing is that it now supports a hierarchical structure, where certain input elements like `begin_array` can push a new "parent" value onto a stack, and subsequent `TEST_INPUT` lines will be parsed as children of that item until a matching `end` item. This approach means that we can now in principle describe arbitrary hierarchical structures as part of test input without endlessly increasing the complexity of invididual `TEST_INPUT` lines.

On the binding side, we now have a central recursive operation called `assign(ShaderCursor, ShaderInputLayout::ValPtr)` that assigns from a parsed `ShaderInputLayout` value to a particular cursor. That operation can then recurse on the fields/elements/contents of whatever the cursor points to.

Major open directions:

* With this change it is still necessary to use `uniform` entries to set things like individual integers or `float`s and that is a little silly. It would be good to have some streamlines cases for setting individual scalar values.

* Further, once we have a hierarchical representation of the values for `TEST_INPUT` lines, it becomes clear that we really ought to move to a format more like `TEST_INPUT: dstLocation = srcValue;` where `srcValue` is some kind of hierarchial expression grammar. Refactoring things in this way should make the binding logic even more clear and easy to understand. The refactored parser should make parsing hierarchical expressions easier to do in the future (even if it uses the push/pop model for now)

* One detailed note is that the representation of buffers in this change is kind of a compromise. Just as an "object" value is a thin wrapper around a recursively-contained value for its "content" it seems clear that a buffer could be represented as a wrapper around a content value that could include hierarchical aggregates/objects instead of just flat binary data (this would be important for things like a buffer over a structure type that lays out different on different targets). The main problem right now with changing the representation is actually needing to compute the size of a buffer based on its content, so that can/should be addressed in a subsequent change.

Details:

* The base `RenderTestApp` class and the `ShaderObjectRenderTestApp` classes have been merged, since the hierarchy no longer serves any purpose.

* Disabled the tess that rely on `StructuredBuffer&lt;IWhatever&gt;` because they aren't really supported by our current shader object implementation

* Replaced used of `Uniform` and `root_constants` in `TEST_INPUT` lines with just `uniform`

* Removed a bunch of uses of `stride` from `cbuffer` inputs, where it wasn't really correct/meaningful

* Added the `copyBuffer()` operation to VK/D3D renderers, along with some missing `Usage` cases to support it.

* Made `ShaderCursor` handle the logic to look up a name in the entry points of a root shader object, rather than just having that logic in `render-test`. (We probably need to make a clear design choice on this issue)</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>Swapchain resize and rename to `IDevice` (#1741)</title>
<updated>2021-03-10T18:58:15+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2021-03-10T18:58:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6ef4054f8a8aea4ec61481057fa7e16aaecde6d7'/>
<id>urn:sha1:6ef4054f8a8aea4ec61481057fa7e16aaecde6d7</id>
<content type='text'>
* Swapchain resize

* Fix.</content>
</entry>
<entry>
<title>Refactor `gfx` to surface `CommandBuffer` interface. (#1735)</title>
<updated>2021-03-05T00:25:58+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2021-03-05T00:25:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a5ac4999b4dea546a7ef824669ab1809224b6448'/>
<id>urn:sha1:a5ac4999b4dea546a7ef824669ab1809224b6448</id>
<content type='text'>
* Refactor `gfx` to surface `CommandBuffer` interface.

* Fixes.

* Fix code review issues, and make vulkan runnable on devices without VK_EXT_extended_dynamic_states.

* Update solution files

* Move out-of-date examples to examples/experimental

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
</feed>
