[Mesa-dev] [PATCH 5/5] Increase MAX_CLIP_PLANES to 8
Paul Berry
stereotype441 at gmail.com
Mon Sep 19 11:31:35 PDT 2011
On 19 September 2011 10:53, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 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.
> */
Sounds reasonable. I think I'm going to shorten "This is used to size stack
allocated arrays" to "This is used to size arrays", since some of the arrays
that are sized by this constant are heap-allocated (e.g. EyeUserPlane in
gl_transform_attrib).
>
> #define MAX_CLIP_PLANES 8
>
> Otherwise, patches 1, 2, 4, and 5 are
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>
Awesome, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110919/1c0c9cf9/attachment.htm>
More information about the mesa-dev
mailing list