<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-emit-cuda.cpp, 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-16T03:59:47+00:00</updated>
<entry>
<title>Immutable access qualifier for pointers and use `__ldg` on cuda. (#8710)</title>
<updated>2025-10-16T03:59:47+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-16T03:59:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=01510f2c922af8629c7a730ef92a31fa83bd9f49'/>
<id>urn:sha1:01510f2c922af8629c7a730ef92a31fa83bd9f49</id>
<content type='text'>
This PR implements `Access.Immutable` to allow pointers to immutable
data.

The new type `ImmutablePtr&lt;T&gt;` is defined as an alias of `Ptr&lt;T,
Address.Immutable&gt;`.
By forming a immutable pointer, the programmer is conveying to the
compiler that the data at the pointer address will never change during
the execution of the current program. Therefore loads from immutable
pointers can be deduplicated by the compiler, and will translate to
`__ldg` when generating code for CUDA.

The SPIRV backend is not changed in this PR, since the current SPIRV
spec makes it very difficult to specify loads from immutable address
without generating tons of wrappers and boilerplate type declarations.
We would like to see the spec evolved a bit to around its support of
`NonWritable` physical storage pointers or immutable loads before we
attempt to express such immutability in SPIRV. For now we simply emit
ordinary pointers and loads when generating spirv.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[CUDA] Fix incorrect `kIROp_RaytracingAccelerationStructureType` emitting logic (#8168)</title>
<updated>2025-08-15T15:24:06+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2025-08-15T15:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f75bf474ef87737c87ef6dcb431bd0b87faee0a8'/>
<id>urn:sha1:f75bf474ef87737c87ef6dcb431bd0b87faee0a8</id>
<content type='text'>
Fixes: #8167

Current emitting logic does not work, this has been corrected.
The provided test ensures our CUDA code is valid by compiling PTX from
it.

`m_writer-&gt;emit("OptixTraversableHandle");` should be `out &lt;&lt;` since
`out` adds to type-name-cache; otherwise using a type twice will produce
bad type-names (since we filled type-name cache with "" instead of
"typeName")</content>
</entry>
<entry>
<title>Fix operator precedence in OptiX ray payload pointer casting which broke due to (#6326) (#7194)</title>
<updated>2025-05-26T18:22:45+00:00</updated>
<author>
<name>Harsh Aggarwal (NVIDIA)</name>
<email>haaggarwal@nvidia.com</email>
</author>
<published>2025-05-26T18:22:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5280ca81025d42239fec492eb72d38606308751a'/>
<id>urn:sha1:5280ca81025d42239fec492eb72d38606308751a</id>
<content type='text'>
* Fix operator precedence in OptiX ray payload pointer casting

Added extra parentheses around the cast to ensure proper operator precedence when
dereferencing the OptiX ray payload pointer. This fixes the issue where the compiler
was treating the expression as (RayPayload_0 *)getOptiXRayPayloadPtr()-&gt;color_0 instead of
((RayPayload_0 *)getOptiXRayPayloadPtr())-&gt;color_0.

Error:
  nvrtc 12.9: tests/cuda/optix-cluster.slang(17): error : expression
must have pointer-to-class type but it has type "void *"
  nvrtc 12.9: note :       (RayPayload_0
*)getOptiXRayPayloadPtr()-&gt;color_0 = color_1;
  nvrtc 12.9: note :                       ^

Tested using:
./build/Debug/bin/slangc -target ptx -Xnvrtc
-I"/home/haaggarwal/NVIDIA-OptiX-SDK-9.0.0-linux64-x86_64/include"
-DSLANG_CUDA_ENABLE_OPTIX  -entry closestHitShaderA
./tests/cuda/optix-cluster.slang

* Fix Check</content>
</entry>
<entry>
<title>Implement shader execution reordering support for OptiX (#7211)</title>
<updated>2025-05-26T15:30:38+00:00</updated>
<author>
<name>Harsh Aggarwal (NVIDIA)</name>
<email>haaggarwal@nvidia.com</email>
</author>
<published>2025-05-26T15:30:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=83538e0b4b97425ecdae6f72f9c8fd44cb255aac'/>
<id>urn:sha1:83538e0b4b97425ecdae6f72f9c8fd44cb255aac</id>
<content type='text'>
* Implement shader execution reordering support for OptiX

Added OptiX backend support for Shader Execution Reordering (SER) features as outlined in issue #6647. This implementation:

1. Added CUDA target support for HitObject API
2. Implemented core SER functionality (TraceRay, MakeHit/Miss, Invoke)
3. Added OptiX-specific hit object handling functions
4. Added test case for OptiX SER functionality

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Cleanups related to RIFF support (#7041)</title>
<updated>2025-05-12T17:28:05+00:00</updated>
<author>
<name>Theresa Foley</name>
<email>10618364+tangent-vector@users.noreply.github.com</email>
</author>
<published>2025-05-12T17:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4c76b275907cf2d764f3fc51468d1c58635a10c1'/>
<id>urn:sha1:4c76b275907cf2d764f3fc51468d1c58635a10c1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix various intptr_t issues by defining its width in `getIntTypeInfo` (#6786)</title>
<updated>2025-05-09T22:50:14+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-05-09T22:50:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=029672ee08f5ecb710e84cf1ccc625e826ff9a29'/>
<id>urn:sha1:029672ee08f5ecb710e84cf1ccc625e826ff9a29</id>
<content type='text'>
* Define a bit size for the intptr types

* Fix intptr_t sign

* Extend intptr test to check for previously broken operations

* Fix intptr vector test on CUDA

* Handle intptr size in getAnyValueSize

* Fix formatting

* Try with __ARM_ARCH_ISA_64

* On macs, int64_t != intptr_t

Yikes

* Move define to prelude header

* Also check apple in host-prelude

* Fix define location</content>
</entry>
<entry>
<title>Add Slang-specific intrinsics for integer pack/unpack (#6459)</title>
<updated>2025-02-28T21:23:29+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-02-28T21:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=efbfa7832afff7e6285713086259abda2456ed55'/>
<id>urn:sha1:efbfa7832afff7e6285713086259abda2456ed55</id>
<content type='text'>
* update hlsl meta

* update test

* use slang syntax in meta file

* improve meta file

* fix pack clamp u8

* remove builtin packed types, use typealias instead

* fix wgsl pack clamp

* fix formatting

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add packed 8bit builtin types (#5939)</title>
<updated>2024-12-27T07:52:49+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2024-12-27T07:52:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7cecc518e753a90d9b638e8dd1140730ab010ca7'/>
<id>urn:sha1:7cecc518e753a90d9b638e8dd1140730ab010ca7</id>
<content type='text'>
* Add packed bytes builtin type

* fix test</content>
</entry>
<entry>
<title>Move switch statement bodies to their own lines (#5493)</title>
<updated>2024-11-05T17:47:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-11-05T17:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b118451e301d734e3e783b3acdf871f3f6ea851c'/>
<id>urn:sha1:b118451e301d734e3e783b3acdf871f3f6ea851c</id>
<content type='text'>
* Move switch statement bodies to their own lines

* format

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Write only texture types. (#5454)</title>
<updated>2024-10-30T21:07:38+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-10-30T21:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=28f20f458c4f7f587556a1738d63b70e87c2b148'/>
<id>urn:sha1:28f20f458c4f7f587556a1738d63b70e87c2b148</id>
<content type='text'>
* Add support for write-only textures.

* Fix capabilities.

* Fix implementation.

* Fix.

* format code

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;
Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
</feed>
