iris: setup internal_format for memory object resources

We need to setup internal_format for resource in case main surface was
not configured (iris_resource_configure_main) which is the case with
vertex buffer objects, otherwise transfer helper will make wrong
decisions when copying such a resource.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14925>
This commit is contained in:
Tapani Pälli 2022-02-03 14:02:42 +02:00 committed by Marge Bot
parent 5c5243adb7
commit 09b86b4061

View file

@ -1325,6 +1325,7 @@ iris_resource_from_memobj(struct pipe_screen *pscreen,
res->bo = memobj->bo;
res->offset = offset;
res->external_format = memobj->format;
res->internal_format = templ->format;
iris_bo_reference(memobj->bo);