mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Don't try to merge buffer ranges in barrier list
Too slow, doesn't work most of the time anyway.
This commit is contained in:
parent
4c7da80c14
commit
85c278f515
@ -321,23 +321,29 @@ namespace dxvk {
|
||||
if (hashEntry) {
|
||||
ListEntry* listEntry = getListEntry(hashEntry->next);
|
||||
|
||||
// Only create the linear list if absolutely necessary
|
||||
if (!listEntry && !hashEntry->data.canMerge(slice))
|
||||
listEntry = insertListEntry(hashEntry->data, hashEntry);
|
||||
|
||||
if (listEntry) {
|
||||
while (listEntry) {
|
||||
// Avoid adding new list entries if possible
|
||||
if (std::is_same_v<T, DxvkBarrierImageSlice>) {
|
||||
// For images, try to merge the slice with existing
|
||||
// entries if possible to keep the list small
|
||||
do {
|
||||
if (listEntry->data.canMerge(slice)) {
|
||||
listEntry->data.merge(slice);
|
||||
break;
|
||||
}
|
||||
|
||||
listEntry = getListEntry(listEntry->next);
|
||||
}
|
||||
} while ((listEntry = getListEntry(listEntry->next)));
|
||||
|
||||
if (!listEntry)
|
||||
insertListEntry(slice, hashEntry);
|
||||
} else {
|
||||
// For buffers it's not even worth trying. Most of the
|
||||
// time we won't be able to merge, and traversing the
|
||||
// entire list every time is slow.
|
||||
insertListEntry(slice, hashEntry);
|
||||
}
|
||||
} else if (!hashEntry->data.canMerge(slice)) {
|
||||
// Only create the linear list if absolutely necessary
|
||||
insertListEntry(hashEntry->data, hashEntry);
|
||||
insertListEntry(slice, hashEntry);
|
||||
}
|
||||
|
||||
// Merge hash entry data so that it stores
|
||||
|
Loading…
x
Reference in New Issue
Block a user