[Mesa-dev] [PATCH 6/8] mesa: add context fields for GL_ARB_robustness

nobled nobled at dreamwidth.org
Tue Apr 19 19:30:45 PDT 2011


---
 src/mesa/main/context.c    |    4 ++++
 src/mesa/main/extensions.c |    1 +
 src/mesa/main/get.c        |    3 +++
 src/mesa/main/mtypes.h     |    6 ++++++
 4 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 8053edc..ea13bdd 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -658,6 +658,9 @@ _mesa_init_constants(struct gl_context *ctx)
    /** GL_EXT_gpu_shader4 */
    ctx->Const.MinProgramTexelOffset = -8;
    ctx->Const.MaxProgramTexelOffset = 7;
+
+   /* GL_ARB_robustness */
+   ctx->Const.ResetStrategy = GL_NO_RESET_NOTIFICATION_ARB;
 }


@@ -793,6 +796,7 @@ init_attrib_groups(struct gl_context *ctx)
    /* Miscellaneous */
    ctx->NewState = _NEW_ALL;
    ctx->ErrorValue = (GLenum) GL_NO_ERROR;
+   ctx->ResetStatus = (GLenum) GL_NO_ERROR;
    ctx->varying_vp_inputs = ~0;

    return GL_TRUE;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 8a0ab96..b7ba7ed 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -107,6 +107,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_point_parameters",
o(EXT_point_parameters),                    GL,             1997 },
    { "GL_ARB_point_sprite",
o(ARB_point_sprite),                        GL,             2003 },
    { "GL_ARB_provoking_vertex",
o(EXT_provoking_vertex),                    GL,             2009 },
+   { "GL_ARB_robustness",                          o(dummy_false),
                         GL,             2010 },
    { "GL_ARB_sampler_objects",
o(ARB_sampler_objects),                     GL,             2009 },
    { "GL_ARB_seamless_cube_map",
o(ARB_seamless_cube_map),                   GL,             2009 },
    { "GL_ARB_shader_objects",
o(ARB_shader_objects),                      GL,             2002 },
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index e188032..e933bbe 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1281,6 +1281,9 @@ static const struct value_desc values[] = {
    /* GL 3.2 */
    { GL_CONTEXT_PROFILE_MASK, CONTEXT_INT(Const.ProfileMask),
      extra_version_32 },
+
+   /* GL_ARB_robustness */
+   { GL_RESET_NOTIFICATION_STRATEGY_ARB,
CONTEXT_ENUM(Const.ResetStrategy), NO_EXTRA },
 #endif /* FEATURE_GL */
 };

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5a25d64..63629fc 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2739,6 +2739,9 @@ struct gl_constants

    /* GL_EXT_framebuffer_sRGB */
    GLboolean sRGBCapable; /* can enable sRGB blend/update on FBOs */
+
+   /* GL_ARB_robustness */
+   GLenum ResetStrategy;
 };


@@ -3298,6 +3301,9 @@ struct gl_context

    GLenum ErrorValue;        /**< Last error code */

+   /* GL_ARB_robustness */
+   GLenum ResetStatus;
+
    /**
     * Recognize and silence repeated error debug messages in buggy apps.
     */
-- 
1.7.0.4


More information about the mesa-dev mailing list