diff options
author | Paul Berry <[email protected]> | 2012-11-27 12:26:51 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-11-29 11:33:15 -0800 |
commit | dbd6135bc1ba285128ab991c03c4df6fbd6fefe8 (patch) | |
tree | 781c0057d2a7fa6dca36b39343dee3884ea650bb /src/mesa/drivers | |
parent | 3e163a137be7f9a80ec720903c4bda028de5681f (diff) |
mesa: Rename API_OPENGL to API_OPENGL_COMPAT.
This should help avoid confusion now that we're using the gl_api enum
to distinguishing between core and compatibility API's. The
corresponding enum value for core API's is API_OPENGL_CORE.
Acked-by: Eric Anholt <[email protected]>
Acked-by: Matt Turner <[email protected]>
Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 26 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/drisw_util.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_context.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/windows/gdi/wmesa.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 2 |
14 files changed, 33 insertions, 33 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 7d58281c181..e4ff5c9004f 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -567,7 +567,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) save->PolygonCull = ctx->Polygon.CullFlag; _mesa_PolygonMode(GL_FRONT_AND_BACK, GL_FILL); _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL, GL_FALSE); - if (ctx->API == API_OPENGL) { + if (ctx->API == API_OPENGL_COMPAT) { _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, GL_FALSE); _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, GL_FALSE); } @@ -580,14 +580,14 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) } if (state & MESA_META_SHADER) { - if (ctx->API == API_OPENGL && ctx->Extensions.ARB_vertex_program) { + if (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_vertex_program) { save->VertexProgramEnabled = ctx->VertexProgram.Enabled; _mesa_reference_vertprog(ctx, &save->VertexProgram, ctx->VertexProgram.Current); _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_FALSE); } - if (ctx->API == API_OPENGL && ctx->Extensions.ARB_fragment_program) { + if (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_fragment_program) { save->FragmentProgramEnabled = ctx->FragmentProgram.Enabled; _mesa_reference_fragprog(ctx, &save->FragmentProgram, ctx->FragmentProgram.Current); @@ -623,7 +623,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) save->EnvMode = ctx->Texture.Unit[0].EnvMode; /* Disable all texture units */ - if (ctx->API == API_OPENGL || ctx->API == API_OPENGLES) { + if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) { for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { save->TexEnabled[u] = ctx->Texture.Unit[u].Enabled; save->TexGenEnabled[u] = ctx->Texture.Unit[u].TexGenEnabled; @@ -636,7 +636,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) if (ctx->Extensions.OES_EGL_image_external) _mesa_set_enable(ctx, GL_TEXTURE_EXTERNAL_OES, GL_FALSE); - if (ctx->API == API_OPENGL) { + if (ctx->API == API_OPENGL_COMPAT) { _mesa_set_enable(ctx, GL_TEXTURE_1D, GL_FALSE); _mesa_set_enable(ctx, GL_TEXTURE_3D, GL_FALSE); if (ctx->Extensions.NV_texture_rectangle) @@ -661,7 +661,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) /* set defaults for unit[0] */ _mesa_ActiveTexture(GL_TEXTURE0); _mesa_ClientActiveTexture(GL_TEXTURE0); - if (ctx->API == API_OPENGL || ctx->API == API_OPENGLES) { + if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) { _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); } } @@ -885,7 +885,7 @@ _mesa_meta_end(struct gl_context *ctx) _mesa_PolygonMode(GL_FRONT, save->FrontPolygonMode); _mesa_PolygonMode(GL_BACK, save->BackPolygonMode); } - if (ctx->API == API_OPENGL) { + if (ctx->API == API_OPENGL_COMPAT) { _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, save->PolygonStipple); _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, save->PolygonSmooth); } @@ -900,7 +900,7 @@ _mesa_meta_end(struct gl_context *ctx) } if (state & MESA_META_SHADER) { - if (ctx->API == API_OPENGL && ctx->Extensions.ARB_vertex_program) { + if (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_vertex_program) { _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, save->VertexProgramEnabled); _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, @@ -908,7 +908,7 @@ _mesa_meta_end(struct gl_context *ctx) _mesa_reference_vertprog(ctx, &save->VertexProgram, NULL); } - if (ctx->API == API_OPENGL && ctx->Extensions.ARB_fragment_program) { + if (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_fragment_program) { _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, save->FragmentProgramEnabled); _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, @@ -941,7 +941,7 @@ _mesa_meta_end(struct gl_context *ctx) _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled); _mesa_ClearStencil(stencil->Clear); - if (ctx->API == API_OPENGL && ctx->Extensions.EXT_stencil_two_side) { + if (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.EXT_stencil_two_side) { _mesa_set_enable(ctx, GL_STENCIL_TEST_TWO_SIDE_EXT, stencil->TestTwoSide); _mesa_ActiveStencilFaceEXT(stencil->ActiveFace @@ -973,7 +973,7 @@ _mesa_meta_end(struct gl_context *ctx) ASSERT(ctx->Texture.CurrentUnit == 0); /* restore texenv for unit[0] */ - if (ctx->API == API_OPENGL || ctx->API == API_OPENGLES) { + if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) { _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, save->EnvMode); } @@ -988,7 +988,7 @@ _mesa_meta_end(struct gl_context *ctx) } /* Restore fixed function texture enables, texgen */ - if (ctx->API == API_OPENGL || ctx->API == API_OPENGLES) { + if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) { for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture.Unit[u].Enabled != save->TexEnabled[u]) { FLUSH_VERTICES(ctx, _NEW_TEXTURE); @@ -3268,7 +3268,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, mipmap->FBO); - if (ctx->API == API_OPENGL || ctx->API == API_OPENGLES) + if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE); else assert(!genMipmapSave); diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 917b9465b74..9cebcea924c 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -183,7 +183,7 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api, switch (api) { case __DRI_API_OPENGL: - mesa_api = API_OPENGL; + mesa_api = API_OPENGL_COMPAT; break; case __DRI_API_GLES: mesa_api = API_OPENGLES; @@ -221,13 +221,13 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api, } /* Mesa does not support the GL_ARB_compatibilty extension or the - * compatibility profile. This means that we treat a API_OPENGL 3.1 as - * API_OPENGL_CORE and reject API_OPENGL 3.2+. + * compatibility profile. This means that we treat a API_OPENGL_COMPAT 3.1 as + * API_OPENGL_CORE and reject API_OPENGL_COMPAT 3.2+. */ - if (mesa_api == API_OPENGL && major_version == 3 && minor_version == 1) + if (mesa_api == API_OPENGL_COMPAT && major_version == 3 && minor_version == 1) mesa_api = API_OPENGL_CORE; - if (mesa_api == API_OPENGL + if (mesa_api == API_OPENGL_COMPAT && ((major_version > 3) || (major_version == 3 && minor_version >= 2))) { *error = __DRI_CTX_ERROR_BAD_API; @@ -244,7 +244,7 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api, * anything specific about this case. However, none of the known flags * have any meaning in an ES context, so this seems safe. */ - if (mesa_api != API_OPENGL + if (mesa_api != API_OPENGL_COMPAT && mesa_api != API_OPENGL_CORE && flags != 0) { *error = __DRI_CTX_ERROR_BAD_FLAG; diff --git a/src/mesa/drivers/dri/common/drisw_util.c b/src/mesa/drivers/dri/common/drisw_util.c index d6927485425..8fdb05ec336 100644 --- a/src/mesa/drivers/dri/common/drisw_util.c +++ b/src/mesa/drivers/dri/common/drisw_util.c @@ -117,7 +117,7 @@ driCreateContextAttribs(__DRIscreen *screen, int api, switch (api) { case __DRI_API_OPENGL: - mesa_api = API_OPENGL; + mesa_api = API_OPENGL_COMPAT; break; case __DRI_API_GLES: mesa_api = API_OPENGLES; diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index c0d1f93bece..d47e20f8608 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -175,7 +175,7 @@ i915CreateContext(int api, * and version. */ switch (api) { - case API_OPENGL: { + case API_OPENGL_COMPAT: { const unsigned max_version = (ctx->Extensions.ARB_fragment_shader && ctx->Extensions.ARB_occlusion_query) ? 20 : 15; diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index f439cf20abc..4b1b247ce7d 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -101,7 +101,7 @@ brwCreateContext(int api, /* Determine max_supported_version. */ switch (api) { - case API_OPENGL: + case API_OPENGL_COMPAT: max_supported_version = supports_gl30 ? 30 : 21; break; case API_OPENGLES: diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 4e2742fe697..da231270bc1 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -797,7 +797,7 @@ intelCreateContext(gl_api api, sharedContextPrivate); } else { switch (api) { - case API_OPENGL: + case API_OPENGL_COMPAT: if (major_version > 1 || minor_version > 3) { *error = __DRI_CTX_ERROR_BAD_VERSION; success = false; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 80e93950b2f..7e7dcc49944 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -60,7 +60,7 @@ nouveau_context_create(gl_api api, struct gl_context *ctx; switch (api) { - case API_OPENGL: + case API_OPENGL_COMPAT: /* Do after-the-fact version checking (below). */ break; @@ -133,7 +133,7 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen, nouveau_fbo_functions_init(&functions); /* Initialize the mesa context. */ - _mesa_initialize_context(ctx, API_OPENGL, visual, + _mesa_initialize_context(ctx, API_OPENGL_COMPAT, visual, share_ctx, &functions); nouveau_state_init(ctx); diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 677dc8d20d3..360ba72c13d 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -213,7 +213,7 @@ GLboolean r200CreateContext( gl_api api, int tcl_mode; switch (api) { - case API_OPENGL: + case API_OPENGL_COMPAT: if (major_version > 1 || minor_version > 3) { *error = __DRI_CTX_ERROR_BAD_VERSION; return GL_FALSE; diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 566a3728d08..6dec1379afc 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -147,7 +147,7 @@ GLboolean radeonInitContext(radeonContextPtr radeon, else shareCtx = NULL; - if (!_mesa_initialize_context(&radeon->glCtx, API_OPENGL, + if (!_mesa_initialize_context(&radeon->glCtx, API_OPENGL_COMPAT, glVisual, shareCtx, functions)) return GL_FALSE; diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index 962f08ac698..1e0da0bcf6d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -179,7 +179,7 @@ r100CreateContext( gl_api api, int tcl_mode, fthrottle_mode; switch (api) { - case API_OPENGL: + case API_OPENGL_COMPAT: if (major_version > 1 || minor_version > 3) { *error = __DRI_CTX_ERROR_BAD_VERSION; return GL_FALSE; diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 45ef3c24638..3a47cdb5808 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -706,7 +706,7 @@ dri_create_context(gl_api api, (void) flags; switch (api) { - case API_OPENGL: + case API_OPENGL_COMPAT: if (major_version > 2 || (major_version == 2 && minor_version > 1)) { *error = __DRI_CTX_ERROR_BAD_VERSION; @@ -768,7 +768,7 @@ dri_create_context(gl_api api, switch (api) { case API_OPENGL_CORE: /* XXX fix me, fall-through for now */ - case API_OPENGL: + case API_OPENGL_COMPAT: _mesa_enable_1_3_extensions(mesaCtx); _mesa_enable_1_4_extensions(mesaCtx); _mesa_enable_1_5_extensions(mesaCtx); diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 1b12d8c2d09..e02b2f3ca59 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -709,7 +709,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, functions.GetBufferSize = NULL; if (!_mesa_initialize_context(&osmesa->mesa, - API_OPENGL, + API_OPENGL_COMPAT, osmesa->gl_visual, sharelist ? &sharelist->mesa : (struct gl_context *) NULL, diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c index 5728d3aa4f2..9f6f750d027 100644 --- a/src/mesa/drivers/windows/gdi/wmesa.c +++ b/src/mesa/drivers/windows/gdi/wmesa.c @@ -610,7 +610,7 @@ WMesaContext WMesaCreateContext(HDC hDC, /* initialize the Mesa context data */ ctx = &c->gl_ctx; - _mesa_initialize_context(ctx, API_OPENGL, visual, + _mesa_initialize_context(ctx, API_OPENGL_COMPAT, visual, NULL, &functions); /* visual no longer needed - it was copied by _mesa_initialize_context() */ diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 43a97f9eb5d..a466943a860 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -900,7 +900,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) /* initialize with default driver functions, then plug in XMesa funcs */ _mesa_init_driver_functions(&functions); xmesa_init_driver_functions(v, &functions); - if (!_mesa_initialize_context(mesaCtx, API_OPENGL, &v->mesa_visual, + if (!_mesa_initialize_context(mesaCtx, API_OPENGL_COMPAT, &v->mesa_visual, share_list ? &(share_list->mesa) : (struct gl_context *) NULL, &functions)) { free(c); |