aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2020-02-20 09:26:03 +0100
committerMarge Bot <[email protected]>2020-02-26 07:58:47 +0000
commit9204ad70f2a49c783a38d926f01a54059bb3461f (patch)
treeb51134d4bcd2e12edd8a58faea2f7c484f7ee34f /src/amd/vulkan
parent568f1504098f6204bcc842d66be0126764cb7d13 (diff)
radv/gfx10: adjust the number of VGPRs used to compute waves
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3899>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_constants.h2
-rw-r--r--src/amd/vulkan/radv_shader.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_constants.h b/src/amd/vulkan/radv_constants.h
index a12e79e9623..a42984e83c6 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 1220b4ae8b7..367817c16f8 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;