Mesa (master): radv/gfx10: adjust SGPRs/VGPRs related info
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 26 08:20:16 UTC 2020
Module: Mesa
Branch: master
Commit: ea91b15a31369adafb8c7ecb1e345d24ee8d1948
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea91b15a31369adafb8c7ecb1e345d24ee8d1948
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Feb 20 09:25:44 2020 +0100
radv/gfx10: adjust SGPRs/VGPRs related info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3899>
---
src/amd/vulkan/radv_device.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 1a2bf67a352..a03cf11691c 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1671,18 +1671,21 @@ void radv_GetPhysicalDeviceProperties2(
properties->sgprsPerSimd =
pdevice->rad_info.num_physical_sgprs_per_simd;
properties->minSgprAllocation =
- pdevice->rad_info.chip_class >= GFX8 ? 16 : 8;
+ pdevice->rad_info.min_sgpr_alloc;
properties->maxSgprAllocation =
- pdevice->rad_info.family == CHIP_TONGA ||
- pdevice->rad_info.family == CHIP_ICELAND ? 96 : 104;
+ pdevice->rad_info.max_sgpr_alloc;
properties->sgprAllocationGranularity =
- pdevice->rad_info.chip_class >= GFX8 ? 16 : 8;
+ pdevice->rad_info.sgpr_alloc_granularity;
/* VGPR. */
- properties->vgprsPerSimd = RADV_NUM_PHYSICAL_VGPRS;
- properties->minVgprAllocation = 4;
- properties->maxVgprAllocation = 256;
- properties->vgprAllocationGranularity = 4;
+ properties->vgprsPerSimd =
+ pdevice->rad_info.num_physical_wave64_vgprs_per_simd;
+ properties->minVgprAllocation =
+ pdevice->rad_info.min_vgpr_alloc;
+ properties->maxVgprAllocation =
+ pdevice->rad_info.max_vgpr_alloc;
+ properties->vgprAllocationGranularity =
+ pdevice->rad_info.vgpr_alloc_granularity;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD: {
More information about the mesa-commit
mailing list