From 5b793958f9fdae763ef7cb4ca0a715bbf9c50294 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Feb 2024 23:06:02 +0100 Subject: [PATCH] fix uniform buffer size check --- src/common/rendering/gl_load/gl_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/rendering/gl_load/gl_interface.cpp b/src/common/rendering/gl_load/gl_interface.cpp index 331ffda5cb..f47e90b01f 100644 --- a/src/common/rendering/gl_load/gl_interface.cpp +++ b/src/common/rendering/gl_load/gl_interface.cpp @@ -184,7 +184,7 @@ void gl_LoadExtensions() glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &v); gl.maxuniforms = v; glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &v); - gl.maxuniformblock = max(65536, v); + gl.maxuniformblock = min(65536, v); glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &v); gl.uniformblockalignment = v;