d3d12: avoid searching twice for bos
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7477>
This commit is contained in:
parent
bd5f928506
commit
6f3716d677
|
@ -220,10 +220,10 @@ void
|
|||
d3d12_batch_reference_resource(struct d3d12_batch *batch,
|
||||
struct d3d12_resource *res)
|
||||
{
|
||||
if (!d3d12_batch_has_references(batch, res->bo)) {
|
||||
_mesa_set_add(batch->bos, res->bo);
|
||||
bool found = false;
|
||||
_mesa_set_search_and_add(batch->bos, res->bo, &found);
|
||||
if (!found)
|
||||
d3d12_bo_reference(res->bo);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue