radv: add VK_KHR_shader_atomic_int64 but disable it for now
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 16 Apr 2019 08:38:24 +0000 (10:38 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 17 Apr 2019 19:59:56 +0000 (21:59 +0200)
No support for 64-bit compare&swap atomic operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_shader.c

index 1ad972a195de0b943d98240d78e680b479973056..96c6543141e071dd28b85b936802c0ad47c0ea9b 100644 (file)
@@ -909,6 +909,16 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->shaderInt8 = true;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR: {
+                       VkPhysicalDeviceShaderAtomicInt64FeaturesKHR *features =
+                               (VkPhysicalDeviceShaderAtomicInt64FeaturesKHR *)ext;
+                       /* TODO: Enable this once the driver supports 64-bit
+                        * compare&swap atomic operations.
+                        */
+                       features->shaderBufferInt64Atomics = false;
+                       features->shaderSharedInt64Atomics = false;
+                       break;
+               }
                default:
                        break;
                }
index 13fe391e6234e9cff72411f1b3e5893c019ec69f..4b12ccc47a067b22cf64fd581eda0e74fcf1793d 100644 (file)
@@ -81,6 +81,7 @@ EXTENSIONS = [
     Extension('VK_KHR_push_descriptor',                   1, True),
     Extension('VK_KHR_relaxed_block_layout',              1, True),
     Extension('VK_KHR_sampler_mirror_clamp_to_edge',      1, True),
+    Extension('VK_KHR_shader_atomic_int64',               1, False),
     Extension('VK_KHR_shader_draw_parameters',            1, True),
     Extension('VK_KHR_shader_float16_int8',               1, True),
     Extension('VK_KHR_storage_buffer_storage_class',      1, True),
index a967709477250141b99c98217e1acb1a49e1bc72..c802abb0e081837e4048b22c9e5bd214078a60c3 100644 (file)
@@ -235,6 +235,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                                .int8 = true,
                                .int16 = true,
                                .int64 = true,
+                               .int64_atomics = true,
                                .multiview = true,
                                .physical_storage_buffer_address = true,
                                .runtime_descriptor_array = true,