<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/slang-gfx.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>2024-07-17T17:53:19+00:00</updated>
<entry>
<title>Move the file public header files to `include` dir (#4636)</title>
<updated>2024-07-17T17:53:19+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-07-17T17:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2db15080085856ed9b5f20642dbb354aac59a888'/>
<id>urn:sha1:2db15080085856ed9b5f20642dbb354aac59a888</id>
<content type='text'>
* Move the file public header files to `include` dir

Close the issue (#4635).

Move the following headers files to a `include` dir
located at root dir of slang repo:

 slang-com-helper.h -&gt; include/slang-com-helper.h
 slang-com-ptr.h -&gt; include/slang-com-ptr.h
 slang-gfx.h -&gt; include/slang-gfx.h
 slang.h -&gt; include/slang.h

Change cmake/SlangTarget.cmake to add include path to
every target, and change the source file to use
"#include &lt;slang.h&gt;" to include the public headers.

The source code update is by the script like follow:

```
fileNames_slang=$(grep -r "\".*slang\.h\"" source/ -l)

for fileName in "${fileNames_slang[@]}"
do
    echo "$fileName"
    sed -i "s/\".*slang\.h\"/\"slang\.h\"/" $fileName
done
```

* Fix the test issues

* Fix cpu test issues by adding include seach path

* Update cmake to not add include path for every target

Also change "#include &lt;slang.h&gt;" to "include "slang.h" " to
make the coding style consistent with other slang code.

* Change public include to private include for unit-test and slang-glslang</content>
</entry>
<entry>
<title>Ray tracing validation (#4418)</title>
<updated>2024-06-27T15:25:07+00:00</updated>
<author>
<name>ccummingsNV</name>
<email>ccummings@nvidia.com</email>
</author>
<published>2024-06-27T15:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1d4db4224bd981b54b1e5f260a232a1183bbdcda'/>
<id>urn:sha1:1d4db4224bd981b54b1e5f260a232a1183bbdcda</id>
<content type='text'>
* Ray tracing validation in Vulkan

* Clean up RT validation code

* Remove redundant api additions

* Remove redundant debug utils callback

* Ray tracing validation uses extended descriptor for initialization

---------

Co-authored-by: Chris Cummings &lt;chriscummings@nvidia.com&gt;
Co-authored-by: Jay Kwak &lt;82421531+jkwak-work@users.noreply.github.com&gt;
Co-authored-by: skallweitNV &lt;64953474+skallweitNV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[gfx] Metal graphics support (#4324)</title>
<updated>2024-06-10T16:12:01+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-06-10T16:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6857dd57549f01daa025f45221a693259e474958'/>
<id>urn:sha1:6857dd57549f01daa025f45221a693259e474958</id>
<content type='text'>
* fix double semicolons

* fix another double semicolon

* wait for init data upload

* remove obsolete setData

* refactor swapchain to work on virtual back buffers

* buffer/texture use breakable device reference

* refactor input layout

* create render command encoder

* add todo

* refactor framebuffer layout

* refactor framebuffer

* refactor shader program

* translatePrimitiveType

* add more translate functions

* refactor framebuffer

* refactor render pass

* implement graphics pipeline state

* add depth stencil state

* initial render command encoder support

* comment</content>
</entry>
<entry>
<title>add support for callable shaders in gfx (#3460)</title>
<updated>2024-05-28T00:05:12+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-05-28T00:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=eefdd4ab99fa99ed326b68cd2b0d4024347ed8fc'/>
<id>urn:sha1:eefdd4ab99fa99ed326b68cd2b0d4024347ed8fc</id>
<content type='text'>
Co-authored-by: Jay Kwak &lt;82421531+jkwak-work@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>[gfx] metal backend skeleton (#4223)</title>
<updated>2024-05-27T13:03:13+00:00</updated>
<author>
<name>Simon Kallweit</name>
<email>simon.kallweit@gmail.com</email>
</author>
<published>2024-05-27T13:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d9443d670ef8413971fe7c3f02368b60a7fc5904'/>
<id>urn:sha1:d9443d670ef8413971fe7c3f02368b60a7fc5904</id>
<content type='text'>
* add metal-cpp submodule

* add metal-cpp cmake target

* gfx metal backend skeleton

* add premake support

* add foundation framework

* add metal-cpp include to premake

* update vs project file

---------

Co-authored-by: Simon Kallweit &lt;skallweit@nvidia.com&gt;
Co-authored-by: Jay Kwak &lt;82421531+jkwak-work@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[gfx] specify resource view buffer range in bytes (#4149)</title>
<updated>2024-05-13T22:39:49+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-05-13T22:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9f23046138629f78995d54a7722ad6749bd84db9'/>
<id>urn:sha1:9f23046138629f78995d54a7722ad6749bd84db9</id>
<content type='text'>
* refactor gfx buffer range to use byte range

* create buffer view with zero struct stride for ClearUnorderedAccessViewUint/Float

* create buffer descriptors on demand

* avoid copying gfx.dll

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>add missing Result to IRayTracingCommandEncoder::bindPipline (#4148)</title>
<updated>2024-05-11T22:11:44+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-05-11T22:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e0054151b5b1b4bc44312e3ca737aa2a9a04ff35'/>
<id>urn:sha1:e0054151b5b1b4bc44312e3ca737aa2a9a04ff35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement GLSL gimageDim &amp; memory qualifiers with optional extension(s); resolves #3587 for GLSL &amp; SPIR-V targets #3631 (#3810)</title>
<updated>2024-03-26T20:07:32+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-03-26T20:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0877d1a3e9d69fdbf4087581df96954e56e4dd97'/>
<id>urn:sha1:0877d1a3e9d69fdbf4087581df96954e56e4dd97</id>
<content type='text'>
* [early push of code since memory qualifiers may be made into a seperate branch &amp; pr and I rather make it simple to split the implementation if required]

all type &amp; functions impl. for GLSL image type

added all memory qualifiers &amp; tests for direct read/write [GLSL syntax] (DID NOT test or implement parameter qualifiers, that is next commit)
* this inlcudes emit-glsl &amp; emit-spirv for qualifier decorations
* this also includes error handling
* this includes parsing

* full implementation other than Rect; all errors and basic tests are done &amp; working

what is left:
1. need to now add Rect type support (additional TextureImpl flag)
2. tests
3. testing infrastructure to support variety of types

* testing framework now works with images of all types and imageBuffers -- next steps are actual tests

* push code for mostly working image atomics; missing int64/uint64 tests and slightly broken feature

likley due to missing code from master which I pushed for regular atomics

* fix all remaining shader image atomic issues and tests to work with float &amp; i64/u64 fully

will now clean up code and squash the commits (since they are quite all over the place)

* refactor code to work &amp; look correct, fix all regressions

Turned off tests for texture format R64 due to the shader use limitation of currently being only for storage buffers on most hardware (test fail cause, this is not allowed)

Changed raygen.slang &amp; nv-ray-tracing-motion-blur.slang since both cross-compiled with glslang, which does not respect layout(rgba8) for RWBuffer's, in this scenario making the type into a SPIR-V rgba32f, which is incorrect and a known problem, this causes different code to be outputted from Slang &amp; HLSL+GLSL-&gt;Slang paths

Clean up all code and better explain the "why" for the gimageDim definition we use various strings of Slang code, the gist is:
1. Parameters are structured as per IMAGE_PARAM keyword in spec, and we respect this in order to match specification (to allow easy code iteration)
2. sample parameters are required for functions
3. types are inconsistently named

fixed regression of breaking l-value lowering when r-value should be lowered (lower-to-ir)

fix compiler warnings

remove unneeded lambdas

`expr-&gt;type.isLeftValue = isMutableGLSLBufferBlockVarExpr(baseExpr) &amp;&amp; (expr-&gt;type.hasReadOnlyOnTarget == false);` is an adjustment made such that a buffer block is mutable only if the block is mutable and the base expression is mutable (to handle case of readonly buffer block, immutable)

* remove rectangle parameter

* use proper const syntax and struct naming

* adjust syntax

* adjust modifier capabilitites: HLSL+GLSL --&gt; GLSL. Notice most specifically, if the parent is a global struct we can put a memory qualifier, this does not include, struct inside a struct, with a member variable with a memory qualifier (since then you could use the struct in invalid ways). Added test for struct inside struct with member variable with memory qualifier.

adjust syntax and remove code which will rot

* adjust formatting for consistency

* addressing review feedback

addressing review feedback:

change testing code to handle int and float/half correctly in all cases

adjust testing code syntax as requested

change vkdevice code to fit a different form as requested

* adjust code as per requested for review:

1. adjusted testing code logic to handle non 0-1 values appropriately, notice int8_t will likley be the range and set order of {[0,127],[-1,-128]}, this is intentional
2. syntax adjustments for correctness

* trying to fix falcor regressions

* add back removed code for regression testing

* test removing changes which may break falcor

* Revert "test removing changes which may break falcor"

This reverts commit 240da97f06c23e98a26ac23cf1d385995c67b251.

* disable R64 support in attempt to fix falcor tests

* Revert "disable R64 support in attempt to fix falcor tests"

This reverts commit 317cb632eb2f47e980fc4aeafe418f8060f4c473.

* disable major device changes (still trying to figure out falcor fails -- locally working different than CI)

* test removing d3d changes

* remove all format changes

* add back removed code for regression testing

* try something to get code to work with falcor

* address review

* Add way to handle constref/ref/encapsulated texture objects with memory qualifiers as a parameter.

Fixed an issue (and improved codegen) for when we have a store(dst,load(src)) pattern, where dst is supposed to be equal to src for when resolving globalParam's (no need for work-arounds anymore)

* move recent-fix/change to textureType loading into a proper optimization pass which now runs after SPIR-V legalization to catch odd SPIR-V emitting after legalizing types for SPIR-V

* Revert most recent optimization pass change, add work around getting a unmangled global parameter address through a intrinsic op instead of spir-v intrinsic (works same as `__imagePointer()`)

* remove unneeded changes

* remove unneeded `__constref` in glsl.meta

* move memory qualifier checks to visitInvoke of check-expr.cpp

move GetLegalizedSPIRVGlobalParamAddr resolving to spirv-legalization pass

move error for "if using non texture type with memory qualifer in param" earlier such that we error with this first. No point in telling user "you are not putting correct memory qualifiers" when memory qualifiers should not have been used.

* add memory qualifier folding modifier 'MemoryQualifierCollectionModifier' to reduce searching and processing (later will be adapted to whole system) as suggested/asked.

The utility is a method to track memory qualifiers without doing a expensive linked-list traversal (image's have 4 modifiers normally).

* properly pass multiple qualifiers from checkModifier down to the `modifier`s list

* addressing review comments:

* change implementation to properly handle restrict modifier

* add comments about implementation for clarity</content>
</entry>
<entry>
<title>[SPIRV] Add NonSemanticDebugInfo for step-through debugging. (#3644)</title>
<updated>2024-02-29T06:57:07+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-02-29T06:57:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=73a61edda8893901acad05bb4e7d3110db5041a8'/>
<id>urn:sha1:73a61edda8893901acad05bb4e7d3110db5041a8</id>
<content type='text'>
* [SPIRV] Add NonSemanticDebugInfo for step-through debugging.

* Fix.

* Fix.</content>
</entry>
<entry>
<title>switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain (#3627)</title>
<updated>2024-02-26T23:32:03+00:00</updated>
<author>
<name>Simon Kallweit</name>
<email>simon.kallweit@gmail.com</email>
</author>
<published>2024-02-26T23:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4f03eb9d657fd74da341bb2b0d391c6b855073af'/>
<id>urn:sha1:4f03eb9d657fd74da341bb2b0d391c6b855073af</id>
<content type='text'>
* switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain

* fix window content size on macos

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
