summaryrefslogtreecommitdiff
path: root/tests/reflection/global-type-params.slang
blob: bfeb7fb2e7e57324dbf3b00ed7180fb3f7a3909a (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
31
32
33
34
35
//TEST:REFLECTION:-profile ps_4_0 -target hlsl -no-codegen

// Confirm that we handle global generic parameters


float4 u;

interface IBase
{};

__generic_param TParam : IBase;
__generic_param TParam2 : IBase;

struct S
{
	TParam2 p;
};

ParameterBlock<S> arg;
ParameterBlock<TParam> arg1;

Texture2D t;
SamplerState s;

cbuffer CB
{
	float4 v;
}

float4 w;

float4 main() : SV_Target
{
	return u + v + w + t.Sample(s, u.xy);
}