https://github.com/shader-slang/slang
Raw File
Tip revision: 652a3c987d2b42d069bf54ba251126208d00d9e7 authored by Tim Foley on 01 February 2018, 22:41:34 UTC
Fix a bug in import handling (#394)
Tip revision: 652a3c9
simple.slang
//TEST(smoke,compute):COMPARE_COMPUTE:-xslang -use-ir
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):dxbinding(0),glbinding(0),out
// This is a basic test for Slang compute shader.

RWStructuredBuffer<float> outputBuffer;

[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
    outputBuffer[dispatchThreadID.x] = float(dispatchThreadID.x);
}
back to top