summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_screen.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-05-02 10:17:07 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-05-02 10:17:07 -0400
commit0870e4a2022cff79805613ae7cd4b9237a2f564c (patch)
tree694d0c07918661996255cff226602045e0d9c707 /src/mesa/drivers/dri/intel/intel_screen.c
parent9d3360567346036f1c2b0b5e9de9bd123d883762 (diff)
parent9fd5fa05122aa0cac0051fa92d1634bde43209db (diff)
Merge branch 'gles2-2'
Conflicts: src/mesa/drivers/dri/common/dri_util.h
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_screen.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index ea739a413e..3aed253e24 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -357,15 +357,18 @@ 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);
static GLboolean
-intelCreateContext(const __GLcontextModes * mesaVis,
+intelCreateContext(gl_api api,
+ const __GLcontextModes * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
@@ -375,7 +378,7 @@ intelCreateContext(const __GLcontextModes * mesaVis,
#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 +387,8 @@ intelCreateContext(const __GLcontextModes * mesaVis,
}
#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;
@@ -431,6 +435,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
struct intel_screen *intelScreen;
GLenum fb_format[3];
GLenum fb_type[3];
+ unsigned int api_mask;
static const GLenum back_buffer_modes[] = {
GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
@@ -457,6 +462,17 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
&intelScreen->deviceID))
return GL_FALSE;
+ api_mask = (1 << __DRI_API_OPENGL);
+#if FEATURE_ES1
+ api_mask |= (1 << __DRI_API_GLES);
+#endif
+#if FEATURE_ES2
+ api_mask |= (1 << __DRI_API_GLES2);
+#endif
+
+ if (IS_9XX(intelScreen->deviceID) || IS_965(intelScreen->deviceID))
+ psp->api_mask = api_mask;
+
if (!intel_init_bufmgr(intelScreen))
return GL_FALSE;