2019-06-11 08:45:22 +00:00
|
|
|
#version 450
|
|
|
|
#extension GL_ARB_gpu_shader_int64 : require
|
|
|
|
layout(local_size_x = 1) in;
|
|
|
|
|
|
|
|
struct M0
|
|
|
|
{
|
|
|
|
int64_t v;
|
|
|
|
i64vec2 b[2];
|
|
|
|
uint64_t c;
|
|
|
|
uint64_t d[5];
|
|
|
|
};
|
|
|
|
|
2019-06-19 08:11:10 +00:00
|
|
|
struct SSBO0_Type
|
2019-06-11 08:45:22 +00:00
|
|
|
{
|
|
|
|
i64vec4 a;
|
|
|
|
M0 m0;
|
2019-06-19 08:11:10 +00:00
|
|
|
};
|
2019-06-11 08:45:22 +00:00
|
|
|
|
2019-06-19 08:11:10 +00:00
|
|
|
struct SSBO1_Type
|
2019-06-11 08:45:22 +00:00
|
|
|
{
|
|
|
|
u64vec4 b;
|
|
|
|
M0 m0;
|
2019-06-19 08:11:10 +00:00
|
|
|
};
|
2019-06-11 08:45:22 +00:00
|
|
|
|
2019-06-19 08:11:10 +00:00
|
|
|
struct SSBO2_Type
|
2019-06-11 08:45:22 +00:00
|
|
|
{
|
|
|
|
int64_t a[4];
|
|
|
|
i64vec2 b[4];
|
2019-06-19 08:11:10 +00:00
|
|
|
};
|
2019-06-11 08:45:22 +00:00
|
|
|
|
2019-06-19 08:11:10 +00:00
|
|
|
struct SSBO3_Type
|
2019-06-11 08:45:22 +00:00
|
|
|
{
|
|
|
|
int64_t a[4];
|
|
|
|
i64vec2 b[4];
|
2019-06-19 08:11:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
layout(set = 0, binding = 0, std430) buffer SSBO
|
|
|
|
{
|
|
|
|
int s32;
|
|
|
|
uint u32;
|
|
|
|
};
|
2019-06-11 08:45:22 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2019-06-19 08:11:10 +00:00
|
|
|
SSBO0_Type ssbo_0;
|
|
|
|
SSBO1_Type ssbo_1;
|
|
|
|
SSBO2_Type ssbo_2;
|
|
|
|
SSBO3_Type ssbo_3;
|
|
|
|
|
2019-06-11 08:45:22 +00:00
|
|
|
ssbo_0.a += i64vec4(10, 20, 30, 40);
|
|
|
|
ssbo_1.b += u64vec4(999999999999999999ul, 8888888888888888ul, 77777777777777777ul, 6666666666666666ul);
|
|
|
|
ssbo_0.a += 20;
|
|
|
|
ssbo_0.a = abs(ssbo_0.a + i64vec4(ssbo_1.b));
|
|
|
|
|
|
|
|
ssbo_0.a++;
|
|
|
|
ssbo_1.b++;
|
|
|
|
ssbo_0.a--;
|
|
|
|
ssbo_1.b--;
|
|
|
|
|
|
|
|
ssbo_2.a[0] += 1l;
|
|
|
|
ssbo_3.a[0] += 2l;
|
2019-06-19 08:11:10 +00:00
|
|
|
|
|
|
|
s32 = int(ssbo_0.a.x + ssbo_1.b.y + ssbo_2.a[1] + ssbo_3.a[2]);
|
|
|
|
u32 = uint(ssbo_0.a.y + ssbo_1.b.z + ssbo_2.a[0] + ssbo_3.a[1]);
|
2019-06-11 08:45:22 +00:00
|
|
|
}
|