<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/spirv/debug-type-pointer.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-02-05T18:37:03+00:00</updated>
<entry>
<title>Feature/initialize list side branch (#6058)</title>
<updated>2025-02-05T18:37:03+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2025-02-05T18:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9ec6b91686b651d959fd9ffbec283845bd725dd6'/>
<id>urn:sha1:9ec6b91686b651d959fd9ffbec283845bd725dd6</id>
<content type='text'>
* SP004: implement initialize list translation to ctor

- We synthesize a member-wise constructor for each struct follow
   the rules described in SP004.
- Add logic to translate the initialize list to constructor invoke
- Add cuda-host decoration for the synthesized constructor
- Remove the default constructor when we have a valid member init constructor
- Disable -zero-initialize option, will re-implement it in followup (#6109).
- Fix the overload lookup issue
    When creating invoke expression for ctor, we need to call
    ResolveInvoke() to find us the best candidates, however
    the existing lookup logic could find us the base constructor
    for child struct, we should eliminate this case by providing
    the LookupOptions::IgnoreInheritance to lookup, this requires
    us to create a subcontext on SemanticsVisitor to indicate that
    we only want to use this option on looking the constructor.
- Do not implicit initialize a struct that doesn't have explicit default
   constructor.

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Use DebugDeclare instead of DebugValue. (#5404)</title>
<updated>2024-10-25T04:31:34+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-10-25T04:31:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a2a201e327559e6a24b081fee73096b2a3b3e33f'/>
<id>urn:sha1:a2a201e327559e6a24b081fee73096b2a3b3e33f</id>
<content type='text'>
* Use DebugDeclare instead of DebugValue.

* Avoid generating illegal SPIRV.

* Improve DebugLine output.

* Fix.

* Fix.

* Misc improvements.</content>
</entry>
<entry>
<title>Fix spirv debug info for pointer types. (#5319)</title>
<updated>2024-10-16T16:54:43+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-10-16T16:54:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2ee898109006986250d5356a59003eb741a89ca4'/>
<id>urn:sha1:2ee898109006986250d5356a59003eb741a89ca4</id>
<content type='text'>
* Fix spirv debug info for pointer types.

* fix comment.</content>
</entry>
<entry>
<title>Support OpDebugTypePointer for struct member pointer (#4527)</title>
<updated>2024-07-18T22:20:42+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-07-18T22:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ce4ffc34204a56a7447db1e4aa0e7d89d74f34f1'/>
<id>urn:sha1:ce4ffc34204a56a7447db1e4aa0e7d89d74f34f1</id>
<content type='text'>
This change supports OpDebugTypePointer for a member variable whose type
is a pointer type for the outer struct that hasn't been declared yet.
It is done with new extension, "SPV_KHR_relaxed_extended_instruction",
that comes with a new instruction, "OpExtInstWithForwardRefs".

Closes #4304</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>Support SPIR-V DebugTypePointer (#4228)</title>
<updated>2024-05-30T23:47:39+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-05-30T23:47:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=febbeb140bea65180ff4be9b164207c582235d4d'/>
<id>urn:sha1:febbeb140bea65180ff4be9b164207c582235d4d</id>
<content type='text'>
</content>
</entry>
</feed>
