radeon / r200: Pass the API into _mesa_initialize_context
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user