renderer: respect buffer ownership in image downloads

This commit is contained in:
nmzik
2026-08-23 17:31:00 +02:00
parent 4d8d3b6d25
commit 30fa9dddc5
2 changed files with 21 additions and 2 deletions
+2 -2
View File
@@ -1209,7 +1209,7 @@ ImageId TextureCache::FindImageFromRange(uint64_t address, uint64_t size, bool e
if (ensure_valid && owner->depth_id) {
owner = m_slot_images.try_get(owner->depth_id);
}
if (owner == nullptr || (ensure_valid && !owner->SafeToDownload())) {
if (owner == nullptr || (ensure_valid && !SafeToDownload(*owner))) {
continue;
}
matches.push_back(id);
@@ -1580,7 +1580,7 @@ bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, uint64_t vaddr, uin
if (owner->depth_id) {
owner = m_texture_cache.m_slot_images.try_get(owner->depth_id);
}
if (owner != nullptr && owner->SafeToDownload()) {
if (owner != nullptr && m_texture_cache.SafeToDownload(*owner)) {
matches.push_back(id);
}
}