GPU: Fix possible shift truncation.

Also, add algorithm for std::max.
This commit is contained in:
Unknown W. Brackets 2022-08-28 08:32:00 -07:00
parent 5247ffa0af
commit 77c834ba5c
2 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,7 @@ Draw2DPipeline *TextureShaderCache::GetDepalettizeShader(uint32_t clutMode, GETe
using namespace Draw;
// Generate an ID for depal shaders.
u64 id = (depthUpperBits << 32) | (clutMode & 0xFFFFFF) | (textureFormat << 24) | (bufferFormat << 28);
u64 id = ((u64)depthUpperBits << 32) | (clutMode & 0xFFFFFF) | (textureFormat << 24) | (bufferFormat << 28);
auto shader = depalCache_.find(id);
if (shader != depalCache_.end()) {

View File

@ -1,3 +1,4 @@
#include <algorithm>
#include <sstream>
#include "UI/OnScreenDisplay.h"