radv/gfx10: adjust SGPRs/VGPRs related info
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 20 Feb 2020 08:25:44 +0000 (09:25 +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_device.c

index 1a2bf67a3523368f71c2165e62887cd5248c587e..a03cf11691c852a4841d99accad39586d022c5e8 100644 (file)
@@ -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: {