Latte: Fix uniform size limit being too low

This commit is contained in:
Exzap 2023-10-02 19:05:44 +02:00
parent 757d458161
commit 29c823fa1f
2 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,7 @@ void LatteBufferCache_LoadRemappedUniforms(struct LatteDecompilerShader* shader,
void LatteRenderTarget_updateViewport(); 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; //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(); } //#define catchOpenGLError() glFinish(); if( (glTempError = glGetError()) != 0 ) { printf("OpenGL error 0x%x: %s : %d timestamp %08x\n", glTempError, __FILE__, __LINE__, GetTickCount()); __debugbreak(); }

View File

@ -162,8 +162,8 @@ struct LatteDecompilerShader
// compact resource lists for optimized access // compact resource lists for optimized access
struct QuickBufferEntry struct QuickBufferEntry
{ {
uint8 index; uint32 index : 8;
uint16 size; uint32 size : 24;
}; };
boost::container::static_vector<QuickBufferEntry, LATTE_NUM_MAX_UNIFORM_BUFFERS> list_quickBufferList; boost::container::static_vector<QuickBufferEntry, LATTE_NUM_MAX_UNIFORM_BUFFERS> list_quickBufferList;
uint8 textureUnitList[LATTE_NUM_MAX_TEX_UNITS]; uint8 textureUnitList[LATTE_NUM_MAX_TEX_UNITS];