summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Schlaikjer <ross@schlaikjer.net>2023-03-25 05:25:02 +0100
committerRoss Schlaikjer <ross@schlaikjer.net>2023-03-25 05:25:02 +0100
commitf38ae8e9537f8093019b6cba8547e4160660e92e (patch)
tree29a07b00ae21fc36520dc3bac2a9a570b751ec13
parentMerge pull request #9983 from Morph1984/boost (diff)
downloadyuzu-f38ae8e9537f8093019b6cba8547e4160660e92e.tar
yuzu-f38ae8e9537f8093019b6cba8547e4160660e92e.tar.gz
yuzu-f38ae8e9537f8093019b6cba8547e4160660e92e.tar.bz2
yuzu-f38ae8e9537f8093019b6cba8547e4160660e92e.tar.lz
yuzu-f38ae8e9537f8093019b6cba8547e4160660e92e.tar.xz
yuzu-f38ae8e9537f8093019b6cba8547e4160660e92e.tar.zst
yuzu-f38ae8e9537f8093019b6cba8547e4160660e92e.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/texture_cache.h63
1 files changed, 32 insertions, 31 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 8e8b9a5e6..858449af8 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -1616,37 +1616,38 @@ void TextureCache<P>::ForEachImageInRegionGPU(size_t as_id, GPUVAddr gpu_addr, s
return;
}
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) {
- const auto it = gpu_page_table.find(page);
- if (it == gpu_page_table.end()) {
- if constexpr (BOOL_BREAK) {
- return false;
- } else {
- return;
- }
- }
- for (const ImageId image_id : it->second) {
- Image& image = slot_images[image_id];
- if (True(image.flags & ImageFlagBits::Picked)) {
- continue;
- }
- if (!image.OverlapsGPU(gpu_addr, size)) {
- continue;
- }
- image.flags |= ImageFlagBits::Picked;
- images.push_back(image_id);
- if constexpr (BOOL_BREAK) {
- if (func(image_id, image)) {
- return true;
- }
- } else {
- func(image_id, image);
- }
- }
- if constexpr (BOOL_BREAK) {
- return false;
- }
- });
+ ForEachGPUPage(gpu_addr, size,
+ [this, &gpu_page_table, &images, gpu_addr, size, func](u64 page) {
+ const auto it = gpu_page_table.find(page);
+ if (it == gpu_page_table.end()) {
+ if constexpr (BOOL_BREAK) {
+ return false;
+ } else {
+ return;
+ }
+ }
+ for (const ImageId image_id : it->second) {
+ Image& image = slot_images[image_id];
+ if (True(image.flags & ImageFlagBits::Picked)) {
+ continue;
+ }
+ if (!image.OverlapsGPU(gpu_addr, size)) {
+ continue;
+ }
+ image.flags |= ImageFlagBits::Picked;
+ images.push_back(image_id);
+ if constexpr (BOOL_BREAK) {
+ if (func(image_id, image)) {
+ return true;
+ }
+ } else {
+ func(image_id, image);
+ }
+ }
+ if constexpr (BOOL_BREAK) {
+ return false;
+ }
+ });
for (const ImageId image_id : images) {
slot_images[image_id].flags &= ~ImageFlagBits::Picked;
}