<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/metal/nested-struct-fragment-output.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>2024-12-10T19:11:37+00:00</updated>
<entry>
<title>Enable WGSL tests that works for Metal related to Semantics (#5816)</title>
<updated>2024-12-10T19:11:37+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-12-10T19:11:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f0b99141595d47619b63bb5574d34d70f99a5bdf'/>
<id>urn:sha1:f0b99141595d47619b63bb5574d34d70f99a5bdf</id>
<content type='text'>
* Enable WGSP tests that works for Metal related to Semantics

This commit enables existing tests for WGSL that are enabled for Metal regarding the Semantics.
</content>
</entry>
<entry>
<title>Varying inputs and outputs for wgsl (#5669)</title>
<updated>2024-12-02T19:45:04+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-12-02T19:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7aaf7009e2c6055a714ba4a93ab3dd73d2d2cdb7'/>
<id>urn:sha1:7aaf7009e2c6055a714ba4a93ab3dd73d2d2cdb7</id>
<content type='text'>
Closes https://github.com/shader-slang/slang/issues/5067

New tests, covering what's declared supported in the WGSL support docs

- tests/wgsl/semantic-coverage.slang
- tests/wgsl/semantic-depth.slang
- tests/wgsl/semantic-dispatch-thread-id.slang
- tests/wgsl/semantic-group-id.slang
- tests/wgsl/semantic-group-index.slang
- tests/wgsl/semantic-group-thread-id.slang
- tests/wgsl/semantic-instance-id.slang
- tests/wgsl/semantic-is-front-face.slang
- tests/wgsl/semantic-position.slang
- tests/wgsl/semantic-sample-index.slang
- tests/wgsl/semantic-vertex-id.slang

WGSL enabled existing tests:
- tests/compute/compile-time-loop.slang
- tests/compute/constexpr.slang
- tests/compute/discard-stmt.slang
- tests/metal/nested-struct-fragment-input.slang
- tests/metal/nested-struct-fragment-output.slang
- tests/metal/nested-struct-multi-entry-point-vertex.slang
- tests/metal/no-struct-vertex-output.slang
- tests/metal/sv_target-complex-1.slang
- tests/metal/sv_target-complex-2.slang
- tests/bugs/texture2d-gather.hlsl
- tests/render/cross-compile-entry-point.slang
- tests/render/nointerpolation.hlsl
- tests/render/render0.hlsl
- tests/render/cross-compile0.hlsl
- tests/render/imported-parameters.hlsl
- tests/render/unused-discard.hlsl

Can't be enabled due to missing wgsl features

- tests/compute/texture-sampling.slang

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Fixes to Metal Input parameters and Output value input/output semantics (#4536)</title>
<updated>2024-07-10T20:24:12+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-07-10T20:24:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a08ccfa50a06797dab60918b788570a520c45454'/>
<id>urn:sha1:a08ccfa50a06797dab60918b788570a520c45454</id>
<content type='text'>
* initial change to test with CI for CPU/CUDA errors

* Fixes to Metal Input parameters and Output values

Note:
1. Flattening a struct is the process of making a struct have 0 struct/class members.

Changes:
1. Separated `legalizeSystemValueParameters`. This was done to make it easier to run `legalizeSystemValue` 1 system-value at a time to simplify logic. This change is optional and can be undone if not preferred.
2. Wrap everything inside a Metal legalization context. This was done since it simplifies a lot of logic and will be required for #4375
3. Created `convertSystemValueSemanticNameToEnum` and expanded the existing System-Value Enum system. This allows (sometimes) faster comparisons and helps prepare code for porting into `slang-ir-legalize-varying-params.cpp` (#4375)
4. Added a more dynamic `legalizeSystemValue` system so more than 2 types can be targeted for legalization. This is required to legalize `output`. There is still no preference for any converted type, the first valid type will be converted to.
5. Flatten all input(`flattenInputParameters`)/output(part of `wrapReturnValueInStruct`) structs and assign semantics accordingly.
6. Semantics when legalized have no specific logic other than to: 1. avoid overlapping semantics 2. Prefer assigning explicit semantics specified by a user.
7. Fixed some issue with incorrect output semantics if not a fragment stage (when there are not any assigned semantics)

* change metallib test to the correct metal test

* comment code &amp; cleanup -- Did not address all review

Added comments for clarity + cleaned up some odd areas which were messy

* Add comment to `fixFieldSemanticsOfFlatStruct`

I found `fixFieldSemanticsOfFlatStruct` to still be confusing at a cursory glance. Added comments to make the function be more understandable.

* white space

* Address review comments

1. Fix semantic propegation.
2. Fix how we map struct fields of the flat struct to struct. This is specifically important for if reusing the same struct twice since struct member info is not unique per struct instance used.

* Fix semantic legalization by adding TreeMap

Add TreeMap to allow proper sorted-object data iteration.

* Fix some compile issues

* try to fix gcc compile error

* compile error

* fix logic bug in treeMap iterator next-semantic setter

* fix vsproject filters

* filter file syntax error

* remove need of a context to make copies stable

* Rename treemap to the more appropriate name of "treeset", adjust code comments accordingly.

* remove custom type `TreeSet` and use `std::set`

* remove TreeMap fully

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
