mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 05:00:09 +01:00
amd: query the per-SIMD VGPR counts from the kernel, don't hardcode them
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>
This commit is contained in:
parent
26208698ae
commit
80c0efa50f
1 changed files with 13 additions and 4 deletions
|
|
@ -1331,12 +1331,21 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info)
|
|||
info->wave64_vgpr_alloc_granularity = 4;
|
||||
}
|
||||
|
||||
if (info->family == CHIP_GFX1100 || info->family == CHIP_GFX1101)
|
||||
info->num_physical_wave64_vgprs_per_simd = 768;
|
||||
else if (info->gfx_level >= GFX10)
|
||||
/* Some GPU info was broken before DRM 3.45.0. */
|
||||
if (info->drm_minor >= 45 && device_info.num_shader_visible_vgprs) {
|
||||
/* The Gfx10 VGPR count is in Wave32, so divide it by 2 for Wave64.
|
||||
* Gfx6-9 numbers are in Wave64.
|
||||
*/
|
||||
if (info->gfx_level >= GFX10)
|
||||
info->num_physical_wave64_vgprs_per_simd = device_info.num_shader_visible_vgprs / 2;
|
||||
else
|
||||
info->num_physical_wave64_vgprs_per_simd = device_info.num_shader_visible_vgprs;
|
||||
} else if (info->gfx_level >= GFX10) {
|
||||
info->num_physical_wave64_vgprs_per_simd = 512;
|
||||
else
|
||||
} else {
|
||||
info->num_physical_wave64_vgprs_per_simd = 256;
|
||||
}
|
||||
|
||||
info->num_simd_per_compute_unit = info->gfx_level >= GFX10 ? 2 : 4;
|
||||
|
||||
/* BIG_PAGE is supported since gfx10.3 and requires VRAM. VRAM is only guaranteed
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue