radv: enable VK_AMD_shader_ballot on GFX6-7 with both compiler backends
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>
This commit is contained in:

committed by
Marge Bot

parent
cff418cc4c
commit
26a48d8d35
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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},
|
||||
|
@@ -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),
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user