summaryrefslogtreecommitdiff
path: root/src/video_core/guest_driver.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-01-08 11:46:36 -0400
committerGravatar FernandoS272020-01-24 16:43:30 -0400
commit64496f24569ecc23ebbb816725f27142867b1468 (patch)
treee7dd660d9bdf3afc7a90a35314c18b29792e119a /src/video_core/guest_driver.cpp
parentShader_IR: Allow constant access of guest driver. (diff)
downloadyuzu-64496f24569ecc23ebbb816725f27142867b1468.tar.gz
yuzu-64496f24569ecc23ebbb816725f27142867b1468.tar.xz
yuzu-64496f24569ecc23ebbb816725f27142867b1468.zip
Shader_IR: Address Feedback
Diffstat (limited to 'src/video_core/guest_driver.cpp')
-rw-r--r--src/video_core/guest_driver.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/guest_driver.cpp b/src/video_core/guest_driver.cpp
index 1ded52905..6adef459e 100644
--- a/src/video_core/guest_driver.cpp
+++ b/src/video_core/guest_driver.cpp
@@ -3,7 +3,7 @@
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#include <limits>
7 7
8#include "video_core/guest_driver.h" 8#include "video_core/guest_driver.h"
9 9
@@ -17,10 +17,9 @@ void GuestDriverProfile::DeduceTextureHandlerSize(std::vector<u32>&& bound_offse
17 if (size < 2) { 17 if (size < 2) {
18 return; 18 return;
19 } 19 }
20 std::sort(bound_offsets.begin(), bound_offsets.end(), 20 std::sort(bound_offsets.begin(), bound_offsets.end(), std::less{});
21 [](const u32& a, const u32& b) { return a < b; }); 21 u32 min_val = std::numeric_limits<u32>::max();
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++) {
24 if (bound_offsets[i] == bound_offsets[i - 1]) { 23 if (bound_offsets[i] == bound_offsets[i - 1]) {
25 continue; 24 continue;
26 } 25 }