From e746a6bb9a6c9f797d1b40ed22b2f296f8fa5aac Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Sep 2010 12:58:58 -0600 Subject: [PATCH] st/mesa: clamp gl_constants::MaxVarying against MAX_VARYING Don't try to use more generic varying vars than core Mesa supports. Fixes fd.o bug 29959. --- src/mesa/state_tracker/st_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 6cd74db897b..acb9526c01c 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -168,6 +168,7 @@ void st_init_limits(struct st_context *st) * subtract the 2 colors to get the maximum number of varyings (generic * attributes) supported by a driver. */ c->MaxVarying = screen->get_param(screen, PIPE_CAP_MAX_FS_INPUTS) - 2; + c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING); } -- 2.30.2