[Mesa-dev] [PATCH 2/2] mesa: utilize context version routines
Matt Turner
mattst88 at gmail.com
Fri Aug 31 13:21:03 PDT 2012
On Fri, Aug 31, 2012 at 11:52 AM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
> index b713f5f..00852ad 100644
> --- a/src/mesa/main/enable.c
> +++ b/src/mesa/main/enable.c
> @@ -1041,7 +1041,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
> * GL_PRIMITIVE_RESTART_NV (which is client state).
> */
> case GL_PRIMITIVE_RESTART:
> - if (!_mesa_is_desktop_gl(ctx) || ctx->Version < 31) {
> + if (!_mesa_is_desktop_gl(ctx) || !_mesa_have_version(ctx, 3, 1)) {
> goto invalid_enum_error;
> }
> if (ctx->Array.PrimitiveRestart != state) {
> @@ -1711,7 +1711,7 @@ _mesa_IsEnabled( GLenum cap )
>
> /* GL 3.1 primitive restart */
> case GL_PRIMITIVE_RESTART:
> - if (!_mesa_is_desktop_gl(ctx) || ctx->Version < 31) {
> + if (!_mesa_is_desktop_gl(ctx) || !_mesa_have_version(ctx, 3,1)) {
Missing a space between the 3, and 1.
> goto invalid_enum_error;
> }
> return ctx->Array.PrimitiveRestart;
> --
There are some more too --
src/mesa/drivers/dri/i915/i915_context.c:183 - could use _mesa_uint_version
src/mesa/drivers/dri/i965/brw_context.c:101,119 - could use _mesa_uint_version
src/mesa/drivers/dri/nouveau/nouveau_context.c:100 - could use
_mesa_have_version
With those fixed, the series is
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Thanks,
Matt
More information about the mesa-dev
mailing list