<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/slang.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>2024-07-17T17:53:19+00:00</updated>
<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>populate slang-tag-version with cmake (#4611)</title>
<updated>2024-07-11T11:52:54+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-07-11T11:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=45baeb32a7db8930cf3dc4f32cb5fefba742c6b5'/>
<id>urn:sha1:45baeb32a7db8930cf3dc4f32cb5fefba742c6b5</id>
<content type='text'>
At the moment it is always "unknown"</content>
</entry>
<entry>
<title>Add reflection API for functions. (#4587)</title>
<updated>2024-07-10T21:09:18+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-07-10T21:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b89421cb3b803165455020f5b70d582b6aec6e76'/>
<id>urn:sha1:b89421cb3b803165455020f5b70d582b6aec6e76</id>
<content type='text'>
* Add reflection API for functions.

This change adds `SlangFunctionReflection` type in the reflection API that provides methods for querying function result type, parameters and user-defined attributes.

`ProgramLayout::findFunctionByName` can now find a function with the given name and returns a `FunctionReflection`.

`IEntryPoint` now has a `getFunctionReflection` method that returns an `FunctionReflection` for the entrypoint.

* More modifiers; make reflection API consistent.</content>
</entry>
<entry>
<title>Add API for querying dependency files on IModule (#4493)</title>
<updated>2024-06-27T15:35:17+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-06-27T15:35:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cb610113605f62e784b63012b31b751acb6fac72'/>
<id>urn:sha1:cb610113605f62e784b63012b31b751acb6fac72</id>
<content type='text'>
* Add API for querying dependency files on IModule

* return nullptr</content>
</entry>
<entry>
<title>Delete glsl_vulkan and glsl_vulkan_one_desc targets. (#4361)</title>
<updated>2024-06-12T20:49:18+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-06-12T20:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0574dca987edb83325f50b435767fa0c61bae2b8'/>
<id>urn:sha1:0574dca987edb83325f50b435767fa0c61bae2b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Capability System: Implicit capability upgrade warning/error (#4241)</title>
<updated>2024-06-12T20:38:23+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-06-12T20:38:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8813c610562b1c30222ec3ef0734ef601d43b617'/>
<id>urn:sha1:8813c610562b1c30222ec3ef0734ef601d43b617</id>
<content type='text'>
* capability upgrade warning/error

adjusted implementation + tests to support a warning/error if capabilities are implicitly upgraded and test accordingly.

* add glsl profile caps

* add GLSL and HLSL capabilities to the associated capability

* syntax error in capdef

* only error if user explicitly enables capabilities

1. changed testing infrastructure to not set a `profile` explicitly,
2. Added tests to be sure this works as intended with user API and with slangc command line

* Change capability atom definitions and how Slang manages them to fix errors

1. most `glsl_spirv` version atoms have been removed from `.capdef`, instead we will translate `spirv` version atoms into `glsl_spirv` since there is no point in writing the same code twice in `.capdef` files to define `spirv` versions.
2. add spirv version, and hlsl sm version (and equivlent) capability dependencies
3. removed some stage requirments which were set on objects, keep the wrapper capabilities. I am keeping the wrapper capabilities since I am unaware on if there are stage limitations (spec says code in practice does not work).

* check internal version instead of version profile (_spirv_1_5 vs. spirv_1_5)

* remove unused OpCapability. adjust SPIRV version'ing again for glsl_spirv

* apply workaround for glslang bug with rayquery usage

* ensure capabilities targetted by a profile and added together by a user are valid

* remove additions to `spirv_1_*` wrapper

* spirv_* -&gt; glsl_spirv fix

* fix bug where incompatable profiles would cause invalid target caps

* try to avoid joining invalid capabilities

* fix the warning/error &amp; printing

* run through tests to fix capability system and test mistakes

many mistakes were mesh shaders doing `-profile glsl_450+spirv_1_4`. This is not allowed for a few reasons
1. the test tooling does not handle arguments the same as `slangc`
2. glsl_450 core profile does not support mesh shaders, nor does spirv_1_4. sm_6_5 does work in this senario

* set some sm_4_1 intrinsics to sm_4_0

* replace `GLSL_` defs with `glsl_`

* swap the unsupported render-test syntax for working syntax

* set d3d11/d3d12 profile defaults

this is required since sm version changes compiled code &amp; behavior

* adjusted nvapi capabilities with atomics + d3d11 set to use sm_5_0 as per default

* cleanup

* address review

* incorrect styling

* change `bitscanForward` to work as intended on 32 bit targets

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add slangc flag to `-zero-initialize` all variables (#3987)</title>
<updated>2024-06-12T16:46:24+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-06-12T16:46:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b7e824347a5de25cc013af30e43bd405b8b5698f'/>
<id>urn:sha1:b7e824347a5de25cc013af30e43bd405b8b5698f</id>
<content type='text'>
* Default (zero'd) values with `-zero-initialize` flag

Adds `-zero-initialize` flag to set values to a __default() expression if they are missing a initExpr.

* address review and ensure __default calls ctor + zero's fields.

1. We must keep zero-initialize in SemanticsDeclHeaderVisitor. This is done because else a ctor will be initialized before we can set struct fields to `__default`.
2. IRDefaultCtorDecoration was added to track default ctor's with parent struct.
3. ParentAggTypeModifier was added to track ChildOfStruct-&gt;IRType for sharing data such as with functions. This is required to ensure we associate a lowered function with a lowered struct type

* Removed decoration to track defaultCtor in favor of field.

This was done since decorations are checked for IR objects, storing auxillary info does not work here as a result if usable object.

* address some review comments

Since `IDefaultInitializable` is taking a considerabley larger amount of time than anticipated I am pushing some of the other fixes requested. I did not remove the "IRStruct storing a default Ctor" hack yet.

mostly renamed/adjusted tests to work as intended

added test to ensure we don't synthisize a junk `= 0` when not in `zero initialize` mode

removed member in favor of sharedContext+dictionary.

* a working but incorrect impl

* default init without any IR hacks (fully working aside from generic/containored-types)

* Finish zero init code

1. IDefaultInitializer interface was added. If conforming, your type may be zero-initialized. To Conform a `__init()` is required
2. `[OnlyAutoInitIfForced]` was added. This attribute states that a default initializer should only be implicitly called if forced by the compiler (`zero-initialize` for example). This allows types which implicitly/explicitly conform to IDefaultInitialize to have optional auto-init behavior (which is Slang's default for user structs) to be disabled.

* note about `[OnlyAutoInitIfForced]`. This is required for std-lib to not automatically resolve init-expressions for std-lib, but it has the added benifit of allowing user made structs/classes to control the default behavior of initializing

* fix ErrType assumption

* testing why dx12 fails local but passes CI

* push vector changes to generic test

* push syntax adjustment, still figuring out what is wrong with cuda.

* remove debug changes &amp; adjust style

* fix field-init expressions with structs initializers

don't init a static in a ctor. This would be illegal code and wrong code (init list in lower-to-ir)

* minor adjustments temporarily while the rest of the issue is discussed

* fix

* implement IDefaultInitializable

* remove a unneeded whitespace change

* fix type checking error

should be checking if a valid type is `Type`, not `BasicExpressionType`

* needs to be DeclRefType, not Type

* fix langguage server error

* change findinheritance for correctness + cleanup

* remove return false

verified the issue was `findInheritance`

* push attempt at language server fix

* still trying to fix inheritance

* added extension support, remove redundant code

Did not address all review comments yet, want to see if CI also passes my changes

* undo a change which caused CI to fail

* change logic  + DefaultConstructExpr

setup code to use defaultConstructExpr when possible to construct a default without overhead of invoke/related

also changed code so parent's defaultInitializable propegates to derived member

* 1. fix error in `isSubtype` 2. add flag to isSubtype

`subtypeInheritanceIsNotFullyResolved` was added since we may not be done the lookup stage but still require `isSubtype` checking to verify usage of inheritance while working with inheritance. In This case we will just skip `ensureLookup` and "caching" (since we don't have a cache invalidation system, nor need)

* fix bug in logic + add test to better catch the bug

* address comment + isSubTypeOption + wrapper type test,

* fix wrong code adjustment

I checked on the CI and realized I caused a failure, mistake was made not negating some code

* syntax, class naming capital

* remove stdlib default initialize changes, replace with `__default()` for init

* remove redundant code + fix defaultConstruct emitting

previously defaultConstruct emitting was crashing due to having generics unresolved. By not resolving the default construct immediately, everything works.

* remove a coment

* add test to ensure static variables dont `init` inside a struct's `__init`

* fix Ptr members breaking struct use

* address review and add -zero-initialize test

`-zero-initialize` test was added to be sure debug pointers are not broken with default init values

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Extend the COM-based API to support whole program compilation. (#4355)</title>
<updated>2024-06-12T16:45:50+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-06-12T16:45:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ccc26c2d22d471ae649bf16f37ed1cd6cfbddd1b'/>
<id>urn:sha1:ccc26c2d22d471ae649bf16f37ed1cd6cfbddd1b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add compiler option to treat enum types as unscoped. (#4354)</title>
<updated>2024-06-12T16:45:26+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-06-12T16:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=318adcc27b8d89ec1d47c445a93239dd81be0b31'/>
<id>urn:sha1:318adcc27b8d89ec1d47c445a93239dd81be0b31</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add option to preserve shader parameter declaration in output SPIRV. (#4344)</title>
<updated>2024-06-12T16:27:14+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-06-12T16:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=fa8c11ebe8f9b1bf2174a5a4dbe92a34c16811c8'/>
<id>urn:sha1:fa8c11ebe8f9b1bf2174a5a4dbe92a34c16811c8</id>
<content type='text'>
* Add option to preserve shader parameter declarations in output.

* Add test.</content>
</entry>
</feed>
