radv: allow to enable VK_AMD_shader_ballot only on GFX8+
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 21 Aug 2019 06:38:24 +0000 (08:38 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 21 Aug 2019 13:14:29 +0000 (15:14 +0200)
Scans aren't implemented on SI/CIK.

Cc: 19.2 <mesa-stable@lists.freedesktop.org>
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_shader.c

index cc45ac95c08f7d197047f94659bdc992c73a0519..4aafe6e78aa0c389a3de4d43d96703eb61479cf7 100644 (file)
@@ -383,7 +383,8 @@ radv_physical_device_init(struct radv_physical_device *device,
                                          device->rad_info.family == CHIP_RENOIR ||
                                          device->rad_info.chip_class >= GFX10;
 
-       device->use_shader_ballot = device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT;
+       device->use_shader_ballot = device->rad_info.chip_class >= GFX8 &&
+                                   device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT;
 
        /* Determine the number of threads per wave for all stages. */
        device->cs_wave_size = 64;
index cb819388fa4d9b3f7cb562287115aecb5f41b5bf..9397c5d6f402a266b8426187e8a836a48dd42eed 100644 (file)
@@ -297,7 +297,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                        .lower_ubo_ssbo_access_to_offsets = true,
                        .caps = {
                                .amd_gcn_shader = true,
-                               .amd_shader_ballot = device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT,
+                               .amd_shader_ballot = device->physical_device->use_shader_ballot,
                                .amd_trinary_minmax = true,
                                .derivative_group = true,
                                .descriptor_array_dynamic_indexing = true,