i830InitVtbl(i830);
i830InitDriverFunctions(&functions);
- if (!intelInitContext(intel, mesaVis, driContextPriv,
+ if (!intelInitContext(intel, __DRI_API_OPENGL, mesaVis, driContextPriv,
sharedContextPrivate, &functions)) {
FREE(i830);
return GL_FALSE;
extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
-i915CreateContext(const __GLcontextModes * mesaVis,
+i915CreateContext(int api,
+ const __GLcontextModes * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
i915InitDriverFunctions(&functions);
- if (!intelInitContext(intel, mesaVis, driContextPriv,
+ if (!intelInitContext(intel, api, mesaVis, driContextPriv,
sharedContextPrivate, &functions)) {
FREE(i915);
return GL_FALSE;
/*======================================================================
* i915_context.c
*/
-extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis,
+extern GLboolean i915CreateContext(int api,
+ const __GLcontextModes * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
functions->Viewport = intel_viewport;
}
-GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
+GLboolean brwCreateContext( int api,
+ const __GLcontextModes *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
brwInitVtbl( brw );
brwInitDriverFunctions( &functions );
- if (!intelInitContext( intel, mesaVis, driContextPriv,
+ if (!intelInitContext( intel, api, mesaVis, driContextPriv,
sharedContextPrivate, &functions )) {
printf("%s: failed to init intel context\n", __FUNCTION__);
FREE(brw);
/*======================================================================
* brw_context.c
*/
-GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
+GLboolean brwCreateContext( int api,
+ const __GLcontextModes *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
GLboolean
intelInitContext(struct intel_context *intel,
+ int api,
const __GLcontextModes * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
if (intelScreen->bufmgr == NULL)
return GL_FALSE;
- if (!_mesa_initialize_context(&intel->ctx, mesaVis, shareCtx,
- functions, (void *) intel)) {
+ if (!_mesa_initialize_context_for_api(&intel->ctx, api, mesaVis, shareCtx,
+ functions, (void *) intel)) {
printf("%s: failed to init mesa context\n", __FUNCTION__);
return GL_FALSE;
}
*/
extern GLboolean intelInitContext(struct intel_context *intel,
+ int api,
const __GLcontextModes * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
-extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis,
+extern GLboolean i915CreateContext(int api,
+ const __GLcontextModes * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
-extern GLboolean brwCreateContext(const __GLcontextModes * mesaVis,
+extern GLboolean brwCreateContext(int api,
+ const __GLcontextModes * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
#ifdef I915
if (IS_9XX(intelScreen->deviceID)) {
if (!IS_965(intelScreen->deviceID)) {
- return i915CreateContext(mesaVis, driContextPriv,
+ return i915CreateContext(api, mesaVis, driContextPriv,
sharedContextPrivate);
}
} else {
}
#else
if (IS_965(intelScreen->deviceID))
- return brwCreateContext(mesaVis, driContextPriv, sharedContextPrivate);
+ return brwCreateContext(api, mesaVis,
+ driContextPriv, sharedContextPrivate);
#endif
fprintf(stderr, "Unrecognized deviceID %x\n", intelScreen->deviceID);
return GL_FALSE;