mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 09:20:13 +01:00
d3d12: Minor fixes to residency algorithm when eviction is needed
Always reset batch_count and batch_memory_size. Proceed to eviction only if we stopped before filling up the batch. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34562>
This commit is contained in:
parent
565980f3c0
commit
37e6a8b57f
1 changed files with 5 additions and 2 deletions
|
|
@ -228,10 +228,13 @@ d3d12_process_batch_residency(struct d3d12_screen *screen, struct d3d12_batch *b
|
|||
++screen->residency_fence_value;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr) && batch_count == residency_batch_size) {
|
||||
if (SUCCEEDED(hr)) {
|
||||
bool batch_full = batch_count == residency_batch_size;
|
||||
batch_count = 0;
|
||||
size_to_make_resident -= batch_memory_size;
|
||||
continue;
|
||||
batch_memory_size = 0;
|
||||
if (batch_full)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue