mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-27 16:02:37 +00:00
graphics: skip temporary cache lookup vectors
This commit is contained in:
1 parent
cd62693792
commit
d853aba955
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -277,10 +277,10 @@ void BufferCache::ReadMemoryOnGpu(uint64_t vaddr, uint64_t size, bool is_write)
|
|||||||
"memory invalidation");
|
"memory invalidation");
|
||||||
},
|
},
|
||||||
[&](uint64_t address, uint64_t bytes) noexcept {
|
[&](uint64_t address, uint64_t bytes) noexcept {
|
||||||
for (const auto range: m_gpu_modified_ranges.Intersections(address, bytes)) {
|
m_gpu_modified_ranges.ForEachIntersection(address, bytes, [&](RangeSet::Range range) {
|
||||||
copies.push_back(
|
copies.push_back(
|
||||||
{&buffer, buffer.Offset(range.address), range.address, range.size});
|
{&buffer, buffer.Offset(range.address), range.address, range.size});
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
if (!copies.empty()) {
|
if (!copies.empty()) {
|
||||||
DownloadBufferMemory(copies);
|
DownloadBufferMemory(copies);
|
||||||
|
|||||||
+2
-2
@@ -1334,8 +1334,8 @@ ImageId TextureCache::FindImageFromRange(uint64_t address, uint64_t size, bool e
|
|||||||
if (!GuestRange {address, size}.Valid()) {
|
if (!GuestRange {address, size}.Valid()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
std::scoped_lock lock {m_lock};
|
std::scoped_lock lock {m_lock};
|
||||||
std::vector<ImageId> matches;
|
ImageIds matches;
|
||||||
for (const auto id: FindImagesInRegion(address, size, false)) {
|
for (const auto id: FindImagesInRegion(address, size, false)) {
|
||||||
auto owner = m_slot_images.try_get(id);
|
auto owner = m_slot_images.try_get(id);
|
||||||
if (owner == nullptr || owner->info.data.address != address) {
|
if (owner == nullptr || owner->info.data.address != address) {
|
||||||
|
|||||||
Reference in new issue
Block a user