summaryrefslogtreecommitdiff
path: root/src/video_core/guest_driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/guest_driver.cpp')
-rw-r--r--src/video_core/guest_driver.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/guest_driver.cpp b/src/video_core/guest_driver.cpp
index 55b9bd021..1ded52905 100644
--- a/src/video_core/guest_driver.cpp
+++ b/src/video_core/guest_driver.cpp
@@ -1,8 +1,9 @@
1// Copyright 2019 yuzu Emulator Project 1// Copyright 2020 yuzu Emulator Project
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm> 5#include <algorithm>
6#include <climits>
6 7
7#include "video_core/guest_driver.h" 8#include "video_core/guest_driver.h"
8 9
@@ -12,13 +13,13 @@ void GuestDriverProfile::DeduceTextureHandlerSize(std::vector<u32>&& bound_offse
12 if (texture_handler_size_deduced) { 13 if (texture_handler_size_deduced) {
13 return; 14 return;
14 } 15 }
15 std::size_t size = bound_offsets.size(); 16 const std::size_t size = bound_offsets.size();
16 if (size < 2) { 17 if (size < 2) {
17 return; 18 return;
18 } 19 }
19 std::sort(bound_offsets.begin(), bound_offsets.end(), 20 std::sort(bound_offsets.begin(), bound_offsets.end(),
20 [](const u32& a, const u32& b) { return a < b; }); 21 [](const u32& a, const u32& b) { return a < b; });
21 u32 min_val = 0xFFFFFFFF; // set to highest possible 32 bit integer; 22 u32 min_val = UINT_MAX;
22 for (std::size_t i = 1; i < size; i++) { 23 for (std::size_t i = 1; i < size; i++) {
23 if (bound_offsets[i] == bound_offsets[i - 1]) { 24 if (bound_offsets[i] == bound_offsets[i - 1]) {
24 continue; 25 continue;