summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-01-04 17:30:11 +0100
committerFernandoS27 <fsahmkow27@gmail.com>2020-01-24 21:43:29 +0100
commit74aa7de5e3905a9438f8839fa273024edd118f19 (patch)
treeeda46c0d5b057201ffac08a3e29b71544ee8acda /src/video_core
parentShader_IR: Store Bound buffer on Shader Usage (diff)
downloadyuzu-74aa7de5e3905a9438f8839fa273024edd118f19.tar
yuzu-74aa7de5e3905a9438f8839fa273024edd118f19.tar.gz
yuzu-74aa7de5e3905a9438f8839fa273024edd118f19.tar.bz2
yuzu-74aa7de5e3905a9438f8839fa273024edd118f19.tar.lz
yuzu-74aa7de5e3905a9438f8839fa273024edd118f19.tar.xz
yuzu-74aa7de5e3905a9438f8839fa273024edd118f19.tar.zst
yuzu-74aa7de5e3905a9438f8839fa273024edd118f19.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/guest_driver.cpp4
-rw-r--r--src/video_core/guest_driver.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/guest_driver.cpp b/src/video_core/guest_driver.cpp
index b1ac254ff..55b9bd021 100644
--- a/src/video_core/guest_driver.cpp
+++ b/src/video_core/guest_driver.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <algorithm>
+
#include "video_core/guest_driver.h"
namespace VideoCore {
@@ -28,7 +30,7 @@ void GuestDriverProfile::DeduceTextureHandlerSize(std::vector<u32>&& bound_offse
return;
}
texture_handler_size_deduced = true;
- texture_handler_size = sizeof(u32) * min_val;
+ texture_handler_size = min_texture_handler_size * min_val;
}
} // namespace VideoCore
diff --git a/src/video_core/guest_driver.h b/src/video_core/guest_driver.h
index f64f043af..7687a0434 100644
--- a/src/video_core/guest_driver.h
+++ b/src/video_core/guest_driver.h
@@ -27,6 +27,8 @@ public:
void DeduceTextureHandlerSize(std::vector<u32>&& bound_offsets);
private:
+ // Minimum size of texture handler any driver can use.
+ static constexpr u32 min_texture_handler_size = 4;
// This goes with Vulkan and OpenGL standards but Nvidia GPUs can easily
// use 4 bytes instead. Thus, certain drivers may squish the size.
static constexpr u32 default_texture_handler_size = 8;