radv: compute correct maximum wave count per SIMD
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 30 Aug 2017 13:12:03 +0000 (15:12 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 1 Sep 2017 07:38:50 +0000 (09:38 +0200)
Ported from RadeonSI (original patch by Marek).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_pipeline.c

index 637fed625f1598a829d5d190b01583eeed5595ec..e3a8dff99204ba7de5294c930e760eadef4a23e0 100644 (file)
@@ -320,9 +320,20 @@ static void radv_dump_pipeline_stats(struct radv_device *device, struct radv_pip
        struct ac_shader_config *conf;
        int i;
        FILE *file = stderr;
-       unsigned max_simd_waves = 10;
+       unsigned max_simd_waves;
        unsigned lds_per_wave = 0;
 
+       switch (device->physical_device->rad_info.family) {
+       /* These always have 8 waves: */
+       case CHIP_POLARIS10:
+       case CHIP_POLARIS11:
+       case CHIP_POLARIS12:
+               max_simd_waves = 8;
+               break;
+       default:
+               max_simd_waves = 10;
+       }
+
        for (i = 0; i < MESA_SHADER_STAGES; i++) {
                if (!pipeline->shaders[i])
                        continue;