iris/resource: Check devinfo::has_local_mem before using BO_ALLOC_LMEM

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20322>
This commit is contained in:
Jordan Justen 2022-02-07 16:34:53 -08:00
parent ac9af0dcee
commit 1bcce906e9

View file

@ -471,7 +471,8 @@ iris_resource_alloc_flags(const struct iris_screen *screen,
PIPE_RESOURCE_FLAG_MAP_PERSISTENT))
flags |= BO_ALLOC_SMEM;
if (screen->devinfo->verx10 >= 125 && isl_aux_usage_has_ccs(aux_usage)) {
if (screen->devinfo->verx10 >= 125 && screen->devinfo->has_local_mem &&
isl_aux_usage_has_ccs(aux_usage)) {
assert((flags & BO_ALLOC_SMEM) == 0);
flags |= BO_ALLOC_LMEM;
}