From ea91b15a31369adafb8c7ecb1e345d24ee8d1948 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 20 Feb 2020 09:25:44 +0100 Subject: [PATCH] radv/gfx10: adjust SGPRs/VGPRs related info Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- 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 1a2bf67..a03cf11 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: { -- 2.7.4