<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/ir/string-literal.slang.expected, 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>2023-11-15T01:46:05+00:00</updated>
<entry>
<title>Add GLSL Compatibility. (#3321)</title>
<updated>2023-11-15T01:46:05+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-11-15T01:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=12f7237e4060388494c549623f4a640327b7ca08'/>
<id>urn:sha1:12f7237e4060388494c549623f4a640327b7ca08</id>
<content type='text'>
* Parse glsl buffer blocks to GLSLInterfaceBlockDecl

* Parse glsl local size layout declarations

* Parse (and ignore) glsl version directives

* spelling

* Better l-value interpretation for glsl interface blocks

* Better l-value interpretation for glsl interface blocks

* Add compile flag for enabling glsl

* Parse and ignore precision modifiers.

* Automatically import `glsl` module for compatiblity.

* Complete vector and matrix types for glsl

* Remove generated file from repo

* Bump .gitignore

* do not mark out globals as params

* Synthesize entrypoint layout from global inout vars.

* update test result.

* Allow HLSL semantic on global variables.

* Fix.

* Fix test.

* Fix win32 compile error.

* Add more builtin input/output and texture intrinsics.

* Add struct/array constructor syntax.

* Skip `#extension` lines.

* overide operator * for matrix/vector multiplication.

* Add `matrixCompMult`.

* Parse modifiers in for loop init var declr.

* Add more glsl intrinsics, add stage into to var layout.

* Allow `int[3] x` syntax.

* Fix array type syntax.

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;
Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Add Loop Unrolling Pass. (#2644)</title>
<updated>2023-02-13T18:38:14+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-02-13T18:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4dbc74a953ae1b34ce64a4eaef3aa7feb73663b9'/>
<id>urn:sha1:4dbc74a953ae1b34ce64a4eaef3aa7feb73663b9</id>
<content type='text'>
Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Preserve specialization cache in IR for specialization pass. (#2293)</title>
<updated>2022-06-23T19:41:05+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-06-23T19:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4aa6344f772d31c1f7b0676cbaf315104c4b30a2'/>
<id>urn:sha1:4aa6344f772d31c1f7b0676cbaf315104c4b30a2</id>
<content type='text'>
* Perserve specialization cache in IR for specialization pass.

* Fix compile error.

* Fix.

* Fix.

* Fix test case.

* Fix.

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Clean up void returns. (#2260)</title>
<updated>2022-06-02T05:29:10+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-06-02T05:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=bc6bc56db51d06b92dc63ef9c9e0def6c9760c9e'/>
<id>urn:sha1:bc6bc56db51d06b92dc63ef9c9e0def6c9760c9e</id>
<content type='text'>
* Clean up `IRReturnVoid`.

* Update gitignore.

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Generalize heterogenous code emit (#1968)</title>
<updated>2021-10-19T20:07:29+00:00</updated>
<author>
<name>David Siher</name>
<email>32305650+dsiher@users.noreply.github.com</email>
</author>
<published>2021-10-19T20:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ba081c89a60d6207a6534c2ad256945490196661'/>
<id>urn:sha1:ba081c89a60d6207a6534c2ad256945490196661</id>
<content type='text'>
* Bring heterogeneous-hello-world back up to date.

* Reintroduced heterogeneous-hello-world into the premake

* No longer uses compiled bytecode for entry point, instead a loadModule
call is hardocoded with the slang file name.

* Entry point is, similarly, hardcoded for now.

* Added a bypass to slang-legalize-types for an unneeded GPUForeach check

* Run premake and change to relative path

* Removed experimental and added README

* Add prebuild command to premake for heterogeneous example

* Pass in entry point as parameter (also remove shader bytecode)

* Pass in module name as parameter

* Squashed commit of the following:

commit 5b13b57fe600724344c556fe4309a5d6bb3d39ab
Author: Kai Yao &lt;kyao@nvidia.com&gt;
Date:   Thu Oct 7 23:38:50 2021 -0700

    Return diagnostics data when encountering module load error by exception (#1966)

commit 112e1515c30fa972ff56f91514b70946153c718c
Author: jsmall-nvidia &lt;jsmall@nvidia.com&gt;
Date:   Thu Oct 7 16:12:29 2021 -0400

    Disable test crashing CI (#1965)

    * #include an absolute path didn't work - because paths were taken to always be relative.

    * Disable test that appears to be crashing.

commit da32069a0c1c8c723d7ef45100049a8f0dd5d9c4
Author: Kai Yao &lt;kyao@nvidia.com&gt;
Date:   Mon Oct 4 13:58:51 2021 -0700

    Modified barrier API to accept multiple resources per call (#1959)

    Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;

commit 97bb82ebcdf8f1391b9d93b5a8d7b1dfc4e88e52
Author: jsmall-nvidia &lt;jsmall@nvidia.com&gt;
Date:   Mon Oct 4 14:15:51 2021 -0400

    Removing exceptions from core/compiler-core (#1953)

    * #include an absolute path didn't work - because paths were taken to always be relative.

    * Refactor Stream. Working on all tests.

    * Split out CharEncode.

    * Make method names lower camel.
    m_prefix in Writer/Reader

    * Tidy up around CharEncode interface.

    * Small improvements around encode/decode.

    * Better use of types.

    * Remove readLine from TextReader.

    * Remove exceptions from Stream/Text handling.

    * Fix some typos.

    * Fix tabbing.

    * Fix missing override.

    * Remove remaining exception throw/catch via using signal mechanism.

    * Remove exceptions that are not used anymore.

    * Document the Stream interface.

    * Remove index for decoding 'get byte' function.

    * Fix CharReader -&gt; ByteReader.

commit b3dfe383c6d31ff3dbd76dcfb32de8d536382f3e
Author: lucy96chen &lt;47800040+lucy96chen@users.noreply.github.com&gt;
Date:   Mon Oct 4 09:46:33 2021 -0700

    Get native handles for TextureResource and BufferResource (#1960)

    * Added getNativeHandle() to TextureResource and BufferResource; Implemented getNativeHandle() in Vulkan and D3D12; Added new unit test files for the aforementioned implementation

    * Added missing getNativeHandle() implementations to renderer-shared.cpp and CUDA

    * Finished new getNativeHandle() unit tests for ITextureResource and IBufferResource; Modified ICommandQueue and ICommandBuffer unit tests to call QueryInterface to convert to IUnknown then back and compare resulting pointers for equality

    * Unit tests updated and pass locally

    * Cast m_buffer.m_buffer and m_image to uint64_t

commit 35bca4cc432613af3926da3bed217a6baa9cbd26
Author: lucy96chen &lt;47800040+lucy96chen@users.noreply.github.com&gt;
Date:   Fri Oct 1 13:08:25 2021 -0700

    Add getNativeHandle() to ICommandQueue and ICommandBuffer (#1952)

    * Added support for getting command buffer and command queue handles to ICommandBuffer and ICommandQueue; D3D12Device, VkDevice, and DebugDevice modifieid to implement this new functionality; immediate-renderer-base.cpp also modified to implement the new functions

    * Removed excess boilerplate

    * Changed readRef() to get() in D3D12 getNativeHandle() implementation for ICommandBuffer and ICommandQueue

    * Added unit tests for new getNativeHandle() implementations, unfinished

    * Queue test added; Minor cleanup changes

    * getBufferHandleTestImpl() now closes the command buffer before returning

    * Added getNativeHandle() implementations to CUDADevice

    * Added comment clarifying that the Vulkan check is checking for a null handle, which is defined to be 0

commit 6c6200f547c7387598743b23bb3c8f0d375d9494
Author: Kai Yao &lt;kyao@nvidia.com&gt;
Date:   Thu Sep 30 20:25:34 2021 -0700

    VK Resource Barrier (#1955)

    * Resource barrier API and VK implementation

    * Stub implementations

    * Handle VK Acceleration Structure flag

    * Add a couple more cases to pipeline barrier stages

commit 627fc976bac5c2381dbace9c7925cb6a68b8de12
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Thu Sep 30 19:48:47 2021 -0700

    Fix aarch64 build on github (#1957)

    Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;

commit 122d701513e116856bd59c999221ce36a373d7db
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Thu Sep 30 17:51:56 2021 -0700

    Fix GitHub release (#1956)

    * Fix aarch64 release build config.

    * Fix for WinAarch64 build.

    * Update premake for embed-std-lib build on aarch64.

    * `platform` fix for aarach64 build.

    * Try revert back to use absolute output path for slang-stdlib-generated.h

    * Fix

    * fix

    Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;

commit aa8f7b899b7b562b3d3c6e25c3da41569505e70c
Author: Chad Engler &lt;englercj@live.com&gt;
Date:   Wed Sep 29 13:02:47 2021 -0700

    Fix ARM64 detection for MSVC (#1951)

commit 6736b0c1c5fa3e89bc561eb7965a1a0d17af3466
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Wed Sep 29 11:29:46 2021 -0700

    Add ISession::loadModuleFromSource. (#1950)

    Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;

commit d8e452412e14a6a8ba137f2adcae13b398e5cecb
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Tue Sep 28 15:03:03 2021 -0700

    Fix AbortCompilationException leaking through loadModule API. (#1949)

    * Fix AbortCompilationException leaking through loadModule API.

    * Update.

    * Fix.

    Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;

commit cdf1b2c007fefdca128584d2a9f63dec3d350e16
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Tue Sep 28 11:54:24 2021 -0700

    Improvements to the unit test framework. (#1948)

commit af788b62e18bbd55cd748ad60400a74cf1bc93ee
Author: lucy96chen &lt;47800040+lucy96chen@users.noreply.github.com&gt;
Date:   Fri Sep 24 16:53:41 2021 -0700

    Add existing device handle support unit test (#1946)

commit bec8e6aec85b6e3f875c58bdd59eb15613978358
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Fri Sep 24 11:33:44 2021 -0700

    Move existing unit tests to a standalone dll. (#1945)

commit f2a3c933bc11a498c622fa18694c84beca8ca031
Author: lucy96chen &lt;47800040+lucy96chen@users.noreply.github.com&gt;
Date:   Thu Sep 23 12:19:49 2021 -0700

    Add method to retrieve native handles (#1944)

    * Added a getNativeHandle() method that retrieves the natively created handles; Modified RendererBase, VKDevice, D3D12Device, and DebugDevice to implement this new method

    * Moved ExistingDeviceHandles out of Desc directly inside IDevice and renamed to NativeHandles; Modified calls accessing the struct accordingly in RendererBase, DebugDevice, VKDevice, and D3D12Device

    * Minor cleanup changes (renames, etc.)

commit b9b398d038b524f15a86ff27cd6888d54e8754e0
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Wed Sep 22 10:06:59 2021 -0700

    Add gfx unit testing framework. (#1943)

    * Add gfx unit testing framework.

    * Fix compilation error.

    * Reset gfxDebugCallback after render_test.

    * Pass enabledApi flags through.

    * Fix for code review suggestions.

    Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;

commit 6e9cee69b3588ddae09b08b9f580f59ad899983f
Author: lucy96chen &lt;47800040+lucy96chen@users.noreply.github.com&gt;
Date:   Tue Sep 21 18:46:32 2021 -0700

    Support for existing device/instance handles in Vulkan (#1942)

commit b1f04c8544c650de3947955ca68f679535d249aa
Author: lucy96chen &lt;47800040+lucy96chen@users.noreply.github.com&gt;
Date:   Wed Sep 15 20:22:45 2021 -0700

    Allow D3D12Device to use an existing device handle (#1940)

    * Added a new field for an existing device handle to IDevice::Desc; Modified D3D12Device::initialize to set the device stored in desc if it already exists instead of creating a new one

    * Turned existingDeviceHandle into a struct containing an array of two elements; Updated D3D12Device::initialize to match changes to existingDeviceHandle; Updated comments

    * Fixed style error for ExistingDeviceHandles struct

commit 2f7b9f5ae8be21c6c1d75ae9caefbc7b3f8986a9
Author: Pablo Delgado &lt;private@pablode.com&gt;
Date:   Thu Sep 16 01:17:57 2021 +0200

    Fix incorrect WIN32 macros and missing Windows.h inclusion (#1939)

    * Replace WIN32 preprocessor macros with _WIN32

    * Add missing Windows.h include for InterlockedIncrement

commit 11d43642008905ac69a3832eb8a9b2ae7b785f86
Author: Yong He &lt;yonghe@outlook.com&gt;
Date:   Tue Sep 14 11:36:44 2021 -0700

    Avoid upcasting to f32 in 16bit float-uint bit cast. (#1938)

    Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;

commit 502aa3812a82cf0d091cff0c67804e4ee448ac78
Author: David Siher &lt;32305650+dsiher@users.noreply.github.com&gt;
Date:   Tue Sep 14 12:59:55 2021 -0400

    Bring heterogeneous-hello-world back up to date. (#1935)

    * Bring heterogeneous-hello-world back up to date.

    * Reintroduced heterogeneous-hello-world into the premake

    * No longer uses compiled bytecode for entry point, instead a loadModule
    call is hardocoded with the slang file name.

    * Entry point is, similarly, hardcoded for now.

    * Added a bypass to slang-legalize-types for an unneeded GPUForeach check

    * Run premake and change to relative path

    * Removed experimental and added README

    Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;

* Revert "Squashed commit of the following:"

This reverts commit 4f665858d65f7c332c616ef6db9fdafa1c5e0b9f.

* Run premake

* Remove prebuild command (only works on Windows?)

* Rerun premake

* Fix heterogeneous prebuild command

* Remove linux specific prebuild command

* Fix prebuild command (again)

* Change target from dxbc to hlsl to see if that fixes linux issues

* Use Path::getFileNameWithoutExt

* Change string-literal.slang.expected to have extra filename in decoration

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Append proper suffixes to 16-bit literals for GLSL (#1767)</title>
<updated>2021-03-26T17:53:58+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2021-03-26T17:53:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=129faf8c4af4a57b7f1c71749f45b31aebfab038'/>
<id>urn:sha1:129faf8c4af4a57b7f1c71749f45b31aebfab038</id>
<content type='text'>
* Append proper suffixes to 16-bit literals for GLSL

The GLSL output path wasn't putting suffixes on literals of 16-bit types, and that was leading to compilation errors in downstream `glslang`. This change adds the suffixes defined by `GL_EXT_shader_explicit_arithmetic_types`.

This change also wraps up 8-bit literals so that they are emitted as, e.g., `int8_t(1)` instead of just `1`, to make sure we don't have implicit conversions in the output GLSL that weren't implicit in the Slang IR. We similarly wrap floating-point special values like infinities in their desired types when the type is `float` (e.g., `double(1.0 / 0.0)` for a double-precision infinity).

Note: Standad IEEE 754 half-precision doesn't provide an encoding for infinite or not-a-number values, so it might be considered an error if we emit `half(1.0 / 0.0)` but there really isn't a significantly better alternative for us to emit.

* fixup</content>
</entry>
<entry>
<title>Ensure labels are dumped in `lower-to-ir` (#1459)</title>
<updated>2020-07-24T23:37:51+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2020-07-24T23:37:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=261fe7587d7413070a4e0f29e1a1bb7b0d2b5429'/>
<id>urn:sha1:261fe7587d7413070a4e0f29e1a1bb7b0d2b5429</id>
<content type='text'>
* Ensure labels are dumped  in `lower-to-ir`.

There is a `dumpIR` function that accepts a label parameter already in slang-emit.cpp. This change moves it to slang-ir.cpp so it may be called from other files.

* update expected test result

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;
Co-authored-by: Tim Foley &lt;tfoleyNV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Change handling of strings for HLSL/GLSL targets (#1204)</title>
<updated>2020-02-07T16:45:32+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2020-02-07T16:45:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=af84d85799758234110fc42f0ba5c771dacb5fe3'/>
<id>urn:sha1:af84d85799758234110fc42f0ba5c771dacb5fe3</id>
<content type='text'>
* Change handling of strings for HLSL/GLSL targets

This change switches our handling of string literals and `getStringHash` to something that is more streamlined at the cost of potentially being less general/flexible.

* `String` is now allowed as a parameter type in user-defined functions

* `getStringHash` is now allowed to apply to `String`-type values that aren't literals

* The list of strings in an IR module is now generated during IR lowering as part of lowering a string literal expression, rather than being defined by recursively walking the IR of the module looking for `getStringHash` calls. The public API still refers to these as "hashed" strings, but they are realistically now "static strings."

* When emitting code for HLSL/GLSL, the `String` type emits as `int`, and `getStringHash(x)` emits as `x`.

In terms of implementation, the choice was whether to translate `String` over to `int` in an explicit IR pass, or to lump it into the emit pass. While adding the logic to emit clutters up an already complicated step, it is ultimately much easier to make the change there than to write a clean IR pass to eliminate all `String` use.

Note that other targets that can handle a more full-featured `String` type are *not* addressed by this change and thus do not support `String` at all. It may be woth emitting `String` as `const char*` on those targets, and emitting string literals directly, but the `getStringHash` function would need to be implemented in the "prelude" then, and we probably want to pick a well-known/-documented hash algorithm before we go that far.

This change also brings along some some clean-ups to the `gpu-printing` example, since it can now take advantage of the new functionality of `String`.

* Fix up tests for new string handling

* Add global string literal list to string-literal test (since we now list *all* static string literals and not just those passed to `getStringHash`)

* Disable `getStringHash` test on CPU, since we don't have a working `String` on that platform right now (only HLSL/GLSL)

Co-authored-by: Tim Foley &lt;tim.foley.is@gmail.com&gt;
</content>
</entry>
<entry>
<title>Feature/decor entry point name (#1073)</title>
<updated>2019-10-09T18:24:00+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-10-09T18:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9a09e2ed2c06ac5532488c418badec98ef362ca9'/>
<id>urn:sha1:9a09e2ed2c06ac5532488c418badec98ef362ca9</id>
<content type='text'>
* Use name hint on EntryPoint naming.

* Placed the entry point name on the EntryPointDecoration.
</content>
</entry>
<entry>
<title>Feature/ir entry point profile (#1068)</title>
<updated>2019-10-08T12:37:53+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-10-08T12:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=dc1e735bbc6a35d4a1d5c1ec720a7a95c0555f49'/>
<id>urn:sha1:dc1e735bbc6a35d4a1d5c1ec720a7a95c0555f49</id>
<content type='text'>
* Split out EntryPointParamDecoration.

* Add profile to EntryPointDecoration.

* WIP for GS handling for GLSL.

* WIP for StreamOut GLSL

* Fixed GLSL geometry output.

* Clean up - remove unneeded/commented out code from the entry point change.

* Use Op nums to identify GeometryTypeDecorations (as opposed to contained enum).
</content>
</entry>
</feed>
