diff options
| author | 2021-06-10 22:17:33 -0700 | |
|---|---|---|
| committer | 2021-06-10 22:17:33 -0700 | |
| commit | 46ec0ee55b5820a517f251780c908cff5fcd1c13 (patch) | |
| tree | b8639614c724fb83f959e50da8608236b0210ebf /src/video_core/buffer_cache | |
| parent | Merge pull request #6444 from bunnei/fix-sm-sessions (diff) | |
| parent | Fix GCC undefined behavior sanitizer. (diff) | |
| download | yuzu-46ec0ee55b5820a517f251780c908cff5fcd1c13.tar.gz yuzu-46ec0ee55b5820a517f251780c908cff5fcd1c13.tar.xz yuzu-46ec0ee55b5820a517f251780c908cff5fcd1c13.zip | |
Merge pull request #6445 from degasus/fix_ubsn
Fix GCC undefined behavior sanitizer.
Diffstat (limited to 'src/video_core/buffer_cache')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/buffer_cache/buffer_base.h b/src/video_core/buffer_cache/buffer_base.h index 0c00ae280..a39505903 100644 --- a/src/video_core/buffer_cache/buffer_base.h +++ b/src/video_core/buffer_cache/buffer_base.h | |||
| @@ -476,6 +476,9 @@ private: | |||
| 476 | current_size = 0; | 476 | current_size = 0; |
| 477 | on_going = false; | 477 | on_going = false; |
| 478 | } | 478 | } |
| 479 | if (empty_bits == PAGES_PER_WORD) { | ||
| 480 | break; | ||
| 481 | } | ||
| 479 | page += empty_bits; | 482 | page += empty_bits; |
| 480 | 483 | ||
| 481 | const int continuous_bits = std::countr_one(word >> page); | 484 | const int continuous_bits = std::countr_one(word >> page); |