Update drisw state tracker to use new API aware context create
authorXavier Chantry <chantry.xavier@gmail.com>
Sun, 2 May 2010 21:25:43 +0000 (23:25 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Sun, 2 May 2010 21:46:43 +0000 (17:46 -0400)
Even though swrast defines its own __DriverAPIRec it still shares the
driCreateNewContext() implementation from dri_util.c.  So the CreateContext
prototypes have to match in the two __DriverAPIRecs.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
src/mesa/drivers/dri/common/drisw_util.c
src/mesa/drivers/dri/common/drisw_util.h

index 8d08b93bfb571b584efd97afb7515f7de02c1116..1529c23b16d0187b32f50f75ac9b04be5140690d 100644 (file)
@@ -112,7 +112,8 @@ driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config,
     pcp->driDrawablePriv = NULL;
     pcp->driReadablePriv = NULL;
 
-    if (!driDriverAPI.CreateContext(&config->modes, pcp, shareCtx)) {
+    if (!driDriverAPI.CreateContext(API_OPENGL,
+                           &config->modes, pcp, shareCtx)) {
        FREE(pcp);
        return NULL;
     }
index 08d5a116e96624ff3470349cd8d9f343182944b0..2b54b2281fa351090e19a73c67341855c4393fe8 100644 (file)
@@ -36,6 +36,8 @@
 #ifndef _DRISW_UTIL_H
 #define _DRISW_UTIL_H
 
+#include "mtypes.h"
+
 #include <GL/gl.h>
 #include <GL/internal/glcore.h>
 #include <GL/internal/dri_interface.h>
@@ -57,7 +59,8 @@ struct __DriverAPIRec {
 
     void (*DestroyScreen)(__DRIscreen *driScrnPriv);
 
-    GLboolean (*CreateContext)(const __GLcontextModes *glVis,
+    GLboolean (*CreateContext)(gl_api glapi,
+                               const __GLcontextModes *glVis,
                                __DRIcontext *driContextPriv,
                                void *sharedContextPrivate);