radv/gfx10: adjust the number of VGPRs used to compute waves
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 20 Feb 2020 08:26:03 +0000 (09:26 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 Feb 2020 07:58:47 +0000 (07:58 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3899>

src/amd/vulkan/radv_constants.h
src/amd/vulkan/radv_shader.c

index a12e79e96235b1d29f6da484f45d94ccdb335229..a42984e83c659955daef9065ffaaf073cc7ade1a 100644 (file)
@@ -76,8 +76,6 @@
 /* max number of descriptor sets */
 #define MAX_SETS 32
 
-#define RADV_NUM_PHYSICAL_VGPRS 256
-
 /* Make sure everything is addressable by a signed 32-bit int, and
  * our largest descriptors are 96 bytes.
  */
index 1220b4ae8b7466cfd6e3c13439087e7f318f0339..367817c16f82c47ceb107c89ba07f954f62058e1 100644 (file)
@@ -1333,7 +1333,7 @@ radv_get_max_waves(struct radv_device *device,
                unsigned vgprs = align(conf->num_vgprs, wave_size == 32 ? 8 : 4);
                max_simd_waves =
                        MIN2(max_simd_waves,
-                            RADV_NUM_PHYSICAL_VGPRS / vgprs);
+                            device->physical_device->rad_info.num_physical_wave64_vgprs_per_simd / vgprs);
        }
 
        unsigned max_lds_per_simd = device->physical_device->rad_info.lds_size_per_cu / device->physical_device->rad_info.num_simd_per_compute_unit;
@@ -1423,7 +1423,7 @@ radv_GetShaderInfoAMD(VkDevice _device,
 
                        VkShaderStatisticsInfoAMD statistics = {};
                        statistics.shaderStageMask = shaderStage;
-                       statistics.numPhysicalVgprs = RADV_NUM_PHYSICAL_VGPRS;
+                       statistics.numPhysicalVgprs = device->physical_device->rad_info.num_physical_wave64_vgprs_per_simd;
                        statistics.numPhysicalSgprs = device->physical_device->rad_info.num_physical_sgprs_per_simd;
                        statistics.numAvailableSgprs = statistics.numPhysicalSgprs;