summaryrefslogtreecommitdiffstats
path: root/tests/bugs/split-nested-types.hlsl
blob: 210c119df1f4b0d631d86390b3976d36b75f3b87 (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
26
27
28
29
30
// array-size-static-const.hlsl
//TEST:COMPARE_HLSL: -profile ps_5_0 -target dxbc-assembly

#ifdef __SLANG__
import split_nested_types;
#else

struct A { int x; };

struct B { float y; };

struct C { Texture2D t; SamplerState s; };

struct M
{
	A a;
	B b;
};

#endif

cbuffer C
{
	M m;
}

float4 main() : SV_target
{
	return m.b.y;
}