<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/external/spirv, 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-01-30T01:42:28+00:00</updated>
<entry>
<title>Update SPIRV submodules and fix tests (#6222)</title>
<updated>2025-01-30T01:42:28+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-01-30T01:42:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cbcb97a64c0b7b908fc7be565b0d6141d2f1a1f7'/>
<id>urn:sha1:cbcb97a64c0b7b908fc7be565b0d6141d2f1a1f7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow bitwise or expressions and numeric literals in spirv_asm blocks (#3157)</title>
<updated>2023-08-28T22:05:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2023-08-28T22:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=508dc3a95de50de4a4d07d0a72a18e40d55b0e2e'/>
<id>urn:sha1:508dc3a95de50de4a4d07d0a72a18e40d55b0e2e</id>
<content type='text'>
* Add -spirv-core-grammar option to load alternate spirv defs

Also embed a version to use by default

* Use perfect hash for spv op lookup

* Neaten perfect hash embedding

* Refactor spirv grammar lookup in preperation for more kinds of lookups

* Load spirv capability list from spec

* Add all SPIR-V enums to lookup table

* regenerate vs projects

* appease msvc

* Use string slices for spir-v core grammar lookups

* wiggle

* comment

* Add OpInfo for spv ops

* regenerate vs projects

* Embed op names

* Add min/max operand counts and enum categories to spirv info

* neaten

* Operand kinds for spirv ops

* Store and embed all information relating to spirv enums and qualifiers

* Use SPIR-V spec to position instructions in spirv_asm blocks

* Neaten spir-v info embedding

* Neaten perfect hash embedding

* Add assignment syntax to spirv_asm snippets

* Better errors for spirv_asm parser

* Add warning for too many operands in spirv asm

* squash warnings

* neaten

* test wiggle

* Lookup enums for spirv

* Put OpCapability and OpExtension in the correct place for spirv_asm blocks

* Tests for OpCapability and OpExtension

* ci wiggle

* Add expected failure

* Allow raising immediate values to constant ids where necessary in spirv_asm blocks

* Allow bitwise or expressions and numeric literals in spirv_asm blocks

* test numeric literals

* Fix memory issues.

* fix.

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Support SPIRV Capability declaration on intrinsic functions. (#3150)</title>
<updated>2023-08-25T15:49:02+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-08-25T15:49:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=036abc85ba1db9c8c06289f0a0492e9a95a228b9'/>
<id>urn:sha1:036abc85ba1db9c8c06289f0a0492e9a95a228b9</id>
<content type='text'>
* Spirv Capability lookup.

* Fix.

---------

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Initial work on direct emission of SPIR-V (#1118)</title>
<updated>2019-11-14T21:11:07+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2019-11-14T21:11:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ce4829b03622c7c23096253b0ee80b0fc923321e'/>
<id>urn:sha1:ce4829b03622c7c23096253b0ee80b0fc923321e</id>
<content type='text'>
* Initial work on direct emission of SPIR-V

This change adds a first vertical slice of support for emitting SPIR-V code directly from the Slang IR, instead of generating it indirectly via GLSL.
This work isn't usable for anything valuable right now; the goal is just to get something checked in that we can incrementally extend over time.

When invoking `slangc`, the `-emit-spirv-directly` option can be used to turn on the new code path.
I have not bothered to add an equivalent API option, because this flag is only intended to be used for testing in the immediate future.

The existing `emitEntryPoint()` function has become `emitEntryPointSource()` to more accurately reflect its role in a world where we can also emit entry points to a binary format.

Much of the logic that was inside `emitEntryPoint()` had to do with linking and then optimizing/transforming Slang IR code to get it ready for emission on a particular target.
This logic has been factored into a new `linkAndOptimizeIR()` function that can be shared between the path that emits source and the new one that emits SPIR-V.

The meat of the change is then the `emitSPIRVFromIR()` function in `slang-emit-spirv.cpp`, which is called *after* all the optimizations and transformations have been applied to the Slang IR to get it ready.
Rather than repeat myself here, I will try to make the comments in `slang-emit-spirv.cpp` usable as documentation of the approach being taken.

Smaller notes:

* I've included a test case that compares `slangc` output directly to expected SPIR-V. This is perhaps not an ideal plan for how to test SPIR-V emission going forward, but it suffices for now.

* The `external/` directory needed to be added to the include dirs for the `slang` project so that the new code can depend on the SPIR-V header.

* In `slang-ir-link`, the direct SPIR-V generation path means that we now link with a target of SPIR-V instead of GLSL. In principle this can be used to ensure that appropriate variants of intrinsics are selected based on the knowledge that we are emitting SPIR-V. In practice, that isn't being used at all.

* Fixup: path for SPIR-V headers

While working on this PR I used a copy of `spirv.h` that I placed into the repository tree manually, but since I started the work we ended up with SPIR-V headers in our tree anyway, albeit at a different path.

This change tries to fix things up so that my code uses the headers that were already placed in the repository.

* fixup; 64-bit build issue

* fixup: typo fixes based on review
</content>
</entry>
</feed>
