<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/vkray, 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-01T02:08:23+00:00</updated>
<entry>
<title>Enhance buffer load specialization pass to specialize past field extracts. (#8547)</title>
<updated>2025-10-01T02:08:23+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-01T02:08:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e4611e2e30a3e5969d402f5ed7e72706a0e3b024'/>
<id>urn:sha1:e4611e2e30a3e5969d402f5ed7e72706a0e3b024</id>
<content type='text'>
This allows us to specialize functions whose argument is a sub element
of a constant buffer, instead of being only applicable to entire buffer
element. Closes #8421.

This change also implements a proper heuristic to determine when to
specialize the calls and defer the buffer loads.

This PR addresses a pathological case exposed in
`slangpy\slangpy\benchmarks\test_benchmark_tensor.py`, which used to
take 27ms to finish, and now takes 1.25ms.


For example, given:
```
struct Bottom
{
    float bigArray[1024];

    [mutating]
    void setVal(int index, float value) { bigArray[index] = value; }
}

struct Root
{
    Bottom top[2];
    [mutating]
    void setTopVal(int x, int y, float value)
    {
        top[x].setVal(y, value);
    }
}

RWStructuredBuffer&lt;Root&gt; sb;

[shader("compute")]
[numthreads(1, 1, 1)]
void compute_main(uint3 tid: SV_DispatchThreadID)
{
    sb[0].setTopVal(1, 2, 100.0f);
}
```

We are now able to specialize the call to `setTopVal` into:
```
void compute_main(uint3 tid: SV_DispatchThreadID)
{
    setTopVal_specialized(0, 1, 2, 100.0f);
}

void setTopVal_specialized(int sbIdx, int x, int y, float value)
{
      Bottom_setVal_specialized(sbIdx, x, y, value);
}

void Bottom_setVal_specialized(int sbIdx, int x, int y, float value)
{
     sb[sbIdx].top[x].bigArray[y] = value;
}
```

And get rid of all unnecessary loads. Achieving this requires a
combination of function call specialization and buffer-load-defer pass.
The buffer-load-defer pass has been completely rewritten to be more
correct and avoid introducing redundant loads.

This PR also adds tests to make sure pointers, bindless handles, and
loads from structured buffer or constant buffers works as expected.</content>
</entry>
<entry>
<title>Defer immutable buffer loads when emitting spirv. (#7579)</title>
<updated>2025-07-02T02:09:29+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-07-02T02:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c701ec00ccce6dfa8094d6550ce2db929fc8cefe'/>
<id>urn:sha1:c701ec00ccce6dfa8094d6550ce2db929fc8cefe</id>
<content type='text'>
* Defer immutable buffer loads when emitting spirv.

* Fix.

* Fix.

* Fix.

* Fix tests.

* Fix test.</content>
</entry>
<entry>
<title>Support spirv ops added by multiple extensions (#6615)</title>
<updated>2025-03-21T17:21:04+00:00</updated>
<author>
<name>Dario Mylonopoulos</name>
<email>32958057+ramenguy99@users.noreply.github.com</email>
</author>
<published>2025-03-21T17:21:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=969d101aff074675de32bdbe6b97baf744634f78'/>
<id>urn:sha1:969d101aff074675de32bdbe6b97baf744634f78</id>
<content type='text'>
* spirv: add support for ops added by multiple extensions

Some spirv ops are added by multiple extensions and capabilities. This
commit adds support to avoid emitting unnecessary extensions and
capabilities if one of the options is already required by some other op.

* spirv: allow OpRaytracingAccelerationStructure to use multiple extensions

This Op is provided by both SPV_KHR_ray_tracing and SPV_KHR_ray_query
and the respective capabilities. Use one if already available and
otherwise fall back to SPV_KHR_ray_tracing.

* tests/vkray: add negative checks for RayTracingKHR and RayQueryKHR

- Add new rayquery-compute.slang to test that only RayQueryKHR is needed
  in compute shaders.
- Add checks for RayTracingKHR and RayQueryKHR capabilities and
  extensions in raygen.slang

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Consolidate multiple inouts/outs into struct (#6435)</title>
<updated>2025-03-01T06:49:26+00:00</updated>
<author>
<name>Mukund Keshava</name>
<email>mkeshava@nvidia.com</email>
</author>
<published>2025-03-01T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b86925c1929186c122536b9a7ed75131faceddb7'/>
<id>urn:sha1:b86925c1929186c122536b9a7ed75131faceddb7</id>
<content type='text'>
* Consolidate multiple inout/outs into struct

Fixes #5121

VUID-StandaloneSpirv-IncomingRayPayloadKHR-04700 requires that there be
only one IncomingRayPayloadKHR per entry point. This change does two
things:

1. If an entry point has the one inout or out, or has only ins, then
   stay with current implementation.

2. If there are multiple outs/inouts, then create a new structure to
   consolidate these fields and emit this structure.

These two code paths are split into two separate functions for clarity.
This patch also adds a new test: multipleinout.slang to test this.

* Address review comments

* Refactor code as per review comments

* format code

* fix failing tests

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add raypayload decoration to ray payload structs (#6164)</title>
<updated>2025-02-11T11:07:57+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2025-02-11T11:07:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0b4e463aee4107b383067424007c6a995f1f9f87'/>
<id>urn:sha1:0b4e463aee4107b383067424007c6a995f1f9f87</id>
<content type='text'>
* Add raypayload decoration to ray payload structs

Closes https://github.com/shader-slang/slang/issues/6104

* Disable PAQs when compiling with DXC

See https://github.com/shader-slang/slang/issues/3448</content>
</entry>
<entry>
<title>Lower varying parameters as pointers instead of SSA values. (#5919)</title>
<updated>2025-01-08T06:26:31+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-01-08T06:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c43f6fa55aca23365c86c6ec1737d42be74d9d3e'/>
<id>urn:sha1:c43f6fa55aca23365c86c6ec1737d42be74d9d3e</id>
<content type='text'>
* Add executable test on matrix-typed vertex input.
* Fix emit logic of matrix layout qualifier.
* Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.</content>
</entry>
<entry>
<title>Update spirv-tools version (#5089)</title>
<updated>2024-09-19T20:02:49+00:00</updated>
<author>
<name>cheneym2</name>
<email>acheney@nvidia.com</email>
</author>
<published>2024-09-19T20:02:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9d40ce4e8921ef468281c91f052dbd443ecf56e2'/>
<id>urn:sha1:9d40ce4e8921ef468281c91f052dbd443ecf56e2</id>
<content type='text'>
* Update spirv-headers and spirv-tools versions

* Fix compute-derivative regressions with upgraded spirv headers

Extension was promoted from NV to KHR while retaining same enums.

Fixes #5106

* Prevent DCE on ray trace position fetch

Adds dummy usage to the intersection positions fetched
from HitTriangleVertexPositions to prevent DCE from
removing their usage.

Fixes #5105

* Update spirv-tools-generated

* More DerivativeGroup*KHR test fixes

Add fixes for a missing test intrinsic-derivative-function-in-compute.slang
Use the {{NV|KHR}} syntax to tolerate either enum.

Fixes #5106

* Squash tabs in closesthit test

* HACK test CI

* Avoid multiple IncomingRayPayloadKHR storage params

* Revert "HACK test CI"

This reverts commit c2556ea2baef0bd48e4c86f90cf17dfab80015c1.

* Avoid multiple IncomingRayPayloadKHR storage params in anyhit</content>
</entry>
<entry>
<title>Update spirv-header and spirv-tools to Jun/2024 (#4679)</title>
<updated>2024-07-18T20:21:12+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-07-18T20:21:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ad379b7c532bef5ac49e6d730027ac8751e618d7'/>
<id>urn:sha1:ad379b7c532bef5ac49e6d730027ac8751e618d7</id>
<content type='text'>
The following external directories are updated.
It is to use a new SPIRV keyword, "OpExtInstWithForwardRefs".

Related to #4304

external/spirv-header:
&gt; commit 2acb319af38d43be3ea76bfabf3998e5281d8d12
&gt; Author: Kévin Petit kevin.petit@arm.com
&gt; Date: Wed Jun 12 16:41:14 2024 +0100
&gt; SPV_ARM_cooperative_matrix_layouts (#433)

external/spirv-tools:
&gt; commit ce46482db7ab3ea9c52fce832d27ca40b14f8e87
&gt; Author: Nathan Gauër brioche@google.com
&gt; Date: Thu Jun 6 12:17:51 2024 +0200
&gt; Add KHR suffix to OpExtInstWithForwardRef opcode. (#5704)
&gt; The KHR suffix was missing from the published SPIR-V extension.
&gt; This is now fixed, but requires some patches in SPIRV-Tools.

external/spirv-tools-generated:
This is generated from spirv-tools</content>
</entry>
<entry>
<title>Improve Direct SPIRV Backend Test Coverage (#4396)</title>
<updated>2024-06-14T16:56:59+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-06-14T16:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=fdef653ab5b38ac78d355d2f0148c6d77e784a8c'/>
<id>urn:sha1:fdef653ab5b38ac78d355d2f0148c6d77e784a8c</id>
<content type='text'>
'raytracing' and 'texture-footprint' tests

fixed texture-footprint bug
changed when we emit raytracing/rayquery extensions with glsl backend (to reduce incorrect extension emitting)</content>
</entry>
<entry>
<title>Capability System: Implicit capability upgrade warning/error (#4241)</title>
<updated>2024-06-12T20:38:23+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-06-12T20:38:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8813c610562b1c30222ec3ef0734ef601d43b617'/>
<id>urn:sha1:8813c610562b1c30222ec3ef0734ef601d43b617</id>
<content type='text'>
* capability upgrade warning/error

adjusted implementation + tests to support a warning/error if capabilities are implicitly upgraded and test accordingly.

* add glsl profile caps

* add GLSL and HLSL capabilities to the associated capability

* syntax error in capdef

* only error if user explicitly enables capabilities

1. changed testing infrastructure to not set a `profile` explicitly,
2. Added tests to be sure this works as intended with user API and with slangc command line

* Change capability atom definitions and how Slang manages them to fix errors

1. most `glsl_spirv` version atoms have been removed from `.capdef`, instead we will translate `spirv` version atoms into `glsl_spirv` since there is no point in writing the same code twice in `.capdef` files to define `spirv` versions.
2. add spirv version, and hlsl sm version (and equivlent) capability dependencies
3. removed some stage requirments which were set on objects, keep the wrapper capabilities. I am keeping the wrapper capabilities since I am unaware on if there are stage limitations (spec says code in practice does not work).

* check internal version instead of version profile (_spirv_1_5 vs. spirv_1_5)

* remove unused OpCapability. adjust SPIRV version'ing again for glsl_spirv

* apply workaround for glslang bug with rayquery usage

* ensure capabilities targetted by a profile and added together by a user are valid

* remove additions to `spirv_1_*` wrapper

* spirv_* -&gt; glsl_spirv fix

* fix bug where incompatable profiles would cause invalid target caps

* try to avoid joining invalid capabilities

* fix the warning/error &amp; printing

* run through tests to fix capability system and test mistakes

many mistakes were mesh shaders doing `-profile glsl_450+spirv_1_4`. This is not allowed for a few reasons
1. the test tooling does not handle arguments the same as `slangc`
2. glsl_450 core profile does not support mesh shaders, nor does spirv_1_4. sm_6_5 does work in this senario

* set some sm_4_1 intrinsics to sm_4_0

* replace `GLSL_` defs with `glsl_`

* swap the unsupported render-test syntax for working syntax

* set d3d11/d3d12 profile defaults

this is required since sm version changes compiled code &amp; behavior

* adjusted nvapi capabilities with atomics + d3d11 set to use sm_5_0 as per default

* cleanup

* address review

* incorrect styling

* change `bitscanForward` to work as intended on 32 bit targets

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
