summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mga
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/mga')
-rw-r--r--src/mesa/drivers/dri/mga/mga_texcombine.c2
-rw-r--r--src/mesa/drivers/dri/mga/mga_texstate.c16
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c20
-rw-r--r--src/mesa/drivers/dri/mga/mgacontext.h2
-rw-r--r--src/mesa/drivers/dri/mga/mgadd.c2
-rw-r--r--src/mesa/drivers/dri/mga/mgaioctl.c6
-rw-r--r--src/mesa/drivers/dri/mga/mgapixel.c40
-rw-r--r--src/mesa/drivers/dri/mga/mgapixel.h2
-rw-r--r--src/mesa/drivers/dri/mga/mgarender.c4
-rw-r--r--src/mesa/drivers/dri/mga/mgaspan.c8
-rw-r--r--src/mesa/drivers/dri/mga/mgaspan.h4
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c68
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.h8
-rw-r--r--src/mesa/drivers/dri/mga/mgatex.c16
-rw-r--r--src/mesa/drivers/dri/mga/mgatex.h4
-rw-r--r--src/mesa/drivers/dri/mga/mgatris.c26
-rw-r--r--src/mesa/drivers/dri/mga/mgatris.h8
-rw-r--r--src/mesa/drivers/dri/mga/mgavb.c16
-rw-r--r--src/mesa/drivers/dri/mga/mgavb.h16
19 files changed, 130 insertions, 138 deletions
diff --git a/src/mesa/drivers/dri/mga/mga_texcombine.c b/src/mesa/drivers/dri/mga/mga_texcombine.c
index 24083d9651b..1488a89bb65 100644
--- a/src/mesa/drivers/dri/mga/mga_texcombine.c
+++ b/src/mesa/drivers/dri/mga/mga_texcombine.c
@@ -41,7 +41,7 @@
#define MGA_ARG2 1
#define MGA_ALPHA 2
-GLboolean mgaUpdateTextureEnvCombine( GLcontext *ctx, int unit )
+GLboolean mgaUpdateTextureEnvCombine( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
diff --git a/src/mesa/drivers/dri/mga/mga_texstate.c b/src/mesa/drivers/dri/mga/mga_texstate.c
index 54eda62a96a..33ad8b42560 100644
--- a/src/mesa/drivers/dri/mga/mga_texstate.c
+++ b/src/mesa/drivers/dri/mga/mga_texstate.c
@@ -196,7 +196,7 @@ mgaSetTexImages( mgaContextPtr mmesa,
* Texture unit state management
*/
-static void mgaUpdateTextureEnvG200( GLcontext *ctx, GLuint unit )
+static void mgaUpdateTextureEnvG200( struct gl_context *ctx, GLuint unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
struct gl_texture_object *tObj = ctx->Texture.Unit[0]._Current;
@@ -526,7 +526,7 @@ static const GLuint g400_alpha_combine[][MGA_MAX_COMBFUNC] =
},
};
-static GLboolean mgaUpdateTextureEnvBlend( GLcontext *ctx, int unit )
+static GLboolean mgaUpdateTextureEnvBlend( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
@@ -622,7 +622,7 @@ static GLboolean mgaUpdateTextureEnvBlend( GLcontext *ctx, int unit )
return GL_TRUE;
}
-static void mgaUpdateTextureEnvG400( GLcontext *ctx, GLuint unit )
+static void mgaUpdateTextureEnvG400( struct gl_context *ctx, GLuint unit )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
const int source = mmesa->tmu_source[unit];
@@ -719,7 +719,7 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, GLuint unit )
}
}
-static void disable_tex( GLcontext *ctx, int unit )
+static void disable_tex( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -747,7 +747,7 @@ static void disable_tex( GLcontext *ctx, int unit )
mmesa->dirty |= MGA_UPLOAD_CONTEXT | (MGA_UPLOAD_TEX0 << unit);
}
-static GLboolean enable_tex( GLcontext *ctx, int unit )
+static GLboolean enable_tex( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
@@ -768,7 +768,7 @@ static GLboolean enable_tex( GLcontext *ctx, int unit )
return GL_TRUE;
}
-static GLboolean update_tex_common( GLcontext *ctx, int unit )
+static GLboolean update_tex_common( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
@@ -842,7 +842,7 @@ static GLboolean update_tex_common( GLcontext *ctx, int unit )
}
-static GLboolean updateTextureUnit( GLcontext *ctx, int unit )
+static GLboolean updateTextureUnit( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
const int source = mmesa->tmu_source[unit];
@@ -865,7 +865,7 @@ static GLboolean updateTextureUnit( GLcontext *ctx, int unit )
/* The G400 is now programmed quite differently wrt texture environment.
*/
-void mgaUpdateTextureState( GLcontext *ctx )
+void mgaUpdateTextureState( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
GLboolean ok;
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index 3a31dfb44a3..d1b281a2c05 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -57,7 +57,6 @@
#include "mgatris.h"
#include "mgavb.h"
#include "mgapixel.h"
-#include "mga_xmesa.h"
#include "mga_dri.h"
#include "utils.h"
@@ -111,7 +110,7 @@ mgaFillInModes( __DRIscreen *psp,
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
@@ -394,7 +393,6 @@ static const struct dri_extension card_extensions[] =
{ "GL_EXT_stencil_wrap", NULL },
{ "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions },
{ "GL_MESA_ycbcr_texture", NULL },
- { "GL_SGIS_generate_mipmap", NULL },
{ NULL, NULL }
};
@@ -423,13 +421,13 @@ static const struct dri_debug_control debug_control[] =
static GLboolean
mgaCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
int i;
unsigned maxlevels;
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
mgaContextPtr mmesa;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private;
@@ -697,7 +695,7 @@ mgaDestroyContext(__DRIcontext *driContextPriv)
static GLboolean
mgaCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
mgaScreenPrivate *screen = (mgaScreenPrivate *) driScrnPriv->private;
@@ -814,7 +812,7 @@ mgaCreateBuffer( __DRIscreen *driScrnPriv,
static void
mgaDestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void
@@ -822,7 +820,7 @@ mgaSwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
mgaContextPtr mmesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
mmesa = (mgaContextPtr) dPriv->driContextPriv->driverPrivate;
ctx = mmesa->glCtx;
@@ -877,8 +875,8 @@ mgaMakeCurrent(__DRIcontext *driContextPriv,
mmesa->driReadable = driReadPriv;
_mesa_make_current(mmesa->glCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate);
+ (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+ (struct gl_framebuffer *) driReadPriv->driverPrivate);
}
else {
_mesa_make_current(NULL, NULL, NULL);
@@ -927,7 +925,7 @@ void mgaGetLock( mgaContextPtr mmesa, GLuint flags )
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **mgaInitScreen(__DRIscreen *psp)
{
diff --git a/src/mesa/drivers/dri/mga/mgacontext.h b/src/mesa/drivers/dri/mga/mgacontext.h
index 41415659314..b1fbb3c45d6 100644
--- a/src/mesa/drivers/dri/mga/mgacontext.h
+++ b/src/mesa/drivers/dri/mga/mgacontext.h
@@ -179,7 +179,7 @@ struct mga_hw_state {
struct mga_context_t {
- GLcontext *glCtx;
+ struct gl_context *glCtx;
unsigned int lastStamp; /* fullscreen breaks dpriv->laststamp,
* need to shadow it here. */
diff --git a/src/mesa/drivers/dri/mga/mgadd.c b/src/mesa/drivers/dri/mga/mgadd.c
index 2f23c0e5142..1b39813e379 100644
--- a/src/mesa/drivers/dri/mga/mgadd.c
+++ b/src/mesa/drivers/dri/mga/mgadd.c
@@ -43,7 +43,7 @@
***************************************/
-static const GLubyte *mgaGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *mgaGetString( struct gl_context *ctx, GLenum name )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
static char buffer[128];
diff --git a/src/mesa/drivers/dri/mga/mgaioctl.c b/src/mesa/drivers/dri/mga/mgaioctl.c
index 259358eaa3f..a54d86a178d 100644
--- a/src/mesa/drivers/dri/mga/mgaioctl.c
+++ b/src/mesa/drivers/dri/mga/mgaioctl.c
@@ -201,7 +201,7 @@ drmBufPtr mga_get_buffer_ioctl( mgaContextPtr mmesa )
static void
-mgaClear( GLcontext *ctx, GLbitfield mask )
+mgaClear( struct gl_context *ctx, GLbitfield mask )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
__DRIdrawable *dPriv = mmesa->driDrawable;
@@ -479,7 +479,7 @@ void mgaCopyBuffer( __DRIdrawable *dPriv )
*
* \sa glFinish, mgaFlush, mgaFlushDMA
*/
-static void mgaFinish( GLcontext *ctx )
+static void mgaFinish( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
uint32_t fence;
@@ -688,7 +688,7 @@ void mgaGetILoadBufferLocked( mgaContextPtr mmesa )
*
* \sa glFlush, mgaFinish, mgaFlushDMA
*/
-static void mgaFlush( GLcontext *ctx )
+static void mgaFlush( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
diff --git a/src/mesa/drivers/dri/mga/mgapixel.c b/src/mesa/drivers/dri/mga/mgapixel.c
index 664f7c77c2b..b8e365c714c 100644
--- a/src/mesa/drivers/dri/mga/mgapixel.c
+++ b/src/mesa/drivers/dri/mga/mgapixel.c
@@ -55,16 +55,15 @@
(((unsigned long)p) - (unsigned long)mmesa->mgaScreen->buffers.map)
-#if defined(MESA_packed_depth_stencil)
static GLboolean
-check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
+check_depth_stencil_24_8( const struct gl_context *ctx, GLenum type,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz,
GLint pitch )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
- return ( type == GL_UNSIGNED_INT_24_8_MESA &&
+ return ( type == GL_UNSIGNED_INT_24_8 &&
ctx->Visual->DepthBits == 24 &&
ctx->Visual->StencilBits == 8 &&
mmesa->mgaScreen->cpp == 4 &&
@@ -78,11 +77,10 @@ check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
pitch % 32 == 0 &&
pitch < 4096 );
}
-#endif
static GLboolean
-check_depth( const GLcontext *ctx, GLenum type,
+check_depth( const struct gl_context *ctx, GLenum type,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz, GLint pitch )
{
@@ -102,7 +100,7 @@ check_depth( const GLcontext *ctx, GLenum type,
static GLboolean
-check_color( const GLcontext *ctx, GLenum type, GLenum format,
+check_color( const struct gl_context *ctx, GLenum type, GLenum format,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz, GLint pitch )
{
@@ -127,7 +125,7 @@ check_color( const GLcontext *ctx, GLenum type, GLenum format,
}
static GLboolean
-check_color_per_fragment_ops( const GLcontext *ctx )
+check_color_per_fragment_ops( const struct gl_context *ctx )
{
return (!( ctx->Color.AlphaEnabled ||
ctx->Depth.Test ||
@@ -147,7 +145,7 @@ check_color_per_fragment_ops( const GLcontext *ctx )
}
static GLboolean
-check_depth_per_fragment_ops( const GLcontext *ctx )
+check_depth_per_fragment_ops( const struct gl_context *ctx )
{
return ( ctx->Current.RasterPosValid &&
ctx->Color.ColorMask[0][RCOMP] == 0 &&
@@ -162,7 +160,7 @@ check_depth_per_fragment_ops( const GLcontext *ctx )
*/
#if defined(MESA_packed_depth_stencil)
static GLboolean
-check_stencil_per_fragment_ops( const GLcontext *ctx )
+check_stencil_per_fragment_ops( const struct gl_context *ctx )
{
return ( !ctx->Pixel.IndexShift &&
!ctx->Pixel.IndexOffset );
@@ -171,8 +169,8 @@ check_stencil_per_fragment_ops( const GLcontext *ctx )
static GLboolean
-clip_pixelrect( const GLcontext *ctx,
- const GLframebuffer *buffer,
+clip_pixelrect( const struct gl_context *ctx,
+ const struct gl_framebuffer *buffer,
GLint *x, GLint *y,
GLsizei *width, GLsizei *height,
GLint *skipPixels, GLint *skipRows,
@@ -217,7 +215,7 @@ clip_pixelrect( const GLcontext *ctx,
}
static GLboolean
-mgaTryReadPixels( GLcontext *ctx,
+mgaTryReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -252,13 +250,11 @@ mgaTryReadPixels( GLcontext *ctx,
return GL_FALSE;
switch (format) {
-#if defined(MESA_packed_depth_stencil)
- case GL_DEPTH_STENCIL_MESA:
+ case GL_DEPTH_STENCIL:
ok = check_depth_stencil_24_8(ctx, type, pack, pixels, size, pitch);
planemask = ~0;
source = mmesa->mgaScreen->depthOffset;
break;
-#endif
case GL_DEPTH_COMPONENT:
ok = check_depth(ctx, type, pack, pixels, size, pitch);
@@ -377,7 +373,7 @@ mgaTryReadPixels( GLcontext *ctx,
}
static void
-mgaDDReadPixels( GLcontext *ctx,
+mgaDDReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -390,7 +386,7 @@ mgaDDReadPixels( GLcontext *ctx,
-static void do_draw_pix( GLcontext *ctx,
+static void do_draw_pix( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint pitch,
const void *pixels,
@@ -474,7 +470,7 @@ static void do_draw_pix( GLcontext *ctx,
static GLboolean
-mgaTryDrawPixels( GLcontext *ctx,
+mgaTryDrawPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -494,8 +490,7 @@ mgaTryDrawPixels( GLcontext *ctx,
switch (format) {
-#if defined(MESA_packed_depth_stencil)
- case GL_DEPTH_STENCIL_MESA:
+ case GL_DEPTH_STENCIL:
dest = mmesa->mgaScreen->depthOffset;
planemask = ~0;
if (!check_depth_stencil_24_8(ctx, type, unpack, pixels, size, pitch) ||
@@ -503,7 +498,6 @@ mgaTryDrawPixels( GLcontext *ctx,
!check_stencil_per_fragment_ops(ctx))
return GL_FALSE;
break;
-#endif
case GL_DEPTH_COMPONENT:
dest = mmesa->mgaScreen->depthOffset;
@@ -625,7 +619,7 @@ mgaTryDrawPixels( GLcontext *ctx,
}
static void
-mgaDDDrawPixels( GLcontext *ctx,
+mgaDDDrawPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -643,7 +637,7 @@ mgaDDDrawPixels( GLcontext *ctx,
* the same block of agp space which isn't used for anything else at
* present.
*/
-void mgaDDInitPixelFuncs( GLcontext *ctx )
+void mgaDDInitPixelFuncs( struct gl_context *ctx )
{
#if 0
/* evidently, these functions don't always work */
diff --git a/src/mesa/drivers/dri/mga/mgapixel.h b/src/mesa/drivers/dri/mga/mgapixel.h
index f5f300db56d..6241b4b5ef4 100644
--- a/src/mesa/drivers/dri/mga/mgapixel.h
+++ b/src/mesa/drivers/dri/mga/mgapixel.h
@@ -30,6 +30,6 @@
#include "main/mtypes.h"
-extern void mgaDDInitPixelFuncs( GLcontext *ctx );
+extern void mgaDDInitPixelFuncs( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/mga/mgarender.c b/src/mesa/drivers/dri/mga/mgarender.c
index cc0cea618d1..f10a91adcec 100644
--- a/src/mesa/drivers/dri/mga/mgarender.c
+++ b/src/mesa/drivers/dri/mga/mgarender.c
@@ -66,7 +66,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define HAVE_ELTS 0 /* for now */
-static void mgaDmaPrimitive( GLcontext *ctx, GLenum prim )
+static void mgaDmaPrimitive( struct gl_context *ctx, GLenum prim )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint hwprim;
@@ -124,7 +124,7 @@ static void mgaDmaPrimitive( GLcontext *ctx, GLenum prim )
/**********************************************************************/
-static GLboolean mga_run_render( GLcontext *ctx,
+static GLboolean mga_run_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/mga/mgaspan.c b/src/mesa/drivers/dri/mga/mgaspan.c
index 10606c152c3..dd9a8d74edd 100644
--- a/src/mesa/drivers/dri/mga/mgaspan.c
+++ b/src/mesa/drivers/dri/mga/mgaspan.c
@@ -169,7 +169,7 @@
static void
-mgaSpanRenderStart( GLcontext *ctx )
+mgaSpanRenderStart( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
FLUSH_BATCH( mmesa );
@@ -177,7 +177,7 @@ mgaSpanRenderStart( GLcontext *ctx )
}
static void
-mgaSpanRenderFinish( GLcontext *ctx )
+mgaSpanRenderFinish( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
_swrast_flush( ctx );
@@ -192,7 +192,7 @@ mgaSpanRenderFinish( GLcontext *ctx )
* write routines for 888 and 8888. We also need to determine whether or not
* the visual has destination alpha.
*/
-void mgaDDInitSpanFuncs( GLcontext *ctx )
+void mgaDDInitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = mgaSpanRenderStart;
@@ -204,7 +204,7 @@ void mgaDDInitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-mgaSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+mgaSetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
mgaInitPointers_565(&drb->Base);
diff --git a/src/mesa/drivers/dri/mga/mgaspan.h b/src/mesa/drivers/dri/mga/mgaspan.h
index f5e2e49b8a4..48186b46e9a 100644
--- a/src/mesa/drivers/dri/mga/mgaspan.h
+++ b/src/mesa/drivers/dri/mga/mgaspan.h
@@ -30,10 +30,10 @@
#include "drirenderbuffer.h"
-extern void mgaDDInitSpanFuncs( GLcontext *ctx );
+extern void mgaDDInitSpanFuncs( struct gl_context *ctx );
extern void
-mgaSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+mgaSetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c
index 745d5e98525..25d7de28fe8 100644
--- a/src/mesa/drivers/dri/mga/mgastate.c
+++ b/src/mesa/drivers/dri/mga/mgastate.c
@@ -51,7 +51,7 @@
#include "drirenderbuffer.h"
-static void updateSpecularLighting( GLcontext *ctx );
+static void updateSpecularLighting( struct gl_context *ctx );
static const GLuint mgarop_NoBLK[16] = {
DC_atype_rpl | 0x00000000, DC_atype_rstr | 0x00080000,
@@ -68,7 +68,7 @@ static const GLuint mgarop_NoBLK[16] = {
* Alpha blending
*/
-static void mgaDDAlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
+static void mgaDDAlphaFunc(struct gl_context *ctx, GLenum func, GLfloat ref)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLubyte refByte;
@@ -111,7 +111,7 @@ static void mgaDDAlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
mmesa->hw.alpha_func = a | MGA_FIELD( AC_atref, refByte );
}
-static void updateBlendLogicOp(GLcontext *ctx)
+static void updateBlendLogicOp(struct gl_context *ctx)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLboolean logicOp = RGBA_LOGICOP_ENABLED(ctx);
@@ -126,14 +126,14 @@ static void updateBlendLogicOp(GLcontext *ctx)
mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) );
}
-static void mgaDDBlendEquationSeparate(GLcontext *ctx,
+static void mgaDDBlendEquationSeparate(struct gl_context *ctx,
GLenum modeRGB, GLenum modeA)
{
assert( modeRGB == modeA );
updateBlendLogicOp( ctx );
}
-static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB,
+static void mgaDDBlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA )
{
@@ -205,7 +205,7 @@ static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB,
* Depth testing
*/
-static void mgaDDDepthFunc(GLcontext *ctx, GLenum func)
+static void mgaDDDepthFunc(struct gl_context *ctx, GLenum func)
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
int zmode;
@@ -239,7 +239,7 @@ static void mgaDDDepthFunc(GLcontext *ctx, GLenum func)
mmesa->hw.zmode |= zmode;
}
-static void mgaDDDepthMask(GLcontext *ctx, GLboolean flag)
+static void mgaDDDepthMask(struct gl_context *ctx, GLboolean flag)
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -250,7 +250,7 @@ static void mgaDDDepthMask(GLcontext *ctx, GLboolean flag)
}
-static void mgaDDClearDepth(GLcontext *ctx, GLclampd d)
+static void mgaDDClearDepth(struct gl_context *ctx, GLclampd d)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -272,7 +272,7 @@ static void mgaDDClearDepth(GLcontext *ctx, GLclampd d)
*/
-static void mgaDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
+static void mgaDDFogfv(struct gl_context *ctx, GLenum pname, const GLfloat *param)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -292,7 +292,7 @@ static void mgaDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
*/
-void mgaUpdateClipping(const GLcontext *ctx)
+void mgaUpdateClipping(const struct gl_context *ctx)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -319,7 +319,7 @@ void mgaUpdateClipping(const GLcontext *ctx)
}
-static void mgaDDScissor( GLcontext *ctx, GLint x, GLint y,
+static void mgaDDScissor( struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h )
{
if ( ctx->Scissor.Enabled ) {
@@ -338,7 +338,7 @@ static void mgaDDScissor( GLcontext *ctx, GLint x, GLint y,
#define _CULL_NEGATIVE ((1<<11)|(1<<5)|(1<<16))
#define _CULL_POSITIVE (1<<11)
-static void mgaDDCullFaceFrontFace(GLcontext *ctx, GLenum unused)
+static void mgaDDCullFaceFrontFace(struct gl_context *ctx, GLenum unused)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -368,7 +368,7 @@ static void mgaDDCullFaceFrontFace(GLcontext *ctx, GLenum unused)
* Masks
*/
-static void mgaDDColorMask(GLcontext *ctx,
+static void mgaDDColorMask(struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -421,7 +421,7 @@ static int mgaStipples[16] = {
* \param mask Pointer to the 32x32 stipple mask
*/
-static void mgaDDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void mgaDDPolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const GLubyte *m = mask;
@@ -478,7 +478,7 @@ static void mgaDDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
* sense to break them out of the core texture state update routines.
*/
-static void updateSpecularLighting( GLcontext *ctx )
+static void updateSpecularLighting( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
unsigned int specen;
@@ -497,7 +497,7 @@ static void updateSpecularLighting( GLcontext *ctx )
*/
-static void mgaDDLightModelfv(GLcontext *ctx, GLenum pname,
+static void mgaDDLightModelfv(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
@@ -513,7 +513,7 @@ static void mgaDDLightModelfv(GLcontext *ctx, GLenum pname,
static void
-mgaDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref,
+mgaDDStencilFuncSeparate(struct gl_context *ctx, GLenum face, GLenum func, GLint ref,
GLuint mask)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -558,7 +558,7 @@ mgaDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref,
}
static void
-mgaDDStencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
+mgaDDStencilMaskSeparate(struct gl_context *ctx, GLenum face, GLuint mask)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -568,7 +568,7 @@ mgaDDStencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
}
static void
-mgaDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail,
+mgaDDStencilOpSeparate(struct gl_context *ctx, GLenum face, GLenum fail, GLenum zfail,
GLenum zpass)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -676,7 +676,7 @@ mgaDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail,
* Window position and viewport transformation
*/
-void mgaCalcViewport( GLcontext *ctx )
+void mgaCalcViewport( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -694,14 +694,14 @@ void mgaCalcViewport( GLcontext *ctx )
mmesa->SetupNewInputs = ~0;
}
-static void mgaViewport( GLcontext *ctx,
+static void mgaViewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
mgaCalcViewport( ctx );
}
-static void mgaDepthRange( GLcontext *ctx,
+static void mgaDepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
mgaCalcViewport( ctx );
@@ -712,7 +712,7 @@ static void mgaDepthRange( GLcontext *ctx,
* Miscellaneous
*/
-static void mgaDDClearColor(GLcontext *ctx,
+static void mgaDDClearColor(struct gl_context *ctx,
const GLfloat color[4] )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -729,13 +729,13 @@ static void mgaDDClearColor(GLcontext *ctx,
/* Fallback to swrast for select and feedback.
*/
-static void mgaRenderMode( GLcontext *ctx, GLenum mode )
+static void mgaRenderMode( struct gl_context *ctx, GLenum mode )
{
FALLBACK( ctx, MGA_FALLBACK_RENDERMODE, (mode != GL_RENDER) );
}
-static void mgaDDLogicOp( GLcontext *ctx, GLenum opcode )
+static void mgaDDLogicOp( struct gl_context *ctx, GLenum opcode )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -791,7 +791,7 @@ void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers )
}
-static void mgaDDDrawBuffer(GLcontext *ctx, GLenum mode )
+static void mgaDDDrawBuffer(struct gl_context *ctx, GLenum mode )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -823,7 +823,7 @@ static void mgaDDDrawBuffer(GLcontext *ctx, GLenum mode )
}
-static void mgaDDReadBuffer(GLcontext *ctx, GLenum mode )
+static void mgaDDReadBuffer(struct gl_context *ctx, GLenum mode )
{
/* nothing, until we implement h/w glRead/CopyPixels or CopyTexImage */
}
@@ -834,7 +834,7 @@ static void mgaDDReadBuffer(GLcontext *ctx, GLenum mode )
*/
-static void mgaDDEnable(GLcontext *ctx, GLenum cap, GLboolean state)
+static void mgaDDEnable(struct gl_context *ctx, GLenum cap, GLboolean state)
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -932,7 +932,7 @@ static void mgaDDPrintDirty( const char *msg, GLuint state )
void mgaEmitHwStateLocked( mgaContextPtr mmesa )
{
drm_mga_sarea_t *sarea = mmesa->sarea;
- GLcontext * ctx = mmesa->glCtx;
+ struct gl_context * ctx = mmesa->glCtx;
if (MGA_DEBUG & DEBUG_VERBOSE_MSG)
mgaDDPrintDirty( __FUNCTION__, mmesa->dirty );
@@ -1009,7 +1009,7 @@ void mgaEmitHwStateLocked( mgaContextPtr mmesa )
*/
-static void mgaDDValidateState( GLcontext *ctx )
+static void mgaDDValidateState( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -1033,7 +1033,7 @@ static void mgaDDValidateState( GLcontext *ctx )
}
-static void mgaDDInvalidateState( GLcontext *ctx, GLuint new_state )
+static void mgaDDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -1043,7 +1043,7 @@ static void mgaDDInvalidateState( GLcontext *ctx, GLuint new_state )
}
-static void mgaRunPipeline( GLcontext *ctx )
+static void mgaRunPipeline( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -1062,7 +1062,7 @@ static void mgaRunPipeline( GLcontext *ctx )
void mgaInitState( mgaContextPtr mmesa )
{
mgaScreenPrivate *mgaScreen = mmesa->mgaScreen;
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
if (ctx->Visual.doubleBufferMode) {
/* use back buffer by default */
@@ -1161,7 +1161,7 @@ void mgaInitState( mgaContextPtr mmesa )
}
-void mgaDDInitStateFuncs( GLcontext *ctx )
+void mgaDDInitStateFuncs( struct gl_context *ctx )
{
ctx->Driver.UpdateState = mgaDDInvalidateState;
ctx->Driver.Enable = mgaDDEnable;
diff --git a/src/mesa/drivers/dri/mga/mgastate.h b/src/mesa/drivers/dri/mga/mgastate.h
index ec65d4e6cd7..6e8a869cf79 100644
--- a/src/mesa/drivers/dri/mga/mgastate.h
+++ b/src/mesa/drivers/dri/mga/mgastate.h
@@ -29,10 +29,10 @@
#define _MGA_STATE_H
extern void mgaInitState( mgaContextPtr mmesa );
-extern void mgaDDInitStateFuncs(GLcontext *ctx);
-extern void mgaUpdateClipping(const GLcontext *ctx);
-extern void mgaUpdateCull( GLcontext *ctx );
-extern void mgaCalcViewport( GLcontext *ctx );
+extern void mgaDDInitStateFuncs(struct gl_context *ctx);
+extern void mgaUpdateClipping(const struct gl_context *ctx);
+extern void mgaUpdateCull( struct gl_context *ctx );
+extern void mgaCalcViewport( struct gl_context *ctx );
extern void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers );
#endif
diff --git a/src/mesa/drivers/dri/mga/mgatex.c b/src/mesa/drivers/dri/mga/mgatex.c
index ca3dd4b0139..11ab9b6117d 100644
--- a/src/mesa/drivers/dri/mga/mgatex.c
+++ b/src/mesa/drivers/dri/mga/mgatex.c
@@ -161,7 +161,7 @@ static void mgaSetTexBorderColor(mgaTextureObjectPtr t, const GLfloat color[4])
static gl_format
-mgaChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+mgaChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -336,7 +336,7 @@ mgaAllocTexObj( struct gl_texture_object *tObj )
}
-static void mgaTexEnv( GLcontext *ctx, GLenum target,
+static void mgaTexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
GLuint unit = ctx->Texture.CurrentUnit;
@@ -355,7 +355,7 @@ static void mgaTexEnv( GLcontext *ctx, GLenum target,
}
-static void mgaTexImage2D( GLcontext *ctx, GLenum target, GLint level,
+static void mgaTexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -384,7 +384,7 @@ static void mgaTexImage2D( GLcontext *ctx, GLenum target, GLint level,
t->dirty_images[0] |= (1UL << level);
}
-static void mgaTexSubImage2D( GLcontext *ctx,
+static void mgaTexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -424,7 +424,7 @@ static void mgaTexSubImage2D( GLcontext *ctx,
*/
static void
-mgaTexParameter( GLcontext *ctx, GLenum target,
+mgaTexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat *params )
{
@@ -480,7 +480,7 @@ mgaTexParameter( GLcontext *ctx, GLenum target,
static void
-mgaBindTexture( GLcontext *ctx, GLenum target,
+mgaBindTexture( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj )
{
assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_NV) ||
@@ -489,7 +489,7 @@ mgaBindTexture( GLcontext *ctx, GLenum target,
static void
-mgaDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
+mgaDeleteTexture( struct gl_context *ctx, struct gl_texture_object *tObj )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
driTextureObject * t = (driTextureObject *) tObj->DriverData;
@@ -516,7 +516,7 @@ mgaDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-mgaNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+mgaNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/mga/mgatex.h b/src/mesa/drivers/dri/mga/mgatex.h
index 789034964a0..3827fb06686 100644
--- a/src/mesa/drivers/dri/mga/mgatex.h
+++ b/src/mesa/drivers/dri/mga/mgatex.h
@@ -37,7 +37,7 @@ typedef struct mga_texture_object_s *mgaTextureObjectPtr;
* state is properly setup. Texture residence is checked later
* when we grab the lock.
*/
-void mgaUpdateTextureState( GLcontext *ctx );
+void mgaUpdateTextureState( struct gl_context *ctx );
int mgaUploadTexImages( mgaContextPtr mmesa, mgaTextureObjectPtr t );
@@ -45,6 +45,6 @@ void mgaDestroyTexObj( mgaContextPtr mmesa, mgaTextureObjectPtr t );
void mgaInitTextureFuncs( struct dd_function_table *functions );
-GLboolean mgaUpdateTextureEnvCombine( GLcontext *ctx, int unit );
+GLboolean mgaUpdateTextureEnvCombine( struct gl_context *ctx, int unit );
#endif
diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c
index 07cf682f6e4..7b06774adb4 100644
--- a/src/mesa/drivers/dri/mga/mgatris.c
+++ b/src/mesa/drivers/dri/mga/mgatris.c
@@ -40,7 +40,7 @@
#include "mgavb.h"
-static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim );
+static void mgaRenderPrimitive( struct gl_context *ctx, GLenum prim );
/***********************************************************************
* Functions to draw basic primitives *
@@ -285,7 +285,7 @@ mga_fallback_tri( mgaContextPtr mmesa,
mgaVertex *v1,
mgaVertex *v2 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[3];
mga_translate_vertex( ctx, v0, &v[0] );
mga_translate_vertex( ctx, v1, &v[1] );
@@ -299,7 +299,7 @@ mga_fallback_line( mgaContextPtr mmesa,
mgaVertex *v0,
mgaVertex *v1 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[2];
mga_translate_vertex( ctx, v0, &v[0] );
mga_translate_vertex( ctx, v1, &v[1] );
@@ -311,7 +311,7 @@ static void
mga_fallback_point( mgaContextPtr mmesa,
mgaVertex *v0 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[1];
mga_translate_vertex( ctx, v0, &v[0] );
_swrast_Point( ctx, &v[0] );
@@ -630,7 +630,7 @@ static void init_rast_tab( void )
-static void mgaRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n )
+static void mgaRenderClippedPoly( struct gl_context *ctx, const GLuint *elts, GLuint n )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -652,13 +652,13 @@ static void mgaRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n )
tnl->Driver.Render.PrimitiveNotify( ctx, prim );
}
-static void mgaRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+static void mgaRenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
}
-static void mgaFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void mgaFastRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -687,7 +687,7 @@ static void mgaFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
#define ANY_RASTER_FLAGS (DD_FLATSHADE|DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET| \
DD_TRI_UNFILLED)
-void mgaChooseRenderState(GLcontext *ctx)
+void mgaChooseRenderState(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -773,7 +773,7 @@ static GLenum reduced_prim[GL_POLYGON+1] = {
/* Always called between RenderStart and RenderFinish --> We already
* hold the lock.
*/
-void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim )
+void mgaRasterPrimitive( struct gl_context *ctx, GLenum prim, GLuint hwprim )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -806,7 +806,7 @@ void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim )
* which renders strips as strips, the equivalent calculations are
* performed in mgarender.c.
*/
-static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim )
+static void mgaRenderPrimitive( struct gl_context *ctx, GLenum prim )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint rprim = reduced_prim[prim];
@@ -821,7 +821,7 @@ static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim )
}
}
-static void mgaRenderFinish( GLcontext *ctx )
+static void mgaRenderFinish( struct gl_context *ctx )
{
if (MGA_CONTEXT(ctx)->RenderIndex & MGA_FALLBACK_BIT)
_swrast_flush( ctx );
@@ -856,7 +856,7 @@ static const char *getFallbackString(GLuint bit)
}
-void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void mgaFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -893,7 +893,7 @@ void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
}
-void mgaDDInitTriFuncs( GLcontext *ctx )
+void mgaDDInitTriFuncs( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/mga/mgatris.h b/src/mesa/drivers/dri/mga/mgatris.h
index 43612b80a15..2f574feb936 100644
--- a/src/mesa/drivers/dri/mga/mgatris.h
+++ b/src/mesa/drivers/dri/mga/mgatris.h
@@ -30,11 +30,11 @@
#include "main/mtypes.h"
-extern void mgaDDInitTriFuncs( GLcontext *ctx );
-extern void mgaChooseRenderState( GLcontext *ctx );
-extern void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim );
+extern void mgaDDInitTriFuncs( struct gl_context *ctx );
+extern void mgaChooseRenderState( struct gl_context *ctx );
+extern void mgaRasterPrimitive( struct gl_context *ctx, GLenum prim, GLuint hwprim );
-extern void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void mgaFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( ctx, bit, mode ) mgaFallback( ctx, bit, mode )
#define _MGA_NEW_RENDERSTATE (_DD_NEW_POINT_SMOOTH | \
diff --git a/src/mesa/drivers/dri/mga/mgavb.c b/src/mesa/drivers/dri/mga/mgavb.c
index 71bbf33f230..f098aa5cbc0 100644
--- a/src/mesa/drivers/dri/mga/mgavb.c
+++ b/src/mesa/drivers/dri/mga/mgavb.c
@@ -52,10 +52,10 @@
#define MGA_MAX_SETUP 0x80
static struct {
- void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
+ void (*emit)( struct gl_context *, GLuint, GLuint, void *, GLuint );
tnl_interp_func interp;
tnl_copy_pv_func copy_pv;
- GLboolean (*check_tex_sizes)( GLcontext *ctx );
+ GLboolean (*check_tex_sizes)( struct gl_context *ctx );
GLuint vertex_size;
GLuint vertex_format;
} setup_tab[MGA_MAX_SETUP];
@@ -316,7 +316,7 @@ void mgaPrintSetupFlags(char *msg, GLuint flags )
}
-void mgaCheckTexSizes( GLcontext *ctx )
+void mgaCheckTexSizes( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -339,7 +339,7 @@ void mgaCheckTexSizes( GLcontext *ctx )
}
-void mgaBuildVertices( GLcontext *ctx,
+void mgaBuildVertices( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint newinputs )
@@ -386,7 +386,7 @@ void mgaBuildVertices( GLcontext *ctx,
}
-void mgaChooseVertexState( GLcontext *ctx )
+void mgaChooseVertexState( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -433,7 +433,7 @@ void mgaChooseVertexState( GLcontext *ctx )
-void *mga_emit_contiguous_verts( GLcontext *ctx,
+void *mga_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count,
void *dest)
@@ -446,7 +446,7 @@ void *mga_emit_contiguous_verts( GLcontext *ctx,
-void mgaInitVB( GLcontext *ctx )
+void mgaInitVB( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint size = TNL_CONTEXT(ctx)->vb.Size;
@@ -467,7 +467,7 @@ void mgaInitVB( GLcontext *ctx )
}
-void mgaFreeVB( GLcontext *ctx )
+void mgaFreeVB( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
if (mmesa->verts) {
diff --git a/src/mesa/drivers/dri/mga/mgavb.h b/src/mesa/drivers/dri/mga/mgavb.h
index 8d24ab7b5fe..20e5d8ba700 100644
--- a/src/mesa/drivers/dri/mga/mgavb.h
+++ b/src/mesa/drivers/dri/mga/mgavb.h
@@ -39,27 +39,27 @@
_NEW_FOG)
-extern void mgaChooseVertexState( GLcontext *ctx );
-extern void mgaCheckTexSizes( GLcontext *ctx );
-extern void mgaBuildVertices( GLcontext *ctx,
+extern void mgaChooseVertexState( struct gl_context *ctx );
+extern void mgaCheckTexSizes( struct gl_context *ctx );
+extern void mgaBuildVertices( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint newinputs );
extern void mgaPrintSetupFlags(char *msg, GLuint flags );
-extern void mgaInitVB( GLcontext *ctx );
-extern void mgaFreeVB( GLcontext *ctx );
+extern void mgaInitVB( struct gl_context *ctx );
+extern void mgaFreeVB( struct gl_context *ctx );
-extern void *mga_emit_contiguous_verts( GLcontext *ctx,
+extern void *mga_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count,
void *dest );
-extern void mga_translate_vertex(GLcontext *ctx,
+extern void mga_translate_vertex(struct gl_context *ctx,
const mgaVertex *src,
SWvertex *dst);
-extern void mga_print_vertex( GLcontext *ctx, const mgaVertex *v );
+extern void mga_print_vertex( struct gl_context *ctx, const mgaVertex *v );
#endif