mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 12:18:09 +02:00
iris: Initialize bo->index to -1 when importing buffers
A value of -1 means that the buffer has never been used in an execbuf buffer list in any of our contexts. While setting this isn't critical, doing so will allow us to short-circuit some looping in the next patch. Cc: mesa-stable Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26806>
This commit is contained in:
parent
bd32badbb7
commit
d178334d5c
1 changed files with 2 additions and 0 deletions
|
|
@ -1407,6 +1407,7 @@ iris_bo_gem_create_from_name(struct iris_bufmgr *bufmgr,
|
|||
bo->bufmgr = bufmgr;
|
||||
bo->gem_handle = open_arg.handle;
|
||||
bo->name = name;
|
||||
bo->index = -1;
|
||||
bo->real.global_name = handle;
|
||||
bo->real.prime_fd = -1;
|
||||
bo->real.reusable = false;
|
||||
|
|
@ -1931,6 +1932,7 @@ iris_bo_import_dmabuf(struct iris_bufmgr *bufmgr, int prime_fd,
|
|||
|
||||
bo->bufmgr = bufmgr;
|
||||
bo->name = "prime";
|
||||
bo->index = -1;
|
||||
bo->real.reusable = false;
|
||||
bo->real.imported = true;
|
||||
/* Xe KMD expects at least 1-way coherency for imports */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue