Update drisw state tracker to use new API aware context create

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>
This commit is contained in:
Xavier Chantry 2010-05-02 23:25:43 +02:00 committed by Kristian Høgsberg
parent 6edb18ee35
commit b44c52870d
2 changed files with 6 additions and 2 deletions

View 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;
}

View 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);