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
945 B32 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 0], stride=4):out,name=outputBuffer
7RWStructuredBuffer<int> outputBuffer;
8
9struct DefaultStructWithInit
10{
11    int data0 = 3;
12    int data1 = 0;
13};
14extension DefaultStructWithInit
15{
16    [mutating]
17    __init(int inData)
18    {
19        data1 = 3;
20    }
21}
22
23[numthreads(1, 1, 1)]
24void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID)
25{
26    DefaultStructWithInit withInit = DefaultStructWithInit(5);
27    // BUF: 1
28    outputBuffer[0] = true
29        && withInit.data0 == 3
30        && withInit.data1 == 3
31        ;
32}