Guest_driver: Correct compiling errors in GCC.

This commit is contained in:
Fernando Sahmkow 2020-01-04 12:30:11 -04:00 committed by FernandoS27
parent 1e4b6bef6f
commit 74aa7de5e3
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <algorithm>
#include "video_core/guest_driver.h" #include "video_core/guest_driver.h"
namespace VideoCore { namespace VideoCore {
@ -28,7 +30,7 @@ void GuestDriverProfile::DeduceTextureHandlerSize(std::vector<u32>&& bound_offse
return; return;
} }
texture_handler_size_deduced = true; texture_handler_size_deduced = true;
texture_handler_size = sizeof(u32) * min_val; texture_handler_size = min_texture_handler_size * min_val;
} }
} // namespace VideoCore } // namespace VideoCore

View File

@ -27,6 +27,8 @@ public:
void DeduceTextureHandlerSize(std::vector<u32>&& bound_offsets); void DeduceTextureHandlerSize(std::vector<u32>&& bound_offsets);
private: 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 // This goes with Vulkan and OpenGL standards but Nvidia GPUs can easily
// use 4 bytes instead. Thus, certain drivers may squish the size. // use 4 bytes instead. Thus, certain drivers may squish the size.
static constexpr u32 default_texture_handler_size = 8; static constexpr u32 default_texture_handler_size = 8;