Mesa (master): main: Fix MaxUniformComponents for geometry shaders.

Paul Berry stereotype441 at kemper.freedesktop.org
Fri Nov 15 17:07:32 UTC 2013


Module: Mesa
Branch: master
Commit: 46e9f78efcb6ccc25ea59d83624aaa5077254a85
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=46e9f78efcb6ccc25ea59d83624aaa5077254a85

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Nov 13 14:24:09 2013 -0800

main: Fix MaxUniformComponents for geometry shaders.

For both vertex and fragment shaders we default MaxUniformComponents
to 4 * MAX_UNIFORMS.  It makes sense to do this for geometry shaders
too; if back-ends have different limits they can override them as
necessary.

Fixes piglit test:
spec/glsl-1.50/built-in constants/gl_MaxGeometryUniformComponents

Cc: "10.0" <mesa-stable at lists.freedesktop.org>

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

---

 src/mesa/main/context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index d005d23..8cbc935 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -494,7 +494,7 @@ init_program_limits(struct gl_context *ctx, GLenum type,
       prog->MaxParameters = MAX_VERTEX_PROGRAM_PARAMS;
       prog->MaxAttribs = MAX_VERTEX_GENERIC_ATTRIBS;
       prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
-      prog->MaxUniformComponents = MAX_GEOMETRY_UNIFORM_COMPONENTS;
+      prog->MaxUniformComponents = 4 * MAX_UNIFORMS;
       prog->MaxInputComponents = 16 * 4; /* old limit not to break tnl and swrast */
       prog->MaxOutputComponents = 16 * 4; /* old limit not to break tnl and swrast */
       break;




More information about the mesa-commit mailing list