early-access version 3474

This commit is contained in:
pineappleEA 2023-03-25 08:43:11 +01:00
parent 98d7980992
commit 31b0581681
2 changed files with 33 additions and 32 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3473. This is the source code for early-access 3474.
## Legal Notice ## Legal Notice

View File

@ -1616,37 +1616,38 @@ void TextureCache<P>::ForEachImageInRegionGPU(size_t as_id, GPUVAddr gpu_addr, s
return; return;
} }
auto& gpu_page_table = gpu_page_table_storage[*storage_id]; auto& gpu_page_table = gpu_page_table_storage[*storage_id];
ForEachGPUPage(gpu_addr, size, [this, gpu_page_table, &images, gpu_addr, size, func](u64 page) { ForEachGPUPage(gpu_addr, size,
const auto it = gpu_page_table.find(page); [this, &gpu_page_table, &images, gpu_addr, size, func](u64 page) {
if (it == gpu_page_table.end()) { const auto it = gpu_page_table.find(page);
if constexpr (BOOL_BREAK) { if (it == gpu_page_table.end()) {
return false; if constexpr (BOOL_BREAK) {
} else { return false;
return; } else {
} return;
} }
for (const ImageId image_id : it->second) { }
Image& image = slot_images[image_id]; for (const ImageId image_id : it->second) {
if (True(image.flags & ImageFlagBits::Picked)) { Image& image = slot_images[image_id];
continue; if (True(image.flags & ImageFlagBits::Picked)) {
} continue;
if (!image.OverlapsGPU(gpu_addr, size)) { }
continue; if (!image.OverlapsGPU(gpu_addr, size)) {
} continue;
image.flags |= ImageFlagBits::Picked; }
images.push_back(image_id); image.flags |= ImageFlagBits::Picked;
if constexpr (BOOL_BREAK) { images.push_back(image_id);
if (func(image_id, image)) { if constexpr (BOOL_BREAK) {
return true; if (func(image_id, image)) {
} return true;
} else { }
func(image_id, image); } else {
} func(image_id, image);
} }
if constexpr (BOOL_BREAK) { }
return false; if constexpr (BOOL_BREAK) {
} return false;
}); }
});
for (const ImageId image_id : images) { for (const ImageId image_id : images) {
slot_images[image_id].flags &= ~ImageFlagBits::Picked; slot_images[image_id].flags &= ~ImageFlagBits::Picked;
} }