mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
lima: handle DRM_FORMAT_MOD_INVALID in resource_from_handle()
Assume that resource is tiled if we get DRM_FORMAT_MOD_INVALID
in resource_from_handle() and we don't have RO.
Fixes: 8c12f4e5f2 ("lima: enable tiling")
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
This commit is contained in:
parent
9d78cf4584
commit
01a451b04d
1 changed files with 4 additions and 0 deletions
|
|
@ -329,9 +329,13 @@ lima_resource_from_handle(struct pipe_screen *pscreen,
|
|||
case DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED:
|
||||
res->tiled = true;
|
||||
break;
|
||||
case DRM_FORMAT_MOD_INVALID:
|
||||
res->tiled = screen->ro == NULL;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Attempted to import unsupported modifier 0x%llx\n",
|
||||
(long long)handle->modifier);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
return pres;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue