mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
zink: switch remaining direct access of zink_resource_object::(reads|writes) to util
I missed this one Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13259>
This commit is contained in:
parent
77b3a3f00f
commit
34dbf998ae
1 changed files with 5 additions and 4 deletions
|
|
@ -623,11 +623,12 @@ zink_batch_resource_usage_set(struct zink_batch *batch, struct zink_resource *re
|
|||
void
|
||||
zink_batch_reference_resource_rw(struct zink_batch *batch, struct zink_resource *res, bool write)
|
||||
{
|
||||
/* if the resource already has usage of any sort set for this batch, we can skip hashing */
|
||||
if (!zink_batch_usage_matches(res->obj->reads, batch->state) &&
|
||||
!zink_batch_usage_matches(res->obj->writes, batch->state)) {
|
||||
/* if the resource already has usage of any sort set for this batch, */
|
||||
if (!zink_resource_usage_matches(res, batch->state) ||
|
||||
/* or if it's bound somewhere */
|
||||
!zink_resource_has_binds(res))
|
||||
/* then it already has a batch ref and doesn't need one here */
|
||||
zink_batch_reference_resource(batch, res);
|
||||
}
|
||||
zink_batch_resource_usage_set(batch, res, write);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue