<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/rewriter/varying-struct.vert, 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-03-23T17:54:01+00:00</updated>
<entry>
<title>Make `-no-mangle` option work, add `-no-hlsl-binding`. (#3817)</title>
<updated>2024-03-23T17:54:01+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-03-23T17:54:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a23adc221b1ea26db3f3313226b629eb9e308b0f'/>
<id>urn:sha1:a23adc221b1ea26db3f3313226b629eb9e308b0f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove non-IR codegen paths (#398)</title>
<updated>2018-02-03T15:30:54+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-02-03T15:30:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=662f43fff6721c6cd013a8f1b2639c2e29fe6be3'/>
<id>urn:sha1:662f43fff6721c6cd013a8f1b2639c2e29fe6be3</id>
<content type='text'>
The basic change is simple: remove support for all code generation paths other than the IR.
There is a lot of vestigial code left, but the main logic in `ast-legalize.*` is gone.

Doing this breaks a *lot* of tests, for various reasons:

- We can no longer guarantee exactly matching DXBC or SPIR-V output after things pass through out IR

- Many builtins don't have matching versions defined for GLSL output via IR (even when they had versions defined via the earlier approach that worked with the AST)

- A lot of code creates intermediate values of opaque types in the IR, which turn into opaque-type temporaries that aren't allowed (this breaks many GLSL tests, but also some HLSL)

I implemented some small fixes for issues that I could get working in the time I had, but most of the above are larger than made sense to fix in this commit.

For now I'm disabling the tests that cause problems, but we will need to make a concerted effort to get things working on this new substrate if we are going to make good on our goals.</content>
</entry>
<entry>
<title>Support scalarization of varying input/output for GLSL</title>
<updated>2017-07-18T19:58:48+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-07-18T14:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1c022e2c3654de868c45658683f9e04cf4d68cc0'/>
<id>urn:sha1:1c022e2c3654de868c45658683f9e04cf4d68cc0</id>
<content type='text'>
GLSL technically supports varying (`in`, `out`) parameters of `struct` type, but there are some annoying constraints (not allowed for VS input), and it doesn't work with how an HLSL user would usually put "system-value" inputs/outputs into a `struct` together with ordinary inputs/outputs.

To work around this, this change adds support for using an imported Slang `struct` type for an `in` or `out` parameter, in which case it will (1) be scalarized and (2) will have system-value semantics mapped appropriately, just as for an entry-point parameter when cross-compiling an HLSL-style `main()`.

Changes:

- Add a notion of a `VaryingTupleExpr` and `VaryingTupleVarDecl`, similar to those for the resources-in-structs case

- Trigger use of these when we have a global-scope varying in/out using an imported `struct` type

- Also use these in the cross-compilation case for ordinary varying input/output (since this approach seems like it should be more general, and can hopefully handle stuff like GS input/output some day)

- When generating parameter binding information, special case global-scope input/output, and treat it the same as entry-point-parameter input/output

- Revamp how used resource ranges are computed so that we can eventually make this specific to an entry point

- Actually implement first signs of life for `maybeMoveTemp` so that assignments to the tuple-ified outputs will work better

- Add first test case that actually seems to work

- Add diagnostics for conflicting explicit bindings on a parameter

- Add diagnostic for different parameters with overlapping bindings

- Make global-scope varying input/output use a tracking data structure specific to the translation unit for computing locations (so that they are independent of other TUs)
</content>
</entry>
</feed>
