<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/docs/building.md, 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-09-06T03:31:04+00:00</updated>
<entry>
<title>Remove unnecessary check and adust server count etc. in CI (#8374)</title>
<updated>2025-09-06T03:31:04+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>tonggangzheng@gmail.com</email>
</author>
<published>2025-09-06T03:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=fe87a39e453b64e94446181a9ae5cbfc0f62bf0c'/>
<id>urn:sha1:fe87a39e453b64e94446181a9ae5cbfc0f62bf0c</id>
<content type='text'>
- This PR removes "wasm" check from the test job, since there is no test
job for "wasm" yet.
- Also, move the check for slang-rhi and slangpy test to the job level
to skip the setup etc. if no run is needed.
- Update the macos compiler version in building.md to match the clang
compiler used in CI.
- Reduce the server count in Linux and Mac when running slang-test to
ease the machine load
- Run slangpy test with `-n auto --maxprocesses=4` to speed up

---------

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>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>Document how to use LLDB in the Slang codebase (#7809)</title>
<updated>2025-07-24T01:34:21+00:00</updated>
<author>
<name>Sam Estep</name>
<email>sam@samestep.com</email>
</author>
<published>2025-07-24T01:34:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9666fbcab891156fb058d6a1b8f427ccc3ffecab'/>
<id>urn:sha1:9666fbcab891156fb058d6a1b8f427ccc3ffecab</id>
<content type='text'>
* Document how to use LLDB in the Slang codebase

* Include `slang_lldb.py` in `.lldbinit`

* Switch from GCC to Clang

* Include a VS Code task to build before debugging

* Fix clangd</content>
</entry>
<entry>
<title>Let `flake.nix` users run `extras/formatting.sh` (#7682)</title>
<updated>2025-07-14T10:16:37+00:00</updated>
<author>
<name>Sam Estep</name>
<email>sam@samestep.com</email>
</author>
<published>2025-07-14T10:16:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=db06fbb163877b8823507b162ee7f2dfca8520f0'/>
<id>urn:sha1:db06fbb163877b8823507b162ee7f2dfca8520f0</id>
<content type='text'>
Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Reset minimum cmake version to 3.22 (#7548)</title>
<updated>2025-06-30T19:11:04+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>tonggangzheng@gmail.com</email>
</author>
<published>2025-06-30T19:11:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a55ff722cae338a8fcf5402858c47cf0650a8e5e'/>
<id>urn:sha1:a55ff722cae338a8fcf5402858c47cf0650a8e5e</id>
<content type='text'>
* Reset minimum cmake version to 3.22

* update slang-rhi</content>
</entry>
<entry>
<title>Document supported compiler versions in building.md (#7512)</title>
<updated>2025-06-24T07:54:00+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2025-06-24T07:54:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=47475114d036a391bacdb53a9a1c60e5d35b61bc'/>
<id>urn:sha1:47475114d036a391bacdb53a9a1c60e5d35b61bc</id>
<content type='text'>
* Document supported compiler versions in building.md

Closes https://github.com/shader-slang/slang/issues/7376

* multiple checked versions</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>Add Slang Byte Code generation and interpreter. (#6896)</title>
<updated>2025-04-28T18:42:22+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-04-28T18:42:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c39c29bf4c52a85d7c83cc8b66ae45e265f9e078'/>
<id>urn:sha1:c39c29bf4c52a85d7c83cc8b66ae45e265f9e078</id>
<content type='text'>
* Add Slang Byte Code generation and interpreter.

* Fix compile issues.

* format code

* More compile fix.

* Fix clang issue.

* Fix more clang issues.

* Another clang fix.

* Fix clang issues.

* Fix another clang issue.

* Fix wasm build.

* Update building.md

* Fix test-server.

* Fix compile error.

* Fix bug.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Add Nix flake for direnv (#6635)</title>
<updated>2025-03-20T15:40:57+00:00</updated>
<author>
<name>Sam Estep</name>
<email>sam@samestep.com</email>
</author>
<published>2025-03-20T15:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9b1e10ea2602c76a97ca25c27a0b3842a5bb69de'/>
<id>urn:sha1:9b1e10ea2602c76a97ca25c27a0b3842a5bb69de</id>
<content type='text'>
* Add Nix flake for direnv

* Use Sai's suggestion for the `description`

* Make `.envrc` optional

* Move Nix docs to their own section

* Tweak wording

* Tweak wording more

* Add `nixfmt`

---------

Co-authored-by: Sai Praveen Bangaru &lt;31557731+saipraveenb25@users.noreply.github.com&gt;
Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Fix and document static build (#6374)</title>
<updated>2025-02-19T07:51:22+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2025-02-19T07:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5ceef13e2336dfa1c4de8fdb3a273d81add0a7ca'/>
<id>urn:sha1:5ceef13e2336dfa1c4de8fdb3a273d81add0a7ca</id>
<content type='text'>
* Set static stbi flag for static builds

* Add missing SYSTEM directive for external includes

* Add instructions for linking statically against slang

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
