<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/spirv/direct-spirv-emit.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-09-18T13:12:30+00:00</updated>
<entry>
<title>Use direct spirv in hello-world example. (#3207)</title>
<updated>2023-09-18T13:12:30+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-09-18T13:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8bcffcc085b996babedfeaee674c6ad09c9b08cf'/>
<id>urn:sha1:8bcffcc085b996babedfeaee674c6ad09c9b08cf</id>
<content type='text'>
* Use direct spirv in hello-world example.

* Use vulkan 1.1

* Use vulkan 1.2.

* fix.

* Fix test.

---------

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>SPIR-V WIP (#3064)</title>
<updated>2023-08-15T12:28:42+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2023-08-15T12:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=00bd481e001e8c0b8008eaff5a38fa37963e6f99'/>
<id>urn:sha1:00bd481e001e8c0b8008eaff5a38fa37963e6f99</id>
<content type='text'>
* Add type layout for structured buffer

* Default to generating spirv directly

* vk test for compute simple

* Add spirv-dis as a downstream compiler

* Emit Array types in SPIR-V

* makevector for spirv

* Dump whole spirv module on validation failure

* register array types

todo, use emitTypeInst

* Neater formatting for unhandled inst printing

* break out emitCompositeConstruct

* Correct array type generation

* neaten

* Allow getElement for vector

* Remove unused

* Allow predicating target intrinsics on types

* Consider functions with intrinsics to have definitions

We need to specialize these if they are predicated on types

* Correct array type generation

* makeArray for spir-v

* replace getElement with getElementPtr for spirv

* Correct translation of field access for spirv

* Push layouts to types for spirv

* Spirv intrinsics * operator now makes a pointer

* Add structured buffer of struct test

* Preserve type layout in spirv structured buffer legalization

* neaten

* makeVectorFromScalar for SPIRV

* placeholder for layouts on param groups

* More type safe spirv op construction

* Know that constants and types only go in one section

* Remove emitTypeInst

* Add todo for spirv sampling

* Add links to spirv documentation on emit functions

* OpTypeImage support for SPIR-V

* Add simpler texture test for spirv

* s/spirv_direct/spirv/g

* Allow several string literals in target_intrinsic

* Handle global params without a var layour for SPIR-V

For example groupshared vars

* uint spirv asm type

* Add todo for isDefinition

It is currently too broad

* Some atomic op spirv intrinsics

* Strip ConstantBuffer wrappers for spirv

* Add todo for matrix annotations

* Do not associate decorations insts with spirv counterparts

* Correct entry point parameter generation

* Spelling

* Assert that fieldAddress is returning a pointer

* Add error for existential type layout getting to spir-v emit

* Add IRTupleTypeLayout

Unused so far

* Allow getElementPtr to work with vectors

* Correct target name in test

* Hide default spirv direct behind a premake option --default-spirv-direct=true

* Do not insert space at start of intrinsic def

* Correct asm rendering in tests

* remove redundant option

* Emit directly from direct test

* Add source language options for spirv-dis

* Add comments to spirv dis

* Add dead debug print for before spirv module

* Correct asm rendering in tests

* s/spirv_direct/spirv/g

* Only specialize intrinsic functions with predicates

* regenerate vs projects

* squash warnings

* squash warnings

* remove duplication

* Silence warnings from msvc

* squash warnings

* Overload for zero sized array

* More msvc warnings

* warnings

* Add spirv-tools to path for tests

* Do not be specific about dxc version for diag test

* Normalize line endings from spirv-dis

* Correct filecheck matches

* Temporarily disable two spirv tests

Failing on CI, undebuggable hang :/

* Do not emit storage class more than once for spirv snippet

* Do not pass spir-v to spirv-dis by stdin

* Do not get spirv-dis output via stream, use file

* normalize file endings in spirv-dis output</content>
</entry>
<entry>
<title>Upgrade to Glslang 11.0.0 (#1466)</title>
<updated>2020-07-31T20:31:30+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2020-07-31T20:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4549597709e29b85b5f95503f4f2258c16db12be'/>
<id>urn:sha1:4549597709e29b85b5f95503f4f2258c16db12be</id>
<content type='text'>
* Fix premake5.lua so it uses the new path needed for OpenCLDebugInfo100.h

* Keep including the includes directory.

* Added the spirv-tools-generated files.

* We don't need to include the spirv/unified1 path because the files needed are actually in the spirv-tools-generated folder.

* Put the build_info.h glslang generated files in external/glslang-generated. Alter premake5.lua to pick up that header.

* First pass at documenting how to build glslang and spirv-tools.

* Improved glsl/spir-v tools README.md

* Added revision.h

* Change how gResources is calculated.
Update about revision.h

* Update docs a little.

* Split out spirv-tools into a separate project for building glslang. This was not necessary on linux, but *is* necessary on windows, because there is a file disassemble.cpp in spirv-tools and in glslang, and this leads to VS choosing only one. With the separate library, the problem is resolved.

* Fix direct-spirv-emit output.

* Update to latest version of spirv headers and spirv-tools.

* Upgrade submodule version of glslang in external.

* Add fPIC to build options of slang-spirv-tools

* Upgrade slang-binaries to have new glslang.

* Fix issues with Windows slang-glslang binaries, via update of slang-binaries used.

* Small improvements to glslang building process documentation.

Co-authored-by: Tim Foley &lt;tfoleyNV@users.noreply.github.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>
