radv: Enable ACO on GFX7 (Sea Islands)
authorDaniel Schürmann <daniel@schuermann.dev>
Fri, 15 Nov 2019 14:37:13 +0000 (15:37 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Sat, 7 Dec 2019 10:23:11 +0000 (11:23 +0100)
This patch also disables AMD_shader_ballot on GFX7 by default if ACO is used.
Note that shader_ballot works correctly, but performance seems inferior.
To enable shader_ballot use RADV_PERFTEST=shader_ballot.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
src/amd/vulkan/radv_device.c

index 431e64eeb6fe33cecf0849aeda17baa9330325d6..691f943f6b571a3d0877a78057df513f81a6a30c 100644 (file)
@@ -398,7 +398,7 @@ radv_physical_device_init(struct radv_physical_device *device,
        radv_handle_env_var_force_family(device);
 
        device->use_aco = instance->perftest_flags & RADV_PERFTEST_ACO;
-       if (device->rad_info.chip_class < GFX8 && device->use_aco) {
+       if (device->rad_info.chip_class < GFX7 && device->use_aco) {
                fprintf(stderr, "WARNING: disabling ACO on unsupported GPUs.\n");
                device->use_aco = false;
        }
@@ -439,7 +439,8 @@ radv_physical_device_init(struct radv_physical_device *device,
        device->dcc_msaa_allowed =
                (device->instance->perftest_flags & RADV_PERFTEST_DCC_MSAA);
 
-       device->use_shader_ballot = device->use_aco || (device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT);
+       device->use_shader_ballot = (device->use_aco && 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 &&