intel: Advertise GLES1/2 for i915+ when enabled
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 28 Apr 2010 01:43:40 +0000 (21:43 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 28 Apr 2010 18:05:22 +0000 (14:05 -0400)
src/mesa/drivers/dri/intel/intel_screen.c

index 9b7ae73e45b5d62a279fc768d0ebe4472bd4d08f..2b54cda66d1cc301e97323afdaaa1b53f81ec7ba 100644 (file)
@@ -434,6 +434,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
@@ -460,6 +461,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;