yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

James Helferty (NVIDIA)render-test: Change D3D12 default to sm_6_5 (#8320)f02b08490

master
924 B26 linesraw
1//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain 
2//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -emit-spirv-directly
3//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-cpu -compute -entry computeMain
4//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-dx12 -compute -entry computeMain
5
6//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
7import struct_field_initializer_import_target;
8RWStructuredBuffer<int> outputBuffer;
9
10void modifyOut(out DefaultStructNoInit2 noInit2)
11{
12    noInit2.data0 = 2;
13}
14
15[numthreads(1, 1, 1)]
16void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID)
17{
18    DefaultStructNoInit noInit = {};
19    DefaultStructNoInit2 noInit2 = {};
20    modifyOut(noInit2);
21    // BUF: 1
22    outputBuffer[0] = true
23        && noInit.data0 == 2
24        && noInit2.data0 == 2
25        ;
26}