yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
579d34d5
main
1#version 450 core 2 3#extension GL_ARB_gpu_shader_int64 : enable 4#extension GL_EXT_shader_image_int64 : enable 5#extension GL_KHR_memory_scope_semantics : enable 6#extension GL_ARB_sparse_texture2 : enable 7 8layout (binding = 0 ,r64i )uniform i64image1D i1D ; 9layout (binding = 1 ,r64ui )uniform u64image2D u2D ; 10layout (binding = 2 ,r64i )uniform i64image3D i3D ; 11layout (binding = 3 ,r64ui )uniform u64imageCube uCube ; 12layout (binding = 4 ,r64i )uniform i64imageBuffer iBuf ; 13layout (binding = 5 ,r64ui )uniform u64image1DArray u1DArray ; 14layout (binding = 6 ,r64i )uniform i64image2DArray i2DArray ; 15layout (binding = 7 ,r64ui )uniform u64imageCubeArray uCubeArray ; 16layout (binding = 8 ,r64i )uniform i64image2DRect i2DRect ; 17layout (binding = 9 ,r64ui )uniform u64image2DMS u2DMS ; 18layout (binding = 10 ,r64i )uniform i64image2DMSArray i2DMSArray ; 19 20layout (binding = 11 )buffer Buf 21{ 22int64_t i64 ; 23uint64_t u64 ; 24i64vec4 i64v4 ; 25u64vec4 u64v4 ; 26ivec4 i32v4 ; 27}; 28 29void main () 30{ 31i64 = imageAtomicAdd (i1D ,i32v4 .x ,i64 ); 32i64 = imageAtomicMin (i3D ,i32v4 .xyz ,i64 ); 33i64 = imageAtomicMax (iBuf ,i32v4 .x ,i64 ); 34i64 = imageAtomicAnd (i2DArray ,i32v4 .xyz ,i64 ); 35i64 = imageAtomicOr (i2DRect ,i32v4 .xy ,i64 ); 36i64 = imageAtomicXor (i2DMSArray ,i32v4 .xyz ,i32v4 .w ,i64 ); 37i64 = imageAtomicExchange (i1D ,i32v4 .x ,i64 ); 38i64 = imageAtomicCompSwap (i3D ,i32v4 .xyz ,i64 ,i64 + 1 ); 39 40i64 = imageAtomicAdd (i1D ,i32v4 .x ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 41i64 = imageAtomicMin (i3D ,i32v4 .xyz ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 42i64 = imageAtomicMax (iBuf ,i32v4 .x ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 43i64 = imageAtomicAnd (i2DArray ,i32v4 .xyz ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 44i64 = imageAtomicOr (i2DRect ,i32v4 .xy ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 45i64 = imageAtomicXor (i2DMSArray ,i32v4 .xyz ,i32v4 .w ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 46i64 = imageAtomicExchange (i1D ,i32v4 .x ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 47i64 = imageAtomicCompSwap (i3D ,i32v4 .xyz ,i64 ,i64 + 1 ,gl_ScopeDevice , 48gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ,gl_StorageSemanticsImage ,gl_SemanticsAcquire ); 49i64 = imageAtomicLoad (iBuf ,i32v4 .x ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquire ); 50imageAtomicStore (i2DArray ,i32v4 .xyz ,i64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsRelease ); 51 52u64 = imageAtomicAdd (u2D ,i32v4 .xy ,u64 ); 53u64 = imageAtomicMin (uCube ,i32v4 .xyz ,u64 ); 54u64 = imageAtomicMax (u1DArray ,i32v4 .xy ,u64 ); 55u64 = imageAtomicAnd (uCubeArray ,i32v4 .xyz ,u64 ); 56u64 = imageAtomicOr (u2DMS ,i32v4 .xy ,i32v4 .z ,u64 ); 57u64 = imageAtomicXor (u2D ,i32v4 .xy ,u64 ); 58u64 = imageAtomicExchange (uCube ,i32v4 .xyz ,u64 ); 59u64 = imageAtomicCompSwap (u1DArray ,i32v4 .xy ,u64 ,u64 + 1 ); 60 61u64 = imageAtomicAdd (u2D ,i32v4 .xy ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 62u64 = imageAtomicMin (uCube ,i32v4 .xyz ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 63u64 = imageAtomicMax (u1DArray ,i32v4 .xy ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 64u64 = imageAtomicAnd (uCubeArray ,i32v4 .xyz ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 65u64 = imageAtomicOr (u2DMS ,i32v4 .xy ,i32v4 .z ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 66u64 = imageAtomicXor (u2D ,i32v4 .xy ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 67u64 = imageAtomicExchange (uCube ,i32v4 .xyz ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ); 68u64 = imageAtomicCompSwap (u1DArray ,i32v4 .xy ,u64 ,u64 + 1 ,gl_ScopeDevice , 69gl_StorageSemanticsImage ,gl_SemanticsAcquireRelease ,gl_StorageSemanticsImage ,gl_SemanticsAcquire ); 70u64 = imageAtomicLoad (uCubeArray ,i32v4 .xyz ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsAcquire ); 71imageAtomicStore (u2DMS ,i32v4 .xy ,i32v4 .z ,u64 ,gl_ScopeDevice ,gl_StorageSemanticsImage ,gl_SemanticsRelease ); 72 73i64v4 += imageLoad (i1D ,i32v4 .x ); 74i64v4 += imageLoad (i3D ,i32v4 .xyz ); 75i64v4 += imageLoad (iBuf ,i32v4 .x ); 76i64v4 += imageLoad (i2DArray ,i32v4 .xyz ); 77i64v4 += imageLoad (i2DRect ,i32v4 .xy ); 78i64v4 += imageLoad (i2DMSArray ,i32v4 .xyz ,i32v4 .w ); 79 80imageStore (u2D ,i32v4 .xy ,u64v4 ); 81imageStore (uCube ,i32v4 .xyz ,u64v4 ); 82imageStore (u1DArray ,i32v4 .xy ,u64v4 ); 83imageStore (uCubeArray ,i32v4 .xyz ,u64v4 ); 84imageStore (u2DMS ,i32v4 .xy ,i32v4 .z ,u64v4 ); 85 86sparseImageLoadARB (i3D ,i32v4 .xyz ,i64v4 ); 87sparseImageLoadARB (i2DArray ,i32v4 .xyz ,i64v4 ); 88sparseImageLoadARB (i2DRect ,i32v4 .xy ,i64v4 ); 89sparseImageLoadARB (u2D ,i32v4 .xy ,u64v4 ); 90sparseImageLoadARB (uCube ,i32v4 .xyz ,u64v4 ); 91sparseImageLoadARB (uCubeArray ,i32v4 .xyz ,u64v4 ); 92}