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-471.slang
//TEST(compute):COMPARE_COMPUTE: -shaderobj
//TEST_INPUT:ubuffer(data=[0 1 2 3], stride=4):out,name outputBuffer
// Test that "operator comma" works as expected
static int a = 0;
int setA(int val)
{
a = val;
return 0;
}
int getA()
{
return a;
}
int test(int inVal)
{
int x = (setA(inVal), getA());
return x * 16;
}
RWStructuredBuffer<int> outputBuffer : register(u0);
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint tid = dispatchThreadID.x;
int inVal = outputBuffer[tid];
int outVal = test(inVal);
outputBuffer[tid] = outVal;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...