<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/cross-compile/compile-time-loop.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>2018-02-03T15:30:54+00:00</updated>
<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>Add a compile-time loop construct to Slang</title>
<updated>2017-07-18T21:51:12+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-07-18T21:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2476c035ec15d3ee22239ebd1fe10e6e8c1e01e3'/>
<id>urn:sha1:2476c035ec15d3ee22239ebd1fe10e6e8c1e01e3</id>
<content type='text'>
The basic syntax is:

    $for(i in Range(0,99))
    {
       /* stuff goes here */
    }

Note that the exact form is very restrictive. All that you are allowed to change is `i`, `0`, `99` or `/* stuff goes here */`.

As a tiny bit of syntax sugar, the following should work:

    $for(i in Range(99))
    {
       /* stuff goes here */
    }

Note that the range given is half-open (C++ iterator `[begin,end)` style).
Both the beginning and end of the range must be compile-time constant expressions that Slang knows how to constant-fold.

The implementation will basically generate code for `/* stuff goes here */` N times, once for each value in the half-open range.
Each time, the variable `i` will be replaced with a different compile-time-constant expression.

While I was working on a test case for this, I also found that our build of glslang had an issue with resource limits, so I fixed that.
Clients will need to build a new glslang to use the fix.
</content>
</entry>
</feed>
