ac/surface: use family_id so as not to crash with SI_FORCE_FAMILY in addrlib

We can't invoke gfx6 addrlib (overridden by SI_FORCE_FAMILY) with a gfx9
family ID.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028>
This commit is contained in:
Marek Olšák 2021-02-12 08:11:45 -05:00
parent a67d3e7c9e
commit 4fe37b850a

View file

@ -2458,7 +2458,7 @@ int ac_compute_surface(struct ac_addrlib *addrlib, const struct radeon_info *inf
if (r)
return r;
if (info->chip_class >= GFX9)
if (info->family_id >= FAMILY_AI)
r = gfx9_compute_surface(addrlib, info, config, mode, surf);
else
r = gfx6_compute_surface(addrlib->handle, info, config, mode, surf);