To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8, and as a side effect this will increase the value of MAX_CLIPPED_VERTICES defined in src/mesa/main/config.h. Gallium has its own value of MAX_CLIPPED_VERTICES, defined in draw_pipe_clip.c, but this value only takes effect if MAX_CLIPPED_VERTICES isn't already defined, so whether it is used or not depends on what is included by draw_pipe_clip.c.
This patch ensures that draw_pipe_clip.c always uses its own definition of MAX_CLIPPED_VERTICES, so Gallium drivers won't be affected by increasing MAX_CLIP_PLANES to 8 until they're ready. --- src/gallium/auxiliary/draw/draw_pipe_clip.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c b/src/gallium/auxiliary/draw/draw_pipe_clip.c index b49502c..2dd8dee 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c @@ -49,9 +49,11 @@ #define DIFFERENT_SIGNS(x, y) ((x) * (y) <= 0.0F && (x) - (y) != 0.0F) #endif -#ifndef MAX_CLIPPED_VERTICES +/* Don't use the global MAX_CLIPPED_VERTICES (which may be larger for other + * drivers); use our own. + */ +#undef MAX_CLIPPED_VERTICES #define MAX_CLIPPED_VERTICES ((2 * (6 + PIPE_MAX_CLIP_PLANES))+1) -#endif -- 1.7.6 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev