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:
parent
383508cb9f
commit
838ac4b736
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue