Skip to content

Commit

Permalink
Latte: Fix uniform size limit being too low
Browse files Browse the repository at this point in the history
  • Loading branch information
Exzap committed Oct 2, 2023
1 parent 757d458 commit 29c823f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Core/Latte.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
4 changes: 2 additions & 2 deletions src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<QuickBufferEntry, LATTE_NUM_MAX_UNIFORM_BUFFERS> list_quickBufferList;
uint8 textureUnitList[LATTE_NUM_MAX_TEX_UNITS];
Expand Down

0 comments on commit 29c823f

Please sign in to comment.