summaryrefslogtreecommitdiffstats
path: root/tests/reflection/structured-buffer.slang
blob: b3d8b860b56f841ab09b8d3d9a08feb944272c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//TEST:REFLECTION:-profile ps_4_0 -target hlsl -no-codegen

// Confirm that we reflect the contents of structure-buffer types correctly.

struct S
{
	float2 a;
	float  b;
	uint   c;
};

StructuredBuffer<uint> x;
StructuredBuffer<float2> y;
StructuredBuffer<S> z;

float4 main() : SV_Target
{
    return x[0] + y[0].xyxy + z[0].a.xyxy;
}