hasvk: Drop support for atomic_int64 and atomic_float2
authorJason Ekstrand <jason.ekstrand@collabora.com>
Sat, 3 Sep 2022 04:44:52 +0000 (23:44 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Dec 2022 09:18:17 +0000 (09:18 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

src/intel/vulkan_hasvk/anv_device.c
src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c

index 401ffa7e2420e6ee236aeff079801ad70a896cf6..1b65f1b3b8baeff21f2c2969c740c30d226dc912 100644 (file)
@@ -234,7 +234,6 @@ get_device_extensions(const struct anv_physical_device *device,
       .KHR_sampler_mirror_clamp_to_edge      = true,
       .KHR_sampler_ycbcr_conversion          = true,
       .KHR_separate_depth_stencil_layouts    = true,
-      .KHR_shader_atomic_int64               = device->info.ver >= 9,
       .KHR_shader_clock                      = true,
       .KHR_shader_draw_parameters            = true,
       .KHR_shader_float16_int8               = device->info.ver >= 8,
@@ -309,7 +308,6 @@ get_device_extensions(const struct anv_physical_device *device,
       .EXT_scalar_block_layout               = true,
       .EXT_separate_stencil_usage            = true,
       .EXT_shader_atomic_float               = true,
-      .EXT_shader_atomic_float2              = device->info.ver >= 9,
       .EXT_shader_demote_to_helper_invocation = true,
       .EXT_shader_module_identifier          = true,
       .EXT_shader_stencil_export             = device->info.ver >= 9,
@@ -1181,7 +1179,7 @@ anv_get_physical_device_features_1_2(struct anv_physical_device *pdevice,
    f->storageBuffer8BitAccess             = pdevice->info.ver >= 8;
    f->uniformAndStorageBuffer8BitAccess   = pdevice->info.ver >= 8;
    f->storagePushConstant8                = pdevice->info.ver >= 8;
-   f->shaderBufferInt64Atomics            = pdevice->info.ver >= 9;
+   f->shaderBufferInt64Atomics            = false;
    f->shaderSharedInt64Atomics            = false;
    f->shaderFloat16                       = pdevice->info.ver >= 8;
    f->shaderInt8                          = pdevice->info.ver >= 8;
@@ -1490,24 +1488,6 @@ void anv_GetPhysicalDeviceFeatures2(
          break;
       }
 
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: {
-         VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *features = (void *)ext;
-         features->shaderBufferFloat16Atomics      = false;
-         features->shaderBufferFloat16AtomicAdd    = false;
-         features->shaderBufferFloat16AtomicMinMax = false;
-         features->shaderBufferFloat32AtomicMinMax = pdevice->info.ver >= 9;
-         features->shaderBufferFloat64AtomicMinMax =
-            pdevice->info.has_64bit_float && pdevice->info.has_lsc;
-         features->shaderSharedFloat16Atomics      = false;
-         features->shaderSharedFloat16AtomicAdd    = false;
-         features->shaderSharedFloat16AtomicMinMax = false;
-         features->shaderSharedFloat32AtomicMinMax = pdevice->info.ver >= 9;
-         features->shaderSharedFloat64AtomicMinMax = false;
-         features->shaderImageFloat32AtomicMinMax  = false;
-         features->sparseImageFloat32AtomicMinMax  = false;
-         break;
-      }
-
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: {
          VkPhysicalDeviceShaderClockFeaturesKHR *features =
             (VkPhysicalDeviceShaderClockFeaturesKHR *)ext;
index 0b2695d65887d1eeee9a65d11bdf62dde4489fda..5e6280dc958882a13b3b920891d4c0201c88f43e 100644 (file)
@@ -647,7 +647,7 @@ build_buffer_addr_for_deref(nir_builder *b, nir_deref_instr *deref,
 
 static bool
 try_lower_direct_buffer_intrinsic(nir_builder *b,
-                                  nir_intrinsic_instr *intrin, bool is_atomic,
+                                  nir_intrinsic_instr *intrin,
                                   struct apply_pipeline_layout_state *state)
 {
    nir_deref_instr *deref = nir_src_as_deref(intrin->src[0]);
@@ -664,13 +664,6 @@ try_lower_direct_buffer_intrinsic(nir_builder *b,
    nir_address_format addr_format = descriptor_address_format(desc, state);
 
    if (nir_deref_mode_is(deref, nir_var_mem_ssbo)) {
-      /* 64-bit atomics only support A64 messages so we can't lower them to
-       * the index+offset model.
-       */
-      if (is_atomic && nir_dest_bit_size(intrin->dest) == 64 &&
-          !state->pdevice->info.has_lsc)
-         return false;
-
       /* Normal binding table-based messages can't handle non-uniform access
        * so we have to fall back to A64.
        */
@@ -753,8 +746,6 @@ lower_direct_buffer_instr(nir_builder *b, nir_instr *instr, void *_state)
    switch (intrin->intrinsic) {
    case nir_intrinsic_load_deref:
    case nir_intrinsic_store_deref:
-      return try_lower_direct_buffer_intrinsic(b, intrin, false, state);
-
    case nir_intrinsic_deref_atomic_add:
    case nir_intrinsic_deref_atomic_imin:
    case nir_intrinsic_deref_atomic_umin:
@@ -769,7 +760,7 @@ lower_direct_buffer_instr(nir_builder *b, nir_instr *instr, void *_state)
    case nir_intrinsic_deref_atomic_fmin:
    case nir_intrinsic_deref_atomic_fmax:
    case nir_intrinsic_deref_atomic_fcomp_swap:
-      return try_lower_direct_buffer_intrinsic(b, intrin, true, state);
+      return try_lower_direct_buffer_intrinsic(b, intrin, state);
 
    case nir_intrinsic_get_ssbo_size: {
       /* The get_ssbo_size intrinsic always just takes a