yum-mirror/slang

Making it easier to work with shaders

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

Tim FoleyRemove old code paths from render-test (#1760)6e5d85efb

master
1.1 KiB34 linesraw
1//DISABLED_TEST(compute):COMPARE_COMPUTE:
2
3//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out, name=outputBuffer
4
5//TEST_INPUT:cbuffer(data=[256]):name=C.gA.val
6//TEST_INPUT:ubuffer(data=[0 1 2 3], stride=4):name=C.gA.buf
7//TEST_INPUT:cbuffer(data=[4096]):name=C.gB.val
8//TEST_INPUT:ubuffer(data=[16 32 48 64], stride=4):name=C.gB.buf
9
10//TODO_TEST_INPUT:object:name=C
11//TODO_TEST_INPUT:object:name=C.gA
12//TODO_TEST_INPUT:root_constants(data=[256]):name=C.gA.val
13//TODO_TEST_INPUT:ubuffer(data=[0 1 2 3], stride=4):name=C.gA.buf
14//TODO_TEST_INPUT:root_constants(data=[4096]):name=C.gB.val
15//TODO_TEST_INPUT:ubuffer(data=[16 32 48 64], stride=4):name=C.gB.buf
16
17// Test that we can declare a `ParameterBlock<...>` type as a shader
18// parameter (potentially nested inside a `cbuffer`) and use it in
19// shader code processed by the "rewriter"
20
21import rewriter_parameter_block_complex;
22
23RWStructuredBuffer<int> outputBuffer : register(u0);
24
25[numthreads(4, 1, 1)]
26void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
27{
28	uint tid = dispatchThreadID.x;
29	int inVal = tid;
30
31	int outVal = test(gA, inVal) + test(gB, inVal);
32
33	outputBuffer[tid] = outVal;
34}