<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-compiler-options.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>2025-08-21T05:47:18+00:00</updated>
<entry>
<title>Introduce CDataLayout &amp; -fvk-use-c-layout (#8136)</title>
<updated>2025-08-21T05:47:18+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-08-21T05:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=35f8e092f2aa3ed5e3cf03387e712f798ff4850e'/>
<id>urn:sha1:35f8e092f2aa3ed5e3cf03387e712f798ff4850e</id>
<content type='text'>
Closes #8112. ~~The issue asks for a "C layout", but in this PR I use
the term "CPU layout" because this naming was pre-existing in the
codebase as `kCPULayoutRulesImpl_`. The primary purpose of this layout
is to match CPU-side struct definitions with the shader side. I'm open
to better naming suggestions, though.~~

Edit: switched back to using `CDataLayout` &amp; `-fvk-use-c-layout`, as the
CPU target depends on the object layout rules of existing CPU layout
rules, but they're incompatible with actual shaders. So a new
`kCLayoutRulesImpl_` was needed anyway.

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Add arguments for controlling floating point denormal mode  (#7461)</title>
<updated>2025-07-01T07:41:52+00:00</updated>
<author>
<name>aidanfnv</name>
<email>aidanf@nvidia.com</email>
</author>
<published>2025-07-01T07:41:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d50c3f34a2eda5bf5e278c78d32cc9923fd83b82'/>
<id>urn:sha1:d50c3f34a2eda5bf5e278c78d32cc9923fd83b82</id>
<content type='text'>
* Implement -fp-denorm-mode slangc arg

* Split fp-denorm-mode into 3 args for fp16/32/64

* Remove redundant option categories

* Use emitInst for multiple of the same OpExecutionMode

* Fix formatting

* Remove -denorm any

* Re-add option categories

* emitinst for ftz

* Use enums for type text

* Remove extra categories again

* Add tests for denorm mode

* Move denorm mode to post linking

* format code (#8)

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;

* regenerate command line reference (#9)

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;

* Clean up tests

* Fix option text

* format code (#10)

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;

* Add tests for "any" mode

* Return "any" enum if option not set

* Simplify emission logic

* Add support for generic entrypoints

* Move denorm modes to end of CompilerOptionName enum

* format code (#11)

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;

* Move new enum members to before CountOf

* Add not checks to tests, fix generic test, add functionality tests

* Rename denorm to fpDenormal

* Clean up functional test

* Rename denorm test dir

* Fix formatting, regenerate cmdline ref

* Fold simple tests into functional tests, add more dxil checks

* Remove no-op DX tests, make tests more consistent

* Disable VK functionality tests that will fail on the CI configs

* Fix formatting

* Add comments to disabled tests explaining why

---------

Co-authored-by: slangbot &lt;ellieh+slangbot@nvidia.com&gt;
Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Add command line option for separate debug info (#7178)</title>
<updated>2025-06-06T21:30:06+00:00</updated>
<author>
<name>jarcherNV</name>
<email>jarcher@nvidia.com</email>
</author>
<published>2025-06-06T21:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0d16228ae22fa2e1a00e62dc099eea08da7717fe'/>
<id>urn:sha1:0d16228ae22fa2e1a00e62dc099eea08da7717fe</id>
<content type='text'>
* Add command line option for separate debug info

Add command line arg -separate-debug-info which, if provided, produces
both a .spv and a .dbg.spv file. The .dbg.spv file contains full debug
info and the .spv file has all debug info stripped out.

Also add a DebugBuildIdentifier instruction to store a unique hash in
both the output files, so they can be more easily matched together.

A matching API is provided to allow using the Slang API to retrieve a
base and debug SPIRV as well as the debug build identifier string.</content>
</entry>
<entry>
<title>Language version + tuple syntax. (#7230)</title>
<updated>2025-05-29T15:05:57+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-05-29T15:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=faf042ecc3e688a1a3ffbe1ac44d18dd7ddf441a'/>
<id>urn:sha1:faf042ecc3e688a1a3ffbe1ac44d18dd7ddf441a</id>
<content type='text'>
* Language version + tuple syntax.

* Fix compile error.

* regenerate documentation Table of Contents

* Fix.

* regenerate command line reference

* Fix.

* Fix.

* Fix more test failures.

* revert empty line change,

* Retrigger CI

* #version-&gt;#lang

* Update source/core/slang-type-text-util.cpp

Co-authored-by: ArielG-NV &lt;159081215+ArielG-NV@users.noreply.github.com&gt;

* Remove comments.

* Fix parsing logic.

* Fix parser.

* Fix parser.

* update test comment

* Update options.

* regenerate documentation Table of Contents

* regenerate command line reference

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: ArielG-NV &lt;159081215+ArielG-NV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Remove support for ad hoc Slang IR compression (#6834)</title>
<updated>2025-04-16T19:28:39+00:00</updated>
<author>
<name>Theresa Foley</name>
<email>10618364+tangent-vector@users.noreply.github.com</email>
</author>
<published>2025-04-16T19:28:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2b20e9e150225f8cb75f7be2061f5ec99cbb2f66'/>
<id>urn:sha1:2b20e9e150225f8cb75f7be2061f5ec99cbb2f66</id>
<content type='text'>
* Remove support for ad hoc Slang IR compression

This change is part of a larger effort to clean up the approach to
serialization in the Slang compiler. The overall goal is to simplify
and streamline all of the serialization-related logic, so that we are
left with code that is less "clever," and easier to understand for
contributors to the codebase.

Removing support for compression of serialized Slang IR has
benefits that include:

* Reduction in code complexity: consider things like the subtle way
  that the `FOURCC`s for compressed chunks were being computed from
  the uncompressed versions, and the mental overhead that goes into
  understanding that, for anybody who would dare to touch this code.

* Reduction in testing burden: there have been, de facto, two
  very different code paths for serialization of the Slang IR, and
  it is not clear that the existing test corpus for Slang has
  sufficient coverage for both options. By having only a single code
  path, every test that performs any amount of IR serialization helps
  with test coverage of that one path.

* Opportunity to explore alternatives. This is perhaps a reiteration
  of the first point, but once the code is stripped down to the
  simplest thing that could possibly work (I am not claiming it has
  reached that point yet), it becomes easier for contributors to
  understand, and it becomes more tractable for somebody to come along
  with an improved approach that performs better (in either
  compression ratio or performance) while still being maintainable.

In my own local setup, I found that removing support for Slang IR
compression led to the `slang-core-module-generated.h` file increasing
in size from 46.1MB to 47.4MB. This increase in the `.h` file size
for the core library binary only resulted in a release build of
`slang.dll` increasing from 20.0MB to 20.2MB. Removing the ad hoc
compression support has almost no impact on the size of actual binary
Slang modules *so long* as the additional LZ4 compression step is
being applied to them.

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Improve on spirv generation compile option (#5479)</title>
<updated>2024-11-01T23:12:33+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-11-01T23:12:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=61cddbee405935fa8391a757a08bcbe4ea7ac98f'/>
<id>urn:sha1:61cddbee405935fa8391a757a08bcbe4ea7ac98f</id>
<content type='text'>
CompilerOptionName::EmitSpirvViaGLSL and CompilerOptionName::EmitSpirvDirectly
options are not mutually exclusive, but due to compatible reason, we
cannot delete those options. Instead, this change makes the effort to
create a new option name EmitSpirvMethod, and we will turn those two
options into the new one internally. Also, we put a priority implicitly
on those two options, where EmitSpirvDirectly always win if it's set.

We have another location that can setup the same option, where is
through SlangTargetFlags::SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY.

We should definitely deprecate this flag to avoid more confusing.
But for the same compatible reason, we cannot do that in this PR.
Again, we will encourage people to not use this flag, but using the
CompilerOptionName instead. In this PR, we will also implicitly give
CompilerOptionName higher priority, it means that as long as user setup
the CompilerOptionName for emit spirv method, it always take higher
priority for the final decision.</content>
</entry>
<entry>
<title>format</title>
<updated>2024-10-29T06:49:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-10-29T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21'/>
<id>urn:sha1:f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21</id>
<content type='text'>
* format

* Minor test fixes

* enable checking cpp format in ci</content>
</entry>
<entry>
<title>Implement `-fvk-use-dx-layout` (#4912)</title>
<updated>2024-08-26T19:11:41+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-08-26T19:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e1c6fecd90142761aaecbf4e281beb87893fc531'/>
<id>urn:sha1:e1c6fecd90142761aaecbf4e281beb87893fc531</id>
<content type='text'>
* Implement `-fvk-use-dx-layout`

Fixes: #4126

Changes:
* Added fvk-use-dx-layout
* Modified `HLSLConstantBufferLayoutRulesImpl` for correctness (ex: Array is always 16 byte aligned)
* Added kFXCShaderResourceLayoutRulesFamilyImpl and kFXCConstantBufferLayoutRulesFamilyImpl to handle fvk-use-dx-layout
* Added `ConstantBufferLayoutRules` to manage constant buffer rules
* Added `alignCompositeElementOfNonAggregate`/`alignCompositeElementOfAggregate` to handle forced alignment of composites for ConstantBuffers
* `StructuredBuffer` rules are mostly equal to `scalar` layout, not much was needed to be changed to support this behavior.

* seperate legacy constant buffer and how Slang does constant-buffer normally

* undo an addition

* remove accidental test

* Address review and fix

Address review and remove GLSL support since GLSL requires a seperate legalization (need to linearlize structs like with `legalizeMetalIR` to assign explicit offsets)

* comments

* remove aggregate and non-aggregate logic

We don't need this distinction for the logic

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<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>Add an option to disable source map in obfuscation (#4260)</title>
<updated>2024-06-03T21:04:33+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-06-03T21:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=68bf31e586b9d1805c19dd42492086c7c780c2a4'/>
<id>urn:sha1:68bf31e586b9d1805c19dd42492086c7c780c2a4</id>
<content type='text'>
Add option "-disable-source-map" to disable the source map in obfuscation.</content>
</entry>
</feed>
