iris: Simplify a plane count check in from_handle
Instead of checking the plane count in order to finish importing the aux info, just check the plane index. Planes are added in reverse, so we'll have the complete number of planes once we reach plane zero. Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25768>
This commit is contained in:
parent
79222e5884
commit
733607cc37
1 changed files with 1 additions and 2 deletions
|
|
@ -1500,8 +1500,7 @@ iris_resource_from_handle(struct pipe_screen *pscreen,
|
|||
res->bo = NULL;
|
||||
}
|
||||
|
||||
if (get_num_planes(&res->base.b) ==
|
||||
iris_get_dmabuf_modifier_planes(pscreen, modifier, whandle->format)) {
|
||||
if (whandle->plane == 0) {
|
||||
iris_resource_finish_aux_import(pscreen, res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue