dri/nouveau: Kill a bunch of ternary operators.
[mesa.git] / src / mesa / drivers / dri / sis / sis_context.c
index 0944f4d8b4e243f3cc5425b99b0c5539c53c8acb..c5a9fdfb2a039b701a0cdb66d9673fe43028d15e 100644 (file)
@@ -43,8 +43,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "sis_alloc.h"
 
 #include "main/imports.h"
-#include "main/matrix.h"
-#include "main/extensions.h"
 #include "utils.h"
 #include "main/framebuffer.h"
 
@@ -55,7 +53,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "vbo/vbo.h"
 
 #include "tnl/tnl.h"
-#include "tnl/t_pipeline.h"
 
 #define need_GL_EXT_fog_coord
 #define need_GL_EXT_secondary_color
@@ -150,7 +147,7 @@ WaitingFor3dIdle(sisContextPtr smesa, int wLen)
    }
 }
 
-void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
+void sisReAllocateBuffers(struct gl_context *ctx, struct gl_framebuffer *drawbuffer,
                           GLuint width, GLuint height)
 {
    sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -161,11 +158,12 @@ void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
 }
 
 GLboolean
-sisCreateContext( const __GLcontextModes *glVisual,
+sisCreateContext( gl_api api,
+                 const struct gl_config *glVisual,
                  __DRIcontext *driContextPriv,
                   void *sharedContextPrivate )
 {
-   GLcontext *ctx, *shareCtx;
+   struct gl_context *ctx, *shareCtx;
    __DRIscreen *sPriv = driContextPriv->driScreenPriv;
    sisContextPtr smesa;
    sisScreenPtr sisScreen;
@@ -383,8 +381,8 @@ sisMakeCurrent( __DRIcontext *driContextPriv,
 
       newSisCtx->driDrawable = driDrawPriv;
 
-      drawBuffer = (GLframebuffer *)driDrawPriv->driverPrivate;
-      readBuffer = (GLframebuffer *)driReadPriv->driverPrivate;
+      drawBuffer = (struct gl_framebuffer *)driDrawPriv->driverPrivate;
+      readBuffer = (struct gl_framebuffer *)driReadPriv->driverPrivate;
 
       _mesa_make_current( newSisCtx->glCtx, drawBuffer, readBuffer );