dri: Add DRI entrypoints to create a context for a given API

This commit is contained in:
Kristian Høgsberg
2010-04-27 11:04:51 -04:00
parent e2fd98d794
commit 4b69100bdc
8 changed files with 22 additions and 13 deletions

View File

@@ -356,10 +356,12 @@ extern GLboolean i830CreateContext(const __GLcontextModes * mesaVis,
__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);
@@ -375,7 +377,7 @@ intelCreateContext(gl_api api,
#ifdef I915
if (IS_9XX(intelScreen->deviceID)) {
if (!IS_965(intelScreen->deviceID)) {
return i915CreateContext(mesaVis, driContextPriv,
return i915CreateContext(api, mesaVis, driContextPriv,
sharedContextPrivate);
}
} else {
@@ -384,7 +386,8 @@ intelCreateContext(gl_api api,
}
#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;