[Mesa-dev] [PATCH] mesa: Make enable.c and get.c properly range check clip flags.

Brian Paul brian.e.paul at gmail.com
Mon Sep 26 06:52:11 PDT 2011


On Sun, Sep 25, 2011 at 1:52 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> This is a follow-up to commit
> 2d686fe911a89fa477ee3848da41ebfb100500bf, which added decoding of
> GL_CLIP_DISTANCE[67] to the _mesa_set_enable() function.  This patch
> makes the following additional fixes:
>
> - Uses GL_CLIP_DISTANCEi enums consistently within enable.c rather
>  than the deprecated GL_CLIP_PLANEi enums.
>
> - Generates an error if the user tries to access a clip flag that is
>  unsupported by the hardware.
>
> - Applies the same change to _mesa_IsEnabled(), so that querying clip
>  flags using glIsEnabled() works properly.
>
> - Applies corresponding changes to get.c, so that querying clip flags
>  using glGet*() works properly.
>
> Fixes piglit test clip-flag-behavior.
> ---
>  src/mesa/main/enable.c |   27 +++++++++++++++++++--------
>  src/mesa/main/get.c    |   43 +++++++++++++++++++++++++++++++++++++------
>  2 files changed, 56 insertions(+), 14 deletions(-)

Thanks, Paul.

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list