zink: Only expose PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD if we can actually add.
authorEmma Anholt <emma@anholt.net>
Tue, 3 Jan 2023 22:17:48 +0000 (14:17 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 5 Jan 2023 00:55:18 +0000 (00:55 +0000)
Drivers may expose the ext without the add capability, if they can
load/store/exchange.

Fixes: c32f046ab669 ("zink: export PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20506>

src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt
src/gallium/drivers/zink/ci/zink-radv-fails.txt
src/gallium/drivers/zink/zink_screen.c

index 36107f0..7690116 100644 (file)
@@ -896,8 +896,6 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp,Fail
 spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp@sRGB decode full precision,Fail
 
 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20506
-spec@nv_shader_atomic_float@execution@shared-atomicadd-float,Crash
-spec@nv_shader_atomic_float@execution@ssbo-atomicadd-float,Crash
 spec@nv_shader_atomic_int64@execution@shared-atomicadd-int,Fail
 spec@nv_shader_atomic_int64@execution@shared-atomicand-int,Fail
 spec@nv_shader_atomic_int64@execution@shared-atomicand-uint,Fail
index 909db7e..d1e7bec 100644 (file)
@@ -473,9 +473,6 @@ spec@!opengl 1.1@read-front samples=6,Fail
 spec@!opengl 1.1@read-front samples=8,Fail
 spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
 
-# Zink bug (RADV doesn't support shaderBufferFloat64AtomicAdd)
-spec@nv_shader_atomic_float@execution@ssbo-atomicadd-float,Crash
-
 # ACO bugs (pass with LLVM)
 spec@nv_shader_atomic_int64@execution@shared-atomicmax-int,Crash
 spec@nv_shader_atomic_int64@execution@shared-atomicmax-uint,Crash
index 8b3643f..48489a1 100644 (file)
@@ -595,7 +595,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return screen->info.feats.features.multiDrawIndirect;
 
    case PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD:
-      return screen->info.have_EXT_shader_atomic_float;
+      return (screen->info.have_EXT_shader_atomic_float &&
+              screen->info.atomic_float_feats.shaderSharedFloat32AtomicAdd &&
+              screen->info.atomic_float_feats.shaderBufferFloat32AtomicAdd);
    case PIPE_CAP_SHADER_ATOMIC_INT64:
       return screen->info.have_KHR_shader_atomic_int64;