From 29c823fa1fdba394b7fce21583f529d8941e653d Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Mon, 2 Oct 2023 19:05:44 +0200 Subject: [PATCH] Latte: Fix uniform size limit being too low --- src/Cafe/HW/Latte/Core/Latte.h | 2 +- src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cafe/HW/Latte/Core/Latte.h b/src/Cafe/HW/Latte/Core/Latte.h index f13abca0..861d7ddf 100644 --- a/src/Cafe/HW/Latte/Core/Latte.h +++ b/src/Cafe/HW/Latte/Core/Latte.h @@ -167,7 +167,7 @@ void LatteBufferCache_LoadRemappedUniforms(struct LatteDecompilerShader* shader, void LatteRenderTarget_updateViewport(); -#define LATTE_GLSL_DYNAMIC_UNIFORM_BLOCK_SIZE (1024) // maximum size for uniform blocks (in vec4s). On Nvidia hardware 4096 is the maximum (64K / 16 = 4096) all other vendors have much higher limits +#define LATTE_GLSL_DYNAMIC_UNIFORM_BLOCK_SIZE (4096) // maximum size for uniform blocks (in vec4s). On Nvidia hardware 4096 is the maximum (64K / 16 = 4096) all other vendors have much higher limits //static uint32 glTempError; //#define catchOpenGLError() glFinish(); if( (glTempError = glGetError()) != 0 ) { printf("OpenGL error 0x%x: %s : %d timestamp %08x\n", glTempError, __FILE__, __LINE__, GetTickCount()); __debugbreak(); } diff --git a/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h b/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h index 92777844..1159614e 100644 --- a/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h +++ b/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h @@ -162,8 +162,8 @@ struct LatteDecompilerShader // compact resource lists for optimized access struct QuickBufferEntry { - uint8 index; - uint16 size; + uint32 index : 8; + uint32 size : 24; }; boost::container::static_vector list_quickBufferList; uint8 textureUnitList[LATTE_NUM_MAX_TEX_UNITS];