blob: 830f22f4e78dedb14dc936073f1c652429bdd16a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// rewriter-parameter-block.slang
//TEST_IGNORE_FILE:
// A type that mixes uniform and resource fields
struct Data
{
int val;
RWStructuredBuffer<int> buf;
};
// A function that uses that type
int test(Data data, int val)
{
return data.val + data.buf[val];
}
// A global-scope parameter block of the mixed type
ParameterBlock<Data> gA;
// A constant buffer declaration containing the mixed type
cbuffer C
{
int extra;
ParameterBlock<Data> gB;
};
|