[Mesa-dev] [PATCH 5/5] Increase MAX_CLIP_PLANES to 8

Kenneth Graunke kenneth at whitecape.org
Mon Sep 19 10:53:49 PDT 2011


On 09/14/2011 12:49 PM, Paul Berry wrote:
> This will allow drivers to increase ctx->Const.MaxClipPlanes to 8,
> which is required for GLSL-1.30 compliance.
>
> No driver behavior should be affected.  However, many data structures
> use MAX_CLIP_PLANES as an array size, so these arrays will get
> slightly larger.
> ---
>   src/mesa/main/config.h |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
> index 91aef90..cc288da 100644
> --- a/src/mesa/main/config.h
> +++ b/src/mesa/main/config.h
> @@ -62,7 +62,7 @@
>   #define MAX_LIGHTS 8
>
>   /** Maximum user-defined clipping planes */
> -#define MAX_CLIP_PLANES 6
> +#define MAX_CLIP_PLANES 8
>
>   /** Maximum pixel map lookup table size */
>   #define MAX_PIXEL_MAP_TABLE 256

I'd prefer this:

/**
  * Maximum number of user-defined clipping planes supported by any
  * driver in Mesa.  This is used to size stack allocated arrays.
  */
#define MAX_CLIP_PLANES 8

Otherwise, patches 1, 2, 4, and 5 are
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list