Welcome to mirror list, hosted at ThFree Co, Russian Federation.

raw-buffer-descriptor-aliasing.argument.discrete.device-argument-buffer.msl2.comp « comp « shaders-msl - github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 25ec7840ef0be0d27a4560c72ae3eb83a1613fdf (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#version 450
layout(local_size_x = 64) in;

layout(set = 0, binding = 0) buffer SSBO_A
{
	float data[];
} ssbo_a;

layout(set = 0, binding = 0) buffer SSBO_B
{
	uvec2 data[];
} ssbo_b;

layout(set = 0, binding = 0) readonly buffer SSBO_BRO
{
	uvec2 data[];
} ssbo_b_readonly;

layout(set = 0, binding = 1) uniform UBO_C
{
	float data[1024];
} ubo_c;

layout(set = 0, binding = 1) uniform UBO_D
{
	uvec2 data[1024];
} ubo_d;

layout(set = 0, binding = 2) buffer SSBO_As 
{
	float data[];
} ssbo_as[4];

layout(set = 0, binding = 2) buffer SSBO_Bs
{
	uvec2 data[1024];
} ssbo_bs[4];

layout(set = 0, binding = 2) readonly buffer SSBO_BsRO
{
	uvec2 data[1024];
} ssbo_bs_readonly[4];

layout(set = 0, binding = 3) uniform UBO_Cs
{
	float data[1024];
} ubo_cs[4];

layout(set = 0, binding = 3) uniform UBO_Ds
{
	uvec2 data[1024];
} ubo_ds[4];

layout(set = 2, binding = 0) buffer SSBO_E
{
	float data[];
} ssbo_e;

layout(set = 2, binding = 0) buffer SSBO_F
{
	uvec2 data[];
} ssbo_f;

layout(set = 2, binding = 1) uniform UBO_G
{
	float data[1024];
} ubo_g;

layout(set = 2, binding = 1) uniform UBO_H
{
	uvec2 data[1024];
} ubo_h;

layout(set = 2, binding = 0) readonly buffer SSBO_I
{
	uvec2 data[];
} ssbo_i;

void func0()
{
	ssbo_a.data[gl_GlobalInvocationID.x] = ubo_c.data[gl_WorkGroupID.x];
	ssbo_b.data[gl_GlobalInvocationID.x] =
		ubo_d.data[gl_WorkGroupID.y] + ssbo_b_readonly.data[gl_GlobalInvocationID.x];
}

void func1()
{
	ssbo_as[gl_WorkGroupID.x].data[gl_GlobalInvocationID.x] = ubo_cs[gl_WorkGroupID.x].data[0];
}

void func2()
{
	ssbo_bs[gl_WorkGroupID.x].data[gl_GlobalInvocationID.x] =
		ubo_ds[gl_WorkGroupID.x].data[0] + ssbo_bs_readonly[gl_WorkGroupID.x].data[gl_GlobalInvocationID.x];
}

void func3()
{
	ssbo_e.data[gl_GlobalInvocationID.x] = ubo_g.data[gl_WorkGroupID.x];
	ssbo_f.data[gl_GlobalInvocationID.x] = ubo_h.data[gl_WorkGroupID.y] + ssbo_i.data[gl_GlobalInvocationID.x];
}

void main()
{
	func0();
	func1();
	func2();
	func3();
}