1
0
Fork 0

freedreno: Handle buffer import

The layout_resource_for_handle() path is only intended for images/
textures.  For buffers, call fdl_layout_buffer() directly.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37696>
This commit is contained in:
Rob Clark 2025-10-03 15:00:31 -07:00 committed by Marge Bot
parent 383508cb9f
commit 838ac4b736

View file

@ -1513,8 +1513,11 @@ fd_resource_from_handle(struct pipe_screen *pscreen,
rsc->internal_format = tmpl->format;
if (!screen->layout_resource_for_handle(rsc, handle))
if (tmpl->target == PIPE_BUFFER) {
fdl_layout_buffer(&rsc->layout, tmpl->width0);
} else if (!screen->layout_resource_for_handle(rsc, handle)) {
goto fail;
}
if (rsc->layout.pitch0 != handle->stride)
goto fail;