Revision b915ae662b2e4bcaaeb6da62eb964356d0a978b4 authored by jsmall-nvidia on 05 May 2022, 19:53:29 UTC, committed by GitHub on 05 May 2022, 19:53:29 UTC
* #include an absolute path didn't work - because paths were taken to always be relative. * Add support for HLSL `export`. * Test for using `export` keyword.
1 parent 3088d90
gh-566.slang
// legalize-struct-init.slang
//TEST(compute):COMPARE_COMPUTE: -shaderobj
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
//TEST_INPUT:ubuffer(data=[4 3 2 1], stride=4):name inputBuffer
RWStructuredBuffer<uint> outputBuffer;
RWStructuredBuffer<uint> inputBuffer;
struct Helper
{
RWStructuredBuffer<uint> o;
RWStructuredBuffer<uint> i;
uint t;
};
void test(Helper h)
{
h.o[h.t] = h.i[h.t] * 16 + h.t;
}
void test(uint t)
{
Helper h = { outputBuffer, inputBuffer, t };
test(h);
}
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint tid = dispatchThreadID.x;
test(tid);
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...