yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
d964555d2
master
1//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type 2 3//TEST_INPUT: set outputBuffer = out ubuffer(data=[0 0 0 0], stride=4) 4RWStructuredBuffer<float> outputBuffer; 5 6// Test that KnownBuiltin attribute works with enum-based system 7// Using GeometryStreamAppend enum value (0) for testing 8static const int GEOMETRY_STREAM_APPEND_BUILTIN = 0; 9 10[KnownBuiltin(GEOMETRY_STREAM_APPEND_BUILTIN)] 11void testKnownBuiltin() 12{ 13 // This function just needs to exist to test attribute processing 14} 15 16[numthreads(1,1,1)] 17void computeMain() 18{ 19 // Simple test that the code compiles and runs 20 outputBuffer[0] = 42.0f; 21 // CHECK: 42.0 22}