<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/language-feature/struct-field-initializers/struct-field-no-initializer-complex-types.slang, 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-02T23:43:48+00:00</updated>
<entry>
<title>render-test: Change D3D12 default to sm_6_5 (#8320)</title>
<updated>2025-09-02T23:43:48+00:00</updated>
<author>
<name>James Helferty (NVIDIA)</name>
<email>jhelferty@nvidia.com</email>
</author>
<published>2025-09-02T23:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f02b08490aa905f42a8d90381db84b1f8e409c0c'/>
<id>urn:sha1:f02b08490aa905f42a8d90381db84b1f8e409c0c</id>
<content type='text'>
Changes default for render-test to sm_6_5.
Since sm_6_5 is the new default, remove the -use-dxil option, add
-use-dxcb option
Remove -use-dxil option from all test cases.
Add -use-dxcb to two tests that needed it.

Fixes #7611</content>
</entry>
<entry>
<title>Warn when inout parameter is never written (#4777)</title>
<updated>2024-08-12T21:18:02+00:00</updated>
<author>
<name>venkataram-nv</name>
<email>vedavamadath@nvidia.com</email>
</author>
<published>2024-08-12T21:18:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=20bd48659d0009de5477380c335e2419f4c66f8b'/>
<id>urn:sha1:20bd48659d0009de5477380c335e2419f4c66f8b</id>
<content type='text'>
Addresses #4698 as one approach to diagnose the potential problem.

Emit warnings when a user marks a parameter as `inout` but never writes to it in the function. A new intrinsic function `unmodified(out T)` has been added to explicitly indicate that an `inout` variable will not be modified in the function.

This is only one way to address the specific validation error in #4698. In general it seems that DXC does some more extensive checks on actual struct fields (as opposed to observing arbitrary struct writes), so that will be the next step.</content>
</entry>
<entry>
<title>Init expressions for struct fields support, #3738 (#3907)</title>
<updated>2024-04-16T17:06:23+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-04-16T17:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d5d39dda2ec02c1dd21ba34a89f74b27092efcdd'/>
<id>urn:sha1:d5d39dda2ec02c1dd21ba34a89f74b27092efcdd</id>
<content type='text'>
* Init expressions for struct members

Following commit handles init expressions of struct's.

The general implementation follows C++ init expression rules for classes &amp; inherited classes.

The logic was implemented after type resolution (`SemanticsDeclAttributesVisitor`):
1. Create a default constructor if missing.
2. Check all member variables (`this` and `super`) for if a member has an init expression, continue to *3* if found.
3. For each constructor, insert a member variable's init expression at the beginning of a constructor. This is to follow how C++ does construction of objects.

Some important notes about implementation:
* We must handle the scenario that there is inheritance. To handle the inheritance information processing `findLevelsOfInheritance` was created.
* If a user manually sets overload rank's of constructor expression's we have no way to assume new default constructor overload ranks.

* address feedback

- moved all scope bound variables into if statment initializers
- added indent
- changed logic for overloadRank to be centered around positive numbers rather than negative

* Inheritance fixes universally &amp; for struct field init

1. reimplemented struct field logic
2. implemented inheritance through calling a "super-&gt;init()" inisde a constructor for each "this".
3. implemented support for multi level inheritance (4+) and accessing members without a crash.

* add a way to ignore Forward declared constructors.

* a test and fix for a falcor failiure

the following case was not handled: creating an default Ctor due to a non L-Value struct field. Having an empty Ctor causes a warning.

* remove texture/sampler from test since it will break glsl

* get inheritance info using existing lookup logic

modified Facet lookups to store relative depth rather than arbitrary ::Self or' ::Direct for inheritance (which was 'wong' since depth 2 is not Direct, but was considered a Direct inheritance)

* cleanup unused

* cleanup unused functions and whitespace

* fix compile warning

* clean up, reorder, addressed language server fail

changed logic to safeguard bad code --&gt; no longer breaks language server if code is incomplete.

remove the "semi-ordering" logic because caused a crash (and this code does nothing functionally, just thought it would be nice to add if '0 cost').

Remove rank setting for constructors, in place use an addition to the overload system: "this" expressions have calling priority over "super" expressions.
* undo all inheritance depth checks &amp; code added to the inheritance checking algorithm

Reorder default ctor creation and auto-generation of constructor body.

* Handle same struct types during overload resolution

Changed overload resolution logic to properly handle same struct types; added test to check for multi-param same type function overload.

* remove unused ast object

Used unused object in an incorrect way. This caused the compiler to not flag a warning.

* extension support for default constructors

specialization is not supported with default constructors yet.

* fix bugs

Fix bug in override/overload logic with type comparisons.

used wrong type for ctor list construction

Specialization has not been added yet

* disallow default ctor inside extension

* adjust comment, add new tests

* add explicit types to invoke, use faster default ctor lookup.

* adjust syntax &amp; naming as recomended</content>
</entry>
</feed>
