Add GL_EXT_shader_image_int64 support (#2409)

This commit is contained in:
Tobski
2020-11-04 16:24:23 +00:00
committed by GitHub
parent 478b232952
commit 8c1a3a06b8
19 changed files with 5349 additions and 3697 deletions

View File

@@ -1,6 +1,8 @@
#version 450 core
#extension GL_AMD_shader_image_load_store_lod: enable
#extension GL_ARB_gpu_shader_int64: enable
#extension GL_EXT_shader_image_int64: enable
layout(rgba32f, binding = 0) uniform image1D i1D;
layout(rgba32f, binding = 1) uniform image2D i2D;
@@ -12,6 +14,20 @@ layout(rgba32ui, binding = 6) uniform uimageCubeArray uiCubeArray;
layout(location = 0) out vec4 fragColor;
layout(r64i, binding = 7) uniform i64image1D i64i1D;
layout(r64i, binding = 8) uniform i64image2D i64i2D;
layout(r64i, binding = 9) uniform i64image3D i64i3D;
layout(r64ui, binding = 10) uniform u64imageCube u64iCube;
layout(r64ui, binding = 11) uniform u64image1DArray u64i1DArray;
layout(r64ui, binding = 12) uniform u64image2DArray u64i2DArray;
layout(r64ui, binding = 13) uniform u64imageCubeArray u64iCubeArray;
layout(binding = 14) buffer Buf
{
i64vec4 i64v4;
u64vec4 u64v4;
};
void main()
{
const int c1 = 1;
@@ -33,4 +49,14 @@ void main()
sparseImageLoadLodAMD(uiCubeArray, c3, lod, u4);
fragColor = f4 + vec4(u4);
i64v4 += imageLoadLodAMD(i64i1D, c1, lod);
i64v4 += imageLoadLodAMD(i64i2D, c2, lod);
i64v4 += imageLoadLodAMD(i64i3D, c3, lod);
imageStoreLodAMD(u64iCube, c3, lod, u64v4);
imageStoreLodAMD(u64i1DArray, c2, lod, u64v4);
sparseImageLoadLodAMD(u64i2DArray, c3, lod, u64v4);
sparseImageLoadLodAMD(u64iCubeArray, c3, lod, u64v4);
}