llvmpipe: handle stride properly on lvp udmabuf imports

The import data comes in via the fd import, but we need to make
sure to store the row stride value here.

Fixes: c44d65a467 ("lp: only map dt buffer on import from dmabuf")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30839>
(cherry picked from commit 521dc42e6c)
This commit is contained in:
Dave Airlie 2024-08-26 13:21:29 +10:00 committed by Eric Engestrom
parent 631732e3df
commit 6cd669911e
2 changed files with 2 additions and 1 deletions

View file

@ -154,7 +154,7 @@
"description": "llvmpipe: handle stride properly on lvp udmabuf imports",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c44d65a46764a5f2cd3dc3924bd6179cd93993f6",
"notes": null

View file

@ -765,6 +765,7 @@ llvmpipe_resource_from_handle(struct pipe_screen *_screen,
assert(llvmpipe_resource_is_texture(&lpr->base));
} else {
whandle->size = lpr->size_required;
lpr->row_stride[0] = whandle->stride;
lpr->backable = true;
}