https://github.com/shader-slang/slang
Raw File
Tip revision: a7336f53a6235ef7c8b4a13479befb59c7e9e753 authored by Tim Foley on 14 November 2019, 21:39:23 UTC
Update slang-binaries to include Linux x86 glslang (#1125)
Tip revision: a7336f5
empty-struct.slang
//TEST(smoke,compute):COMPARE_COMPUTE:
//TEST(smoke,compute):COMPARE_COMPUTE:-cpu

// Confirm that generics syntax can be used in user
// code and generates valid output.

//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):dxbinding(0),glbinding(0),out,name=outputBuffer
RWStructuredBuffer<float> outputBuffer;

struct Simple
{
    float getVal() {return 1.0;}
};

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