radv: make use of num_good_cu_per_sh in si_emit_graphics() too
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 8 Nov 2018 13:48:31 +0000 (14:48 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 12 Nov 2018 08:35:46 +0000 (09:35 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/si_cmd_buffer.c

index be37191306976c7a72a7496989cc69a9879a0bfb..f4da2b38fdddb3b01156ef5fc08b3222b3c6683d 100644 (file)
@@ -278,8 +278,7 @@ si_emit_graphics(struct radv_physical_device *physical_device,
                radeon_set_sh_reg(cs, R_00B21C_SPI_SHADER_PGM_RSRC3_GS,
                                  S_00B21C_CU_EN(0xffff) | S_00B21C_WAVE_LIMIT(0x3F));
 
-               if (physical_device->rad_info.num_good_compute_units /
-                   (physical_device->rad_info.max_se * physical_device->rad_info.max_sh_per_se) <= 4) {
+               if (physical_device->rad_info.num_good_cu_per_sh <= 4) {
                        /* Too few available compute units per SH. Disallowing
                         * VS to run on CU0 could hurt us more than late VS
                         * allocation would help.