summaryrefslogtreecommitdiff
path: root/tests/cross-compile/dual-source-blending.slang
blob: 51af956b20e7ec0c9d22ec91ba49268340ea50ea (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
//dual-source-blending.slang

// Test handling of `vk::location` and
// `vk::index` attributes to compile
// for dual-source color blending.

//TEST:CROSS_COMPILE:-target spirv-assembly -entry main -stage fragment
//TEST_DISABLED:SIMPLE:-target glsl

struct FragmentOutput
{
	[[vk::location(0)]]
	float4 a : SV_Target0;

	[[vk::location(0), vk::index(1)]]
	float4 b : SV_Target1;
}

[shader("fragment")]
FragmentOutput main(float4 v : V)
{
	FragmentOutput f = {};
	f.a = v;
	f.b = v;
	return f;	
}