<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang-llvm, 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-07T18:48:34+00:00</updated>
<entry>
<title>Update LLVM from 13.0.1 to 14.0.6 (#8031)</title>
<updated>2025-08-07T18:48:34+00:00</updated>
<author>
<name>Sam Estep</name>
<email>sam@samestep.com</email>
</author>
<published>2025-08-07T18:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4721b6ef2dd4e1b39c85acc492f9c6af8898a34b'/>
<id>urn:sha1:4721b6ef2dd4e1b39c85acc492f9c6af8898a34b</id>
<content type='text'>
Full set of mutually exclusive choices for upgrading LLVM:

- #8031 (you are here)
- #8035
- #8036
- #8034
- #8038
- #8039
- #8033

Alternative to #8028. Required some minor changes due to these upstream
commits:

- llvm/llvm-project@e463b69736da8b0a950ecd937cf990401bdfcdeb
- llvm/llvm-project@89b57061f7b769e9ea9bf6ed686e284f3e55affe</content>
</entry>
<entry>
<title>Disable Link-Time-Optimization by default (#7345)</title>
<updated>2025-06-06T17:48:06+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-06-06T17:48:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7f04adbfb9dc0c39c372809ea02cc740d484b291'/>
<id>urn:sha1:7f04adbfb9dc0c39c372809ea02cc740d484b291</id>
<content type='text'>
* Disable Link-Time-Optimization by default

LTO was requested for the release package a while ago.
When we added it, LTO was enabled by default although it was needed only for
the release packages.

Later we found that the Release build cannot be incrementally recompiled
when LTO is enabled. It sometimes works fine, but it required full recompilation
when it doesn't work. We added a new CMake option, `SLANG_ENABLE_RELEASE_LTO`,
to disable it for developers. But many Slang developers don't know the
option exists.

I was going to update the document, CONTRIBUTING.md, but I thought it
will be better to change the default behavior.

* Fix a compiler warning treated as an error on linux

A padding variable was uninitialized, which is fine, but the compiler
was complaining about it.

* Fix other gcc error for uninitialized variable

* Fix more compile warning treated as error

* Fix compiler warning from gcc 11

It appears that this is a valid warning that the `delete this` is done
on an offset 8 when the class uses multiple inheritance.

The compiler warning is following:
```
In file included from /home/runner/work/slang/slang/source/core/slang-memory-file-system.h:5,
                 from /home/runner/work/slang/slang/tools/slang-unit-test/unit-test-module-ptr.cpp:3:
In destructor ‘virtual Slang::ComBaseObject::~ComBaseObject()’,
    inlined from ‘uint32_t Slang::ComBaseObject::_releaseImpl()’ at /home/runner/work/slang/slang/source/core/slang-com-object.h:49:16,
    inlined from ‘virtual uint32_t Slang::MemoryFileSystem::release()’ at /home/runner/work/slang/slang/source/core/slang-memory-file-system.h:34:5:
/home/runner/work/slang/slang/source/core/slang-com-object.h:33:31: error: ‘void operator delete(void*, std::size_t)’ called on pointer ‘&lt;unknown&gt;’ with nonzero offset 8 [-Werror=free-nonheap-object]
   33 |     virtual ~ComBaseObject() {}
      |                               ^
In destructor ‘virtual Slang::ComBaseObject::~ComBaseObject()’,
    inlined from ‘uint32_t Slang::ComBaseObject::_releaseImpl()’ at /home/runner/work/slang/slang/source/core/slang-com-object.h:49:16,
    inlined from ‘virtual uint32_t Slang::MemoryFileSystem::release()’ at /home/runner/work/slang/slang/source/core/slang-memory-file-system.h:34:5,
    inlined from ‘Slang::ComPtr&lt;T&gt;::~ComPtr() [with T = ISlangMutableFileSystem]’ at /home/runner/work/slang/slang/include/slang-com-ptr.h:113:34,
    inlined from ‘void _modulePtr_impl(UnitTestContext*)’ at /home/runner/work/slang/slang/tools/slang-unit-test/unit-test-module-ptr.cpp:92:1:
/home/runner/work/slang/slang/source/core/slang-com-object.h:33:31: error: ‘void operator delete(void*, std::size_t)’ called on pointer ‘&lt;unknown&gt;’ with nonzero offset 8 [-Werror=free-nonheap-object]
   33 |     virtual ~ComBaseObject() {}
      |                               ^
/home/runner/work/slang/slang/tools/slang-unit-test/unit-test-module-ptr.cpp: In function ‘void _modulePtr_impl(UnitTestContext*)’:
/home/runner/work/slang/slang/tools/slang-unit-test/unit-test-module-ptr.cpp:36:69: note: returned from ‘void* operator new(std::size_t)’
   36 |         ComPtr&lt;ISlangMutableFileSystem&gt;(new Slang::MemoryFileSystem());
      |                                                                     ^
```

The problem is on the fact that `ComBaseObject` is not the first in the
multiple inheritance:
```
class MemoryFileSystem : public ISlangMutableFileSystem, public ComBaseObject
{
public:
    // ISlangUnknown
    SLANG_COM_BASE_IUNKNOWN_ALL
```

It should be:
```
class MemoryFileSystem : public ComBaseObject, public ISlangMutableFileSystem
```

The chain of ComObject release is little complicated and it is easy to
make a mistake. Here is summary with details,

1. `release()` is declared as a pure-virtual in ISlangUnknown, which is
one of the base classes of `ISlangMutableFileSystem`.
```
    struct ISlangUnknown
    {
        virtual SLANG_NO_THROW uint32_t SLANG_MCALL release() = 0;
```

2. `release()` is implemented with the macro
   `SLANG_COM_BASE_IUNKNOWN_RELEASE`.
```
    SLANG_NO_THROW uint32_t SLANG_MCALL release() SLANG_OVERRIDE \
    {                                                            \
        return _releaseImpl();                                   \
    }

inline uint32_t ComBaseObject::_releaseImpl()
{
    // Check there is a ref count to avoid underflow
    SLANG_ASSERT(m_refCount != 0);
    const uint32_t count = --m_refCount;
    if (count == 0)
    {
        delete this;
    }
    return count;
}
```

3. The instance of `MemoryFileSystem` is handled by ComPtr. And
   `ComPtr::~ComPtr()` calls the `release()`.
```
    ComPtr&lt;ISlangMutableFileSystem&gt; memoryFileSystem =
        ComPtr&lt;ISlangMutableFileSystem&gt;(new Slang::MemoryFileSystem());

    SLANG_FORCE_INLINE ~ComPtr()
    {
        if (m_ptr)
            ((Ptr)m_ptr)-&gt;release();
    }
```

4. When `delete this` is called, because ComBaseObject is not the first
   in the multiple inheritance, `this` is 8 byte off from the actual
   instance address.

A fix for this is to change the order of the inheritance and make
ComBaseObject to be the first in the order.</content>
</entry>
<entry>
<title>IR: Add SPIR-V disassembly for embedded downstream IR dumps (#6529)</title>
<updated>2025-03-11T16:10:05+00:00</updated>
<author>
<name>Mukund Keshava</name>
<email>mkeshava@nvidia.com</email>
</author>
<published>2025-03-11T16:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f59e0ef409844f2514435a8df8ceeff3663e5db3'/>
<id>urn:sha1:f59e0ef409844f2514435a8df8ceeff3663e5db3</id>
<content type='text'>
* IR: Add SPIR-V disassembly for embedded downstream IR dumps

When dumping IR that contains embedded downstream SPIR-V code (via
EmbeddedDownstreamIR instructions), display the disassembled SPIR-V
instead of just showing "&lt;binary blob&gt;".

This CL also does:
- Adds a new interface for disassembly and get result.
- Modify export-library-generics.slang test test to check for the
  disassembled SPIR-V

Fixes #6513

* Add module-dual-target-verify test

Fixes #6517
Adds a new test to verify that dxil and spirv targets are stored
separately in the precompiled blob.

* Fix review comments from cheneym2

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Use disassemble API from SPIRV-Tools (#6001)</title>
<updated>2025-01-07T09:35:47+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-01-07T09:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5621ace93b7665051f7e7c8a2fa68ceaf285ff8d'/>
<id>urn:sha1:5621ace93b7665051f7e7c8a2fa68ceaf285ff8d</id>
<content type='text'>
* Use disassemble API from SPIRV-Tools

This commit uses C API version of SPIRV disassemble function rather than
calling spirv-dis.exe.

This allows us to use a correct version of SPIRV disassble function that
Slangc.exe is using.

The implementation is mostly copied from external/spirv-tools/tools/dis/dis.cpp, which is a source file for building spirv-dis.exe.

This commit also includes a fix for a bug in RPC communication to `test-server`.

When an RPC connection to `test-server.exe` is reused and the second
test abruptly fails due to a compile error or SPIRV validation error,
the output from the first test run was incorrectly reused as the output
for the second test.

This commit resets the RPC result before waiting for the response so
that even when the RPC connection is erratically disconnected, the
result from the previous run will not be reused incorrectly.

Some of the tests appear to be relying on this type of behavior. By
using an option, `-skip-spirv-validation`, the RPC connection will
continue without an interruption.</content>
</entry>
<entry>
<title>Correct include dir for libslang (#5539)</title>
<updated>2024-11-14T04:34:18+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-11-14T04:34:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7b570feed42976a6e787d79a70aaf8e667745e58'/>
<id>urn:sha1:7b570feed42976a6e787d79a70aaf8e667745e58</id>
<content type='text'>
This stops adding the repo root to the include path for anything linking
with slang. This enabled a bunch of convenient includes, but might lead
to confusing behavior for anyone including slang. Not to mention
differences including it from an install vs source.

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Move switch statement bodies to their own lines (#5493)</title>
<updated>2024-11-05T17:47:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-11-05T17:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b118451e301d734e3e783b3acdf871f3f6ea851c'/>
<id>urn:sha1:b118451e301d734e3e783b3acdf871f3f6ea851c</id>
<content type='text'>
* Move switch statement bodies to their own lines

* format

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</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>preparation for clang format (#5422)</title>
<updated>2024-10-29T05:59:28+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-10-29T05:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a729c15e9dce9f5116a38afc66329ab2ca4cea54'/>
<id>urn:sha1:a729c15e9dce9f5116a38afc66329ab2ca4cea54</id>
<content type='text'>
* Clang-format excludes

* Add .clang-format

* Don't clang-format in external

* Missing includes and forward declarations

* Replace wonky include-once macro name

* neaten include naming

* Add clang-format to formatting script

* Add xargs and diff to required binaries

* add clang-format to ci formatting check

* Add max version check to formatting script

* temporarily disable checking formatting for cpp files</content>
</entry>
<entry>
<title>Add slang-llvm and slang-glslang readmes (#4646)</title>
<updated>2024-07-18T03:20:20+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-07-18T03:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=62325bb427ab3df68b6c1e578eccfa541b1442d7'/>
<id>urn:sha1:62325bb427ab3df68b6c1e578eccfa541b1442d7</id>
<content type='text'>
* Add slang-llvm and slang-glslang readmes

Just extraced and updated from the original repos

* Remove redundant file</content>
</entry>
<entry>
<title>Use slang-glslang.dll for spirv-validation (#4642)</title>
<updated>2024-07-18T00:00:05+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-07-18T00:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=32b1e25e359f8daf5254301dca8be308e8e1e2ab'/>
<id>urn:sha1:32b1e25e359f8daf5254301dca8be308e8e1e2ab</id>
<content type='text'>
* Use slang-glslang.dll for spirv-validation

This change replaces the use of "spirv-val.exe" with an API call to
"spvtools::SpirvTools::Validate()".

Closes #4610
</content>
</entry>
</feed>
