<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/compute/byte-address-buffer.slang.expected.txt, 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-11-19T17:07:34+00:00</updated>
<entry>
<title>Add Vulkan cross-compilation for byte-address buffers (#721)</title>
<updated>2018-11-19T17:07:34+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-11-19T17:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7e0c5ad677e04be4ecd2ce087d856ba26f1667a4'/>
<id>urn:sha1:7e0c5ad677e04be4ecd2ce087d856ba26f1667a4</id>
<content type='text'>
* Add Vulkan cross-compilation for byte-address buffers

This covers `ByteAddressBuffer`, `RWByteAddressBuffer`, and `RasterizerOrderedByteAddressBuffer`. A declaration of any of these types translates to a GLSL `buffer` declaration with a single `uint` array of data. Most of the methods on these types then have straightforward translations to operations on the array. The overall translation is similar to what was already being done for structured buffers.

While implementing GLSL translation for the various atomic (`Interlocked*`) methods, I discovered that some of these included declarations that aren't actually included in HLSL. I cleaned these up, including in the declarations of the global `Interlocked*` functions.

The test case that is included here covers only the most basic functionality: `Load`, `Load2`, `Load4` and `Store`. We should try to back-fill tests for the remaining methods when we have time.

Two large caveats with this work:

1. We don't handle arrays of byte-address buffers, just as we don't handle arrays of structured buffers. That will take additional work.

2. We don't handle byte-address (or structured) buffers being passed as function parameters, since the parameter would need to be declared as a bare `uint[]` array.

* Fixup: don't lump raytracing acceleration structures in with buffers

Raytracing acceleration structures share a common base class with byte-address buffers (they are both buffer resources without a specific element type), and I was mistakently matching on this base class in an attempt to have a catch-all that applied to all byte-address buffers.

The fix here was to add a distinct base class for all byte-address buffers and catch that instead.

* Fixup: typos
</content>
</entry>
</feed>
