<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/pipeline, 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-30T18:21:27+00:00</updated>
<entry>
<title>Enable metal tests (#8446)</title>
<updated>2025-09-30T18:21:27+00:00</updated>
<author>
<name>James Helferty (NVIDIA)</name>
<email>jhelferty@nvidia.com</email>
</author>
<published>2025-09-30T18:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8086adc90b69f3199767c0617e2c429ce6b27f67'/>
<id>urn:sha1:8086adc90b69f3199767c0617e2c429ce6b27f67</id>
<content type='text'>
Enables all tests/metal/ tests that can be easily enabled.

These tests were not originally designed as render tests; they are
generally being enabled for pipecleaning purposes, and will not be
rigorously testing the corresponding funcitonality.

Where they cannot be enabled as render tests, and a metallib test wasn't
already enabled, a metallib test was enabled instead (where possible).

Fixes #7892</content>
</entry>
<entry>
<title>Rewriting the lower-buffer-element-type pass to avoid unnecessary packing/unpacking. (#8526)</title>
<updated>2025-09-30T00:45:08+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-09-30T00:45:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a6deb5ed82cb8fc6b4f4c5c5fee264e09f97ff89'/>
<id>urn:sha1:a6deb5ed82cb8fc6b4f4c5c5fee264e09f97ff89</id>
<content type='text'>
Part of the effort to improve the performance of generated SPIRV code.

The existing lower-buffer-element-type pass works by loading the entire
buffer element content from memory, and translate it to logical type
stored in a local variable at the earliest reference of a buffer handle.
This means that is can generate inefficient code that reads more than
necessary.

Consider this example:
```
struct BigStruct { bool values[1024]; }
ConstantBuffer&lt;BigStruct&gt; cb;

void test(BigStruct v)
{
      if (v.values[0]) { printf("ok"); }
}

[numthreads(1,1,1)]
void computeMain()
{
    test(cb);
}
```

In IR, the `computeMain` function before lower-buffer-element-type pass
is something like following:
```
func test:
   %v = param : BigStruct
   %barr = fieldExtract(%v, "values")
   %element = elementExtract(%barr, 0)
    ... // uses %element 

func computeMain:
  %v = load(cb)
  call %test %v
```

The existing lower-buffer-element-type pass will rewrite the bool array
in `BigStruct` into `int` array so it is legal in SPIRV. However, it
does so by inserting the translation on the first `load` of the constant
buffer:

```
struct BigStruct_std430 {
    int values[1024];
}
var cb : ConstantBuffer&lt;BigStruct_std430&gt;;
func computeMain:
   %tmpVar : var&lt;BigStruct&gt;
    call %unpackStorage(%tmpVar, cb)
   %v : BigStruct = load %tmpVar
   call %test %v
```

This means that the entire array will be loaded and translated to int,
before calling `test`, which only uses one element. It turns out that
the downstream compiler isn't always able to optimize out this
inefficient translation/copy.

This PR completely rewrites the way buffer-element-type lowering is
handled to avoid producing this inefficient code. It works in two parts:
first we turn on the `transformParamsToConstRef` pass for SPIRV target
as well, so we will translate the `test` function to take the `v`
parameter as `constref`. The second part is a redesigned
buffer-element-type pass that defers the storage-type to logical-type
translation until a value is actually used by a `load` instruction.

In this example, after `transformParamsToConstRef`, the IR is:

```
func test:
   %v = param : ConstRef&lt;BigStruct&gt;
   %barr = fieldAddr(%v, "values")
   %elementPtr = elementAddr(%barr, 0)
   %element = load(%elementPtr)
    ... // uses %element 

func computeMain:
  call %test %cb
```

The new `buffer-element-type-lowering` pass will take this IR, and
insert translation at latest possible time across the entire call graph,
and translate the IR into:

```
func test:
   %v = param : ConstRef&lt;BigStruct_std430&gt;
   %barr = fieldAddr(%v, "values")
   %elementPtr : ptr&lt;int&gt; = elementAddr(%barr, 0)
   %element_int = load(%elementPtr)
    %element = cast(%element_int) : %bool
    ... // uses %element 

func computeMain:
  call %test %cb
```

In this new IR, there is no longer a load and conversion of the entire
array.

See new comment in `slang-ir-lower-buffer-element-type.cpp` for more
details of how the pass works.

This PR also address many other issues surfaced by turning on
`transformParamsToConstRef` pass on SPIRV backend.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>render-test: Change D3D12 default to sm_6_5 (#8320)</title>
<updated>2025-09-02T23:43:48+00:00</updated>
<author>
<name>James Helferty (NVIDIA)</name>
<email>jhelferty@nvidia.com</email>
</author>
<published>2025-09-02T23:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f02b08490aa905f42a8d90381db84b1f8e409c0c'/>
<id>urn:sha1:f02b08490aa905f42a8d90381db84b1f8e409c0c</id>
<content type='text'>
Changes default for render-test to sm_6_5.
Since sm_6_5 is the new default, remove the -use-dxil option, add
-use-dxcb option
Remove -use-dxil option from all test cases.
Add -use-dxcb to two tests that needed it.

Fixes #7611</content>
</entry>
<entry>
<title>Fix noperspective modifier for SV_Barycentrics in SPIRV and GLSL (#8067)</title>
<updated>2025-08-06T19:29:28+00:00</updated>
<author>
<name>davli-nv</name>
<email>davli@nvidia.com</email>
</author>
<published>2025-08-06T19:29:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5074c4948d73b451c74bd21ac139d69eaeb390f3'/>
<id>urn:sha1:5074c4948d73b451c74bd21ac139d69eaeb390f3</id>
<content type='text'>
* Fix noperspective modifier for SV_Barycentrics in SPIRV and GLSL

- Added test case with both regular and noperspective SV_Barycentrics inputs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: davli-nv &lt;davli-nv@users.noreply.github.com&gt;

* fixup format

* address review

https://github.com/shader-slang/slang/pull/8067#pullrequestreview-3090037501

* address review

https://github.com/shader-slang/slang/pull/8067#discussion_r2255818595

* add test case from review

---------

Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;
Co-authored-by: davli-nv &lt;davli-nv@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix segmentation fault in ray tracing parameter consolidation. (#7997)</title>
<updated>2025-07-31T22:49:39+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-31T22:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e313300d2446c2efdc1d221304a6b6454fe7fa54'/>
<id>urn:sha1:e313300d2446c2efdc1d221304a6b6454fe7fa54</id>
<content type='text'>
* Initial plan

* Fix segfault in ray tracing parameter consolidation

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix.

* Fix.

* Keep entrypoint param layout consistent during `MoveEntryPointUniformParametersToGlobalScope`.

* Fix.

* fix.

* Fix.

* Fix pending layout handling.

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Fix scalar to array conversion for tessellation factors (#7837)</title>
<updated>2025-07-22T21:29:57+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-07-22T21:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b16d4e955fdba3d68d156f944260f8b7a157fd4d'/>
<id>urn:sha1:b16d4e955fdba3d68d156f944260f8b7a157fd4d</id>
<content type='text'>
* Fix scalar to array conversion for tessellation factors in GLSL legalization

Add scalar-to-array conversion support in adaptType() function to handle
cases where users declare scalar tessellation factors (e.g., float TessLevelInner)
but GLSL requires arrays (float[2] for gl_TessLevelInner). This prevents the
generation of BuiltinCast instructions that crash the SPIR-V emitter.

Fixes crash: "unimplemented: Unhandled local inst in spirv-emit: BuiltinCast"

- Add scalar-to-array case in slang-ir-glsl-legalize.cpp adaptType()
- Fill all array elements with the scalar value for tessellation factors
- Add test case for scalar tessellation factor conversion

Fixes #7000

Co-authored-by: Yong He &lt;csyonghe@users.noreply.github.com&gt;

* Apply review feedback fixes

- Change test directive to TEST:SIMPLE
- Use IRArrayType instead of IRArrayTypeBase
- Use MakeArrayFromElement for cleaner scalar-to-array conversion

Co-authored-by: Yong He &lt;csyonghe@users.noreply.github.com&gt;

* Fix type conversion in scalar-to-array tessellation factor conversion

Convert scalar value to array element type before creating array to handle
cases where scalar type differs from array element type (e.g., int to float[3]).

Co-authored-by: Yong He &lt;csyonghe@users.noreply.github.com&gt;

* Use CHECK-DAG for order-independent tessellation factor checks

Co-authored-by: Yong He &lt;csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;csyonghe@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Add WorkgroupCount function (#7734)</title>
<updated>2025-07-12T00:46:22+00:00</updated>
<author>
<name>davli-nv</name>
<email>davli@nvidia.com</email>
</author>
<published>2025-07-12T00:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d39590228241cb42d72f493f6f484c5ea93df934'/>
<id>urn:sha1:d39590228241cb42d72f493f6f484c5ea93df934</id>
<content type='text'>
Fixes #7733

Copy gl_NumWorkGroups into hlsl.meta.slang as WorkgroupCount function so
that it can be used for GLSL and SPIR-V targets without GLSL syntax.

Also change WorkgroupSize function to allow use with mesh shading capability.
Update pipeline/rasterization/mesh/task-simple.slang to test it in task and mesh stages.</content>
</entry>
<entry>
<title>Apply pixel interlock execution mode to entry-point functions only (#6661)</title>
<updated>2025-03-21T14:31:07+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-03-21T14:31:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=16ac0efa3e1e834e3b12af8ac34cf47a6418bb34'/>
<id>urn:sha1:16ac0efa3e1e834e3b12af8ac34cf47a6418bb34</id>
<content type='text'>
Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Migrate render-test away from deprecated compile request API (#6514)</title>
<updated>2025-03-12T11:44:57+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2025-03-12T11:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f4d5372d3354e62770b076b47892b5172223e98a'/>
<id>urn:sha1:f4d5372d3354e62770b076b47892b5172223e98a</id>
<content type='text'>
* Add a simple interface parameter test

Since there's no documentation, it's nice to have a simple test case in order to
experiment with this feature of the testing framework.

* Add shader entry point attributes to tests

* Fix specialization arguments for tests

- Add some missing arguments
- Rremove one extraneous argument.

* Stop using deprecated compile request in render-test

Use a session object instead of the deprecated compile request object.
This closes issue #4760.</content>
</entry>
<entry>
<title>Feature/initialize list side branch (#6058)</title>
<updated>2025-02-05T18:37:03+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2025-02-05T18:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9ec6b91686b651d959fd9ffbec283845bd725dd6'/>
<id>urn:sha1:9ec6b91686b651d959fd9ffbec283845bd725dd6</id>
<content type='text'>
* SP004: implement initialize list translation to ctor

- We synthesize a member-wise constructor for each struct follow
   the rules described in SP004.
- Add logic to translate the initialize list to constructor invoke
- Add cuda-host decoration for the synthesized constructor
- Remove the default constructor when we have a valid member init constructor
- Disable -zero-initialize option, will re-implement it in followup (#6109).
- Fix the overload lookup issue
    When creating invoke expression for ctor, we need to call
    ResolveInvoke() to find us the best candidates, however
    the existing lookup logic could find us the base constructor
    for child struct, we should eliminate this case by providing
    the LookupOptions::IgnoreInheritance to lookup, this requires
    us to create a subcontext on SemanticsVisitor to indicate that
    we only want to use this option on looking the constructor.
- Do not implicit initialize a struct that doesn't have explicit default
   constructor.

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
</feed>
