mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
420b7913d4
2820ab0b51 Merge pull request #1076 from KhronosGroup/bitcast-pre-330-glsl 63bcbd511e GLSL: Need extension to use bitcast on GLSL < 330. 9f3bebe3d0 Merge pull request #1075 from lifpan/master b11c20fc1d Remove unreasonable assertion for OpTypeImage Sampled parameter. 1a592b7c0f Merge pull request #1067 from cdavis5e/msl-scalar-block-layout 28454facbb MSL: Handle packed matrices. ea5c0ed82f MSL: Fix alignment of packed types. 44f688bf0b Merge pull request #1070 from KhronosGroup/fix-1066 25c74b324e Forget loop variable enables after emitting block chain. 6b010e0cbc Merge pull request #1069 from KhronosGroup/fix-1053 f6f849397e MSL: Re-roll array expressions in initializers. e5fa7edfd6 MSL: Support scalar block layout. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: 2820ab0b51bf5e4187435d904b34e762b988f48b
66 lines
962 B
Plaintext
66 lines
962 B
Plaintext
#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];
|
|
};
|
|
|
|
struct SSBO0_Type
|
|
{
|
|
i64vec4 a;
|
|
M0 m0;
|
|
};
|
|
|
|
struct SSBO1_Type
|
|
{
|
|
u64vec4 b;
|
|
M0 m0;
|
|
};
|
|
|
|
struct SSBO2_Type
|
|
{
|
|
int64_t a[4];
|
|
i64vec2 b[4];
|
|
};
|
|
|
|
struct SSBO3_Type
|
|
{
|
|
int64_t a[4];
|
|
i64vec2 b[4];
|
|
};
|
|
|
|
layout(set = 0, binding = 0, std430) buffer SSBO
|
|
{
|
|
int s32;
|
|
uint u32;
|
|
};
|
|
|
|
void main()
|
|
{
|
|
SSBO0_Type ssbo_0;
|
|
SSBO1_Type ssbo_1;
|
|
SSBO2_Type ssbo_2;
|
|
SSBO3_Type ssbo_3;
|
|
|
|
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;
|
|
|
|
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]);
|
|
}
|