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