<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/rewriter/resources-in-structs.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>2017-07-11T19:07:09+00:00</updated>
<entry>
<title>Initial work on handling resources in structs during cross-compilation</title>
<updated>2017-07-11T19:07:09+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-07-10T22:40:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=bd7105ff8683a680d1270eca8cd74f9002144dbd'/>
<id>urn:sha1:bd7105ff8683a680d1270eca8cd74f9002144dbd</id>
<content type='text'>
- The basic idea is that during the "lowering" pass, some types (notably: aggregate types that contain resource variables) will get turned into "tuple" types, which are pseduo-types that aren't meant to survive lowering.

- An attempt to declare a variable with a tuple type expands into a tuple of declarations

- An attempt to reference such a tuple-ified variable leads to a tuple of expressions

- An attempt to extract a member from such a tuple expression will pick the appropriate sub-element

- Dereference a tuple by dereferencing the primary expression

- Expand a tuple in the argument list to a call into N arguments (by recursively flattening the tuple)

- Don't create tuple types when not generating GLSL

- Make sure to preserve the specialized type of a call expression through lowering, since emission of unchecked calls relies on that info.
  - TODO: maybe the infix/prefix/postifx/select information should come in as a side-band? Should we have modifiers on expressions?

- Make sure to offset the layout for a nested field based on teh base offset of its parent variable, when generating declarations for nested fields
</content>
</entry>
</feed>
