Skip to content

Commit 29c823f

Browse files
committed
Latte: Fix uniform size limit being too low
1 parent 757d458 commit 29c823f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Cafe/HW/Latte/Core/Latte.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void LatteBufferCache_LoadRemappedUniforms(struct LatteDecompilerShader* shader,
167167

168168
void LatteRenderTarget_updateViewport();
169169

170-
#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
170+
#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
171171

172172
//static uint32 glTempError;
173173
//#define catchOpenGLError() glFinish(); if( (glTempError = glGetError()) != 0 ) { printf("OpenGL error 0x%x: %s : %d timestamp %08x\n", glTempError, __FILE__, __LINE__, GetTickCount()); __debugbreak(); }

src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ struct LatteDecompilerShader
162162
// compact resource lists for optimized access
163163
struct QuickBufferEntry
164164
{
165-
uint8 index;
166-
uint16 size;
165+
uint32 index : 8;
166+
uint32 size : 24;
167167
};
168168
boost::container::static_vector<QuickBufferEntry, LATTE_NUM_MAX_UNIFORM_BUFFERS> list_quickBufferList;
169169
uint8 textureUnitList[LATTE_NUM_MAX_TEX_UNITS];

0 commit comments

Comments
 (0)