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
1.1 KiB38 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#pragma warning(disable:30816)
7
8
9//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
10RWStructuredBuffer<int> outputBuffer;
11
12struct DefaultStructNoInit_base
13{
14    static const int data0 = 2;
15    static int data1 = 2;
16    int data2 = 2;
17};
18
19struct DefaultStructNoInit : DefaultStructNoInit_base
20{
21    int data3 = 2;
22    static int data4 = 2;
23};
24
25[numthreads(1, 1, 1)]
26void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID)
27{
28    DefaultStructNoInit::data4 = 0;
29    DefaultStructNoInit noInit = {};
30    // BUF: 1
31    outputBuffer[0] = true
32        && noInit.data0 == 2
33        && noInit.data1 == 2
34        && noInit.data2 == 2
35        && noInit.data3 == 2
36        && noInit.data4 == 0;
37        ;
38}