From: Samuel Pitoiset Date: Thu, 20 Feb 2020 08:26:03 +0000 (+0100) Subject: radv/gfx10: adjust the number of VGPRs used to compute waves X-Git-Tag: upstream/20.1.8~3167 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9204ad70f2a49c783a38d926f01a54059bb3461f;p=platform%2Fupstream%2Fmesa.git radv/gfx10: adjust the number of VGPRs used to compute waves Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- diff --git a/src/amd/vulkan/radv_constants.h b/src/amd/vulkan/radv_constants.h index a12e79e..a42984e 100644 --- a/src/amd/vulkan/radv_constants.h +++ b/src/amd/vulkan/radv_constants.h @@ -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. */ diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 1220b4a..367817c 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -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;