<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-workspace-version.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-06-18T04:36:10+00:00</updated>
<entry>
<title>LanguageServer: Enhance auto completion for override. (#7465)</title>
<updated>2025-06-18T04:36:10+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-06-18T04:36:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4d517794eaac7dfe6196e9a36d709d66c5720492'/>
<id>urn:sha1:4d517794eaac7dfe6196e9a36d709d66c5720492</id>
<content type='text'>
* Add additional completion keywords.

* LanguageServer: Enhance auto completion for `override`.</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>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>Enable emscripten builds to compile slang.dll to WebAssembly. (#5131)</title>
<updated>2024-09-25T07:24:51+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-09-25T07:24:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f5bf5ba5170058f9a9634438f7ff06f1a02e1da6'/>
<id>urn:sha1:f5bf5ba5170058f9a9634438f7ff06f1a02e1da6</id>
<content type='text'>
* Compile fixes for Wasm

The issues are all are due to 'long' types being 32 bits on WASM.

- class members redeclared errors
- &lt;&lt; with StringBuilder and unsigned long is ambiguous

This helps to address issue #5115.

* Use the host executable suffix for generators

Since the generators are run at build-time, we should not use CMAKE_EXECUTABLE_SUFFIX,
which is the suffix for the target platform.
Instead, define CMAKE_HOST_EXECUTABLE_SUFFIX as appropriate, and use that suffix instead.

This helps to address issue #5115.

* Add support for Wasm as a platform

This helps to address issue #5115.

* Add emscripten build

This closes #5115.</content>
</entry>
<entry>
<title>Support unicode identifier names. (#4772)</title>
<updated>2024-08-13T03:53:03+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-08-13T03:53:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b390566b55700582321b09b72c726b8dff9bd819'/>
<id>urn:sha1:b390566b55700582321b09b72c726b8dff9bd819</id>
<content type='text'>
* Support unicode identifier names.

* Fix.

* Fix language server.

* Fix build errors.

* Fix.

* Fix offset translation in language server.</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 language server support for vfx files. (#3414)</title>
<updated>2023-12-16T00:30:09+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-12-16T00:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f8b3027d0be0b890152a6a649822741cd3a3b6b6'/>
<id>urn:sha1:f8b3027d0be0b890152a6a649822741cd3a3b6b6</id>
<content type='text'>
Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Language server improvements for auto-diff. (#2521)</title>
<updated>2022-11-17T00:08:51+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-11-17T00:08:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e13d38b6a281f444203410f09dab8b127e678975'/>
<id>urn:sha1:e13d38b6a281f444203410f09dab8b127e678975</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make ISlangFileSystem derive from ICastable (#2386)</title>
<updated>2022-09-01T20:39:08+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2022-09-01T20:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cc0b81350f6b681c794b4ac7c0f3b5fe73cb19eb'/>
<id>urn:sha1:cc0b81350f6b681c794b4ac7c0f3b5fe73cb19eb</id>
<content type='text'>
* #include an absolute path didn't work - because paths were taken to always be relative.

* Make ISlangFileSystem derive from ICastable.

* Make ArchiveFileSystem into an interface
Make file systems atomically reference counted.

* Small fix.

* Some small fixes to work around issues of ICastable on ISlangFileSystem

* Use ISlangFileSystem derived type instead of IArchiveFileSystem. Can always get other interface with castAs.

* Some small fixes around change of interface returned from archive type functions.

* Remove CacheFileSystem member from linkage. Can access easily from m_fileSystemExt if necessary with as cast.

* Fix RiffFileSystem casting issue.

* Add a check around CacheFileSystem.</content>
</entry>
<entry>
<title> More Language Server Improvements. (#2289)</title>
<updated>2022-06-23T02:58:34+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-06-23T02:58:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=07a380d72a13899a84cbdc35692be7a3d9246dcb'/>
<id>urn:sha1:07a380d72a13899a84cbdc35692be7a3d9246dcb</id>
<content type='text'>
</content>
</entry>
</feed>
