yum-mirror/slang

Making it easier to work with shaders

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

Tim FoleyCleanups to `ParameterBlock<T>` behavior. (#304)0f55649cc

master
315 B21 linesraw
1// rewriter-parameter-block.slang
2//TEST_IGNORE_FILE:
3
4// A type that mixes uniform and resource fields
5struct Data
6{
7	int val;
8	RWStructuredBuffer<int> buf;
9};
10
11// A function that uses that type
12int test(Data data, int val)
13{
14	return data.val + data.buf[val];
15}
16
17cbuffer C
18{
19	ParameterBlock<Data> gA;
20	Data gB;
21};