zink: set a flag for dmabuf init

this will be useful for barrier handling

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
This commit is contained in:
Mike Blumenkrantz 2021-09-09 20:48:38 -04:00 committed by Marge Bot
parent 3bd98d4bf6
commit 2a63f38cb1
2 changed files with 2 additions and 0 deletions

View file

@ -748,6 +748,7 @@ resource_create(struct pipe_screen *pscreen,
}
} else {
res->format = zink_get_format(screen, templ->format);
res->dmabuf_acquire = whandle && whandle->type == WINSYS_HANDLE_TYPE_FD;
res->layout = VK_IMAGE_LAYOUT_UNDEFINED;
res->optimal_tiling = optimal_tiling;
res->aspect = aspect_from_format(templ->format);

View file

@ -122,6 +122,7 @@ struct zink_resource {
uint32_t all_binds;
};
bool dmabuf_acquire;
struct sw_displaytarget *dt;
unsigned dt_stride;