radeon / r200: Pass the API into _mesa_initialize_context
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Dec 2013 19:04:29 +0000 (11:04 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 27 Jan 2014 21:21:43 +0000 (14:21 -0700)
Otherwise an application that requested an OpenGL ES 1.x context would
actually get a desktop OpenGL context.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "9.1 9.2 10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/radeon/radeon_common_context.c
src/mesa/drivers/dri/radeon/radeon_common_context.h
src/mesa/drivers/dri/radeon/radeon_context.c

index a7021f2b6e3e3e68a31b109766c9853ad69e24ad..637a26332c56a242fccb485d34489c735a235686 100644 (file)
@@ -271,7 +271,7 @@ GLboolean r200CreateContext( gl_api api,
    r200InitShaderFuncs(&functions);
    radeonInitQueryObjFunctions(&functions);
 
-   if (!radeonInitContext(&rmesa->radeon, &functions,
+   if (!radeonInitContext(&rmesa->radeon, api, &functions,
                          glVisual, driContextPriv,
                          sharedContextPrivate)) {
      free(rmesa);
index 925a077bb4f39fa8b1e639e75d27ac0e6e4036f7..54db9d549e123cc09d23c5d7fadf8d8dcc56fced 100644 (file)
@@ -126,6 +126,7 @@ static void radeonInitDriverFuncs(struct dd_function_table *functions)
  * including the Mesa context itself.
  */
 GLboolean radeonInitContext(radeonContextPtr radeon,
+                            gl_api api,
                            struct dd_function_table* functions,
                            const struct gl_config * glVisual,
                            __DRIcontext * driContextPriv,
@@ -147,7 +148,7 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
        else
                shareCtx = NULL;
 
-       if (!_mesa_initialize_context(&radeon->glCtx, API_OPENGL_COMPAT,
+       if (!_mesa_initialize_context(&radeon->glCtx, api,
                                      glVisual, shareCtx,
                                      functions))
                return GL_FALSE;
index ab55071dfba21e85f34abaa995a67ff24f336db0..ce1eb1ea27434d1260b5a1bc1c4b59d97623ba1b 100644 (file)
@@ -515,6 +515,7 @@ static inline __DRIdrawable* radeon_get_readable(radeonContextPtr radeon)
 }
 
 GLboolean radeonInitContext(radeonContextPtr radeon,
+                            gl_api api,
                            struct dd_function_table* functions,
                            const struct gl_config * glVisual,
                            __DRIcontext * driContextPriv,
index 73fd1880f1c98f7594af62873d2732ae7513016f..7d65e2eb5977cc26adddc6b211c3a3ca2552b410 100644 (file)
@@ -234,7 +234,7 @@ r100CreateContext( gl_api api,
    radeonInitTextureFuncs( &rmesa->radeon, &functions );
    radeonInitQueryObjFunctions(&functions);
 
-   if (!radeonInitContext(&rmesa->radeon, &functions,
+   if (!radeonInitContext(&rmesa->radeon, api, &functions,
                          glVisual, driContextPriv,
                          sharedContextPrivate)) {
      free(rmesa);