zink: add return values for resource usage unsetting
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12845>
This commit is contained in:
parent
d3b72d49cb
commit
cb65ac9bdf
|
@ -245,11 +245,12 @@ zink_bo_usage_set(struct zink_bo *bo, struct zink_batch_state *bs, bool write)
|
|||
zink_batch_usage_set(&bo->reads, bs);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static inline bool
|
||||
zink_bo_usage_unset(struct zink_bo *bo, struct zink_batch_state *bs)
|
||||
{
|
||||
zink_batch_usage_unset(&bo->reads, bs);
|
||||
zink_batch_usage_unset(&bo->writes, bs);
|
||||
return bo->reads || bo->writes;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -241,10 +241,10 @@ zink_resource_usage_set(struct zink_resource *res, struct zink_batch_state *bs,
|
|||
zink_bo_usage_set(res->obj->bo, bs, write);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static inline bool
|
||||
zink_resource_object_usage_unset(struct zink_resource_object *obj, struct zink_batch_state *bs)
|
||||
{
|
||||
zink_bo_usage_unset(obj->bo, bs);
|
||||
return zink_bo_usage_unset(obj->bo, bs);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue