radv: enable VK_AMD_shader_ballot on GFX6-7 with both compiler backends
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 26 Jun 2020 07:36:46 +0000 (09:36 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 29 Jun 2020 07:40:05 +0000 (07:40 +0000)
It gives +1-2 FPS with Doom Eternal on Pitcairn.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5659>

docs/envvars.rst
src/amd/vulkan/radv_debug.h
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_shader.c

index 3177347eab5d633631cfc48145abf43926e30d52..8ffec2cdac18e2c2fde56a67161a02eb6b26d9ff 100644 (file)
@@ -585,8 +585,6 @@ RADV driver environment variables
       enable local BOs
    ``pswave32``
       enable wave32 for pixel shaders (GFX10+)
-   ``shader_ballot``
-      enable shader ballot
    ``tccompatcmask``
       enable TC-compat cmask for MSAA images
 
index df7d4d2374f338ee05beac43ec1aefe9ff459011..40ecf77cc843beb8e037b6b4c774b3060ef81420 100644 (file)
@@ -62,12 +62,11 @@ enum {
        RADV_PERFTEST_LOCAL_BOS       =    0x1,
        RADV_PERFTEST_DCC_MSAA        =    0x2,
        RADV_PERFTEST_BO_LIST         =    0x4,
-       RADV_PERFTEST_SHADER_BALLOT   =    0x8,
-       RADV_PERFTEST_TC_COMPAT_CMASK =   0x10,
-       RADV_PERFTEST_CS_WAVE_32      =   0x20,
-       RADV_PERFTEST_PS_WAVE_32      =   0x40,
-       RADV_PERFTEST_GE_WAVE_32      =   0x80,
-       RADV_PERFTEST_DFSM            =  0x100,
+       RADV_PERFTEST_TC_COMPAT_CMASK =    0x8,
+       RADV_PERFTEST_CS_WAVE_32      =   0x10,
+       RADV_PERFTEST_PS_WAVE_32      =   0x20,
+       RADV_PERFTEST_GE_WAVE_32      =   0x40,
+       RADV_PERFTEST_DFSM            =   0x80,
 };
 
 bool
index ef309249fd8c6ad6ce9349d211afcacce3f654a3..4401f39e77cb3050838e10cc705d867e91ee3c2e 100644 (file)
@@ -372,9 +372,6 @@ radv_physical_device_try_create(struct radv_instance *instance,
        device->dcc_msaa_allowed =
                (device->instance->perftest_flags & RADV_PERFTEST_DCC_MSAA);
 
-       device->use_shader_ballot = (!device->use_llvm && device->rad_info.chip_class >= GFX8) ||
-                                   (device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT);
-
        device->use_ngg = device->rad_info.chip_class >= GFX10 &&
                          device->rad_info.family != CHIP_NAVI14 &&
                          !(device->instance->debug_flags & RADV_DEBUG_NO_NGG);
@@ -520,7 +517,6 @@ static const struct debug_control radv_perftest_options[] = {
        {"localbos", RADV_PERFTEST_LOCAL_BOS},
        {"dccmsaa", RADV_PERFTEST_DCC_MSAA},
        {"bolist", RADV_PERFTEST_BO_LIST},
-       {"shader_ballot", RADV_PERFTEST_SHADER_BALLOT},
        {"tccompatcmask", RADV_PERFTEST_TC_COMPAT_CMASK},
        {"cswave32", RADV_PERFTEST_CS_WAVE_32},
        {"pswave32", RADV_PERFTEST_PS_WAVE_32},
index 4027eec0c385f367cfcfb9e549f07c9ef5ccbc1a..a390ffe556fb73f7b600c6b98c96b242ae0ccf8b 100644 (file)
@@ -171,7 +171,7 @@ EXTENSIONS = [
     # Disable mixed attachment samples on GFX6-GFX7 until the CTS failures have been resolved.
     Extension('VK_AMD_mixed_attachment_samples',          1, 'device->rad_info.chip_class >= GFX8'),
     Extension('VK_AMD_rasterization_order',               1, 'device->rad_info.has_out_of_order_rast'),
-    Extension('VK_AMD_shader_ballot',                     1, 'device->use_shader_ballot'),
+    Extension('VK_AMD_shader_ballot',                     1, True),
     Extension('VK_AMD_shader_core_properties',            1, True),
     Extension('VK_AMD_shader_core_properties2',           1, True),
     Extension('VK_AMD_shader_explicit_vertex_parameter',  1, True),
index 902893a7d40d815ff4bdc2a62f55795d7c131ec6..17d83eaaaa80815308de8b7c756467a10659e351 100644 (file)
@@ -294,9 +294,6 @@ struct radv_physical_device {
        /* Whether DCC should be enabled for MSAA textures. */
        bool dcc_msaa_allowed;
 
-       /* Whether to enable the AMD_shader_ballot extension */
-       bool use_shader_ballot;
-
        /* Whether to enable NGG. */
        bool use_ngg;
 
index 2aa6b191699093afe3ca1f0f3df7262388a0b31d..0946560b833e7d172f78785454f785349b0f28ba 100644 (file)
@@ -365,7 +365,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                                .amd_gcn_shader = true,
                                .amd_image_gather_bias_lod = true,
                                .amd_image_read_write_lod = true,
-                               .amd_shader_ballot = device->physical_device->use_shader_ballot,
+                               .amd_shader_ballot = true,
                                .amd_shader_explicit_vertex_parameter = true,
                                .amd_trinary_minmax = true,
                                .demote_to_helper_invocation = true,