summaryrefslogtreecommitdiff
path: root/tests/bindings/glsl-parameter-blocks.slang
blob: 48eacbb0f277d4ac85353b24b564eb660459637b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#version 450 core
//TEST:CROSS_COMPILE: -profile ps_5_0 -entry main -target spirv-assembly

// Note: disabled because the translation of `Texture2D.Sample()`
// requires handling of local variables with resource types in the IR.

struct Test
{
    float4 a;
	Texture2D t;
	SamplerState s;
};

ParameterBlock<Test> gTest;

float4 main(float2 uv : UV)
{
	return gTest.a + gTest.t.Sample(gTest.s, uv);
}