summaryrefslogtreecommitdiff
path: root/src/video_core/guest_driver.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-01-05 12:08:39 -0400
committerGravatar FernandoS272020-01-24 16:43:29 -0400
commitdc5cfa8d287757dede737553b6f1f8521971c6e2 (patch)
treeba57a2e25d25d46aae22d18f032ac9e70d982ed7 /src/video_core/guest_driver.cpp
parentGuest_driver: Correct compiling errors in GCC. (diff)
downloadyuzu-dc5cfa8d287757dede737553b6f1f8521971c6e2.tar.gz
yuzu-dc5cfa8d287757dede737553b6f1f8521971c6e2.tar.xz
yuzu-dc5cfa8d287757dede737553b6f1f8521971c6e2.zip
Shader_IR: Address Feedback
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;