aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-10-12 12:26:10 -0400
committerKristian Høgsberg <[email protected]>2010-10-13 09:43:25 -0400
commitf9995b30756140724f41daf963fa06167912be7f (patch)
treebc34fd4db5eb9d2ad55968cb4e6e4e5a65df5a27 /src/mesa/drivers/dri/r200
parent31aca27c08d6a385c595d34fe4ee06390bf5b0e8 (diff)
Drop GLcontext typedef and use struct gl_context instead
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_cmdbuf.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_fragshader.c8
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c104
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.h18
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c52
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c32
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.h22
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c20
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.h10
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c10
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.h6
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c14
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c16
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.h2
21 files changed, 168 insertions, 168 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c
index e187fc0f61e..05a15c444cc 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.c
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -444,7 +444,7 @@ static inline void emit_draw_packet(struct r200_context *r200,
* @param[in] height region height
* @param[in] flip_y set if y coords of the source image need to be flipped
*/
-unsigned r200_blit(GLcontext *ctx,
+unsigned r200_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r200/r200_blit.h b/src/mesa/drivers/dri/r200/r200_blit.h
index 53206f0b471..56018b9c0ea 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.h
+++ b/src/mesa/drivers/dri/r200/r200_blit.h
@@ -32,7 +32,7 @@ void r200_blit_init(struct r200_context *r200);
unsigned r200_check_blit(gl_format mesa_format);
-unsigned r200_blit(GLcontext *ctx,
+unsigned r200_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
index ad43a8ca920..931a9ecf8fe 100644
--- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
@@ -167,7 +167,7 @@ static void r200FireEB(r200ContextPtr rmesa, int vertex_count, int type)
}
}
-void r200FlushElts(GLcontext *ctx)
+void r200FlushElts(struct gl_context *ctx)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
int nr, elt_used = rmesa->tcl.elt_used;
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 2a35e2d6e44..723e31401de 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -80,7 +80,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Return various strings for glGetString().
*/
-static const GLubyte *r200GetString( GLcontext *ctx, GLenum name )
+static const GLubyte *r200GetString( struct gl_context *ctx, GLenum name )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
static char buffer[128];
@@ -279,7 +279,7 @@ GLboolean r200CreateContext( gl_api api,
radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
struct dd_function_table functions;
r200ContextPtr rmesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
int i;
int tcl_mode;
diff --git a/src/mesa/drivers/dri/r200/r200_fragshader.c b/src/mesa/drivers/dri/r200/r200_fragshader.c
index 2a9268dd343..b1d045c5cae 100644
--- a/src/mesa/drivers/dri/r200/r200_fragshader.c
+++ b/src/mesa/drivers/dri/r200/r200_fragshader.c
@@ -121,7 +121,7 @@ static GLuint dstmask_table[8] =
R200_TXC_OUTPUT_MASK_RGB
};
-static void r200UpdateFSArith( GLcontext *ctx )
+static void r200UpdateFSArith( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint *afs_cmd;
@@ -322,7 +322,7 @@ static void r200UpdateFSArith( GLcontext *ctx )
rmesa->afs_loaded = ctx->ATIFragmentShader.Current;
}
-static void r200UpdateFSRouting( GLcontext *ctx ) {
+static void r200UpdateFSRouting( struct gl_context *ctx ) {
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct ati_fragment_shader *shader = ctx->ATIFragmentShader.Current;
GLuint reg;
@@ -499,7 +499,7 @@ static void r200UpdateFSRouting( GLcontext *ctx ) {
}
}
-static void r200UpdateFSConstants( GLcontext *ctx )
+static void r200UpdateFSConstants( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct ati_fragment_shader *shader = ctx->ATIFragmentShader.Current;
@@ -537,7 +537,7 @@ static void r200UpdateFSConstants( GLcontext *ctx )
* stored in some DriverData object attached to the mesa atifs object, i.e. binding a
* shader wouldn't force us to "recompile" the shader).
*/
-void r200UpdateFragmentShader( GLcontext *ctx )
+void r200UpdateFragmentShader( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index df73de5394a..02201cb53d6 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -54,7 +54,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define R200_TIMEOUT 512
#define R200_IDLE_RETRY 16
-static void r200KernelClear(GLcontext *ctx, GLuint flags)
+static void r200KernelClear(struct gl_context *ctx, GLuint flags)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -180,7 +180,7 @@ static void r200KernelClear(GLcontext *ctx, GLuint flags)
/* ================================================================
* Buffer clear
*/
-static void r200Clear( GLcontext *ctx, GLbitfield mask )
+static void r200Clear( struct gl_context *ctx, GLbitfield mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.h b/src/mesa/drivers/dri/r200/r200_ioctl.h
index c5dca89bc76..f2527189aa8 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.h
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.h
@@ -54,7 +54,7 @@ extern void r200EmitVbufPrim( r200ContextPtr rmesa,
GLuint primitive,
GLuint vertex_nr );
-extern void r200FlushElts(GLcontext *ctx);
+extern void r200FlushElts(struct gl_context *ctx);
extern GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
GLuint primitive,
diff --git a/src/mesa/drivers/dri/r200/r200_maos.h b/src/mesa/drivers/dri/r200/r200_maos.h
index 16a70475e18..f58f77d8db8 100644
--- a/src/mesa/drivers/dri/r200/r200_maos.h
+++ b/src/mesa/drivers/dri/r200/r200_maos.h
@@ -37,6 +37,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_context.h"
-extern void r200EmitArrays( GLcontext *ctx, GLubyte *vimap_rev );
+extern void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev );
#endif
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index aecba7f8949..8a047e6419b 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -70,7 +70,7 @@ do { \
} while (0)
#endif
-static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
+static void r200_emit_vecfog(struct gl_context *ctx, struct radeon_aos *aos,
GLvoid *data, int stride, int count)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
@@ -103,7 +103,7 @@ static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
/* Emit any changed arrays to new GART memory, re-emit a packet to
* update the arrays.
*/
-void r200EmitArrays( GLcontext *ctx, GLubyte *vimap_rev )
+void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 29d7bed8b6a..b523edcb5d9 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -63,7 +63,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Alpha blending
*/
-static void r200AlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
+static void r200AlphaFunc( struct gl_context *ctx, GLenum func, GLfloat ref )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
int pp_misc = rmesa->hw.ctx.cmd[CTX_PP_MISC];
@@ -106,7 +106,7 @@ static void r200AlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
rmesa->hw.ctx.cmd[CTX_PP_MISC] = pp_misc;
}
-static void r200BlendColor( GLcontext *ctx, const GLfloat cf[4] )
+static void r200BlendColor( struct gl_context *ctx, const GLfloat cf[4] )
{
GLubyte color[4];
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -199,7 +199,7 @@ static int blend_factor( GLenum factor, GLboolean is_src )
* and GL_FUNC_REVERSE_SUBTRACT will cause wrong results otherwise for
* unknown reasons.
*/
-static void r200_set_blend_state( GLcontext * ctx )
+static void r200_set_blend_state( struct gl_context * ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint cntl = rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &
@@ -323,13 +323,13 @@ static void r200_set_blend_state( GLcontext * ctx )
}
-static void r200BlendEquationSeparate( GLcontext *ctx,
+static void r200BlendEquationSeparate( struct gl_context *ctx,
GLenum modeRGB, GLenum modeA )
{
r200_set_blend_state( ctx );
}
-static void r200BlendFuncSeparate( GLcontext *ctx,
+static void r200BlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -341,7 +341,7 @@ static void r200BlendFuncSeparate( GLcontext *ctx,
* Depth testing
*/
-static void r200DepthFunc( GLcontext *ctx, GLenum func )
+static void r200DepthFunc( struct gl_context *ctx, GLenum func )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -376,7 +376,7 @@ static void r200DepthFunc( GLcontext *ctx, GLenum func )
}
}
-static void r200ClearDepth( GLcontext *ctx, GLclampd d )
+static void r200ClearDepth( struct gl_context *ctx, GLclampd d )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint format = (rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &
@@ -392,7 +392,7 @@ static void r200ClearDepth( GLcontext *ctx, GLclampd d )
}
}
-static void r200DepthMask( GLcontext *ctx, GLboolean flag )
+static void r200DepthMask( struct gl_context *ctx, GLboolean flag )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
R200_STATECHANGE( rmesa, ctx );
@@ -410,7 +410,7 @@ static void r200DepthMask( GLcontext *ctx, GLboolean flag )
*/
-static void r200Fogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
+static void r200Fogfv( struct gl_context *ctx, GLenum pname, const GLfloat *param )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
union { int i; float f; } c, d;
@@ -526,7 +526,7 @@ static void r200Fogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
* Culling
*/
-static void r200CullFace( GLcontext *ctx, GLenum unused )
+static void r200CullFace( struct gl_context *ctx, GLenum unused )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL];
@@ -563,7 +563,7 @@ static void r200CullFace( GLcontext *ctx, GLenum unused )
}
}
-static void r200FrontFace( GLcontext *ctx, GLenum mode )
+static void r200FrontFace( struct gl_context *ctx, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -591,7 +591,7 @@ static void r200FrontFace( GLcontext *ctx, GLenum mode )
/* =============================================================
* Point state
*/
-static void r200PointSize( GLcontext *ctx, GLfloat size )
+static void r200PointSize( struct gl_context *ctx, GLfloat size )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLfloat *fcmd = (GLfloat *)rmesa->hw.ptp.cmd;
@@ -612,7 +612,7 @@ static void r200PointSize( GLcontext *ctx, GLfloat size )
fcmd[PTP_VPORT_SCALE_PTSIZE] = ctx->Point.Size;
}
-static void r200PointParameter( GLcontext *ctx, GLenum pname, const GLfloat *params)
+static void r200PointParameter( struct gl_context *ctx, GLenum pname, const GLfloat *params)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLfloat *fcmd = (GLfloat *)rmesa->hw.ptp.cmd;
@@ -680,7 +680,7 @@ static void r200PointParameter( GLcontext *ctx, GLenum pname, const GLfloat *par
/* =============================================================
* Line state
*/
-static void r200LineWidth( GLcontext *ctx, GLfloat widthf )
+static void r200LineWidth( struct gl_context *ctx, GLfloat widthf )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -701,7 +701,7 @@ static void r200LineWidth( GLcontext *ctx, GLfloat widthf )
}
}
-static void r200LineStipple( GLcontext *ctx, GLint factor, GLushort pattern )
+static void r200LineStipple( struct gl_context *ctx, GLint factor, GLushort pattern )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -714,7 +714,7 @@ static void r200LineStipple( GLcontext *ctx, GLint factor, GLushort pattern )
/* =============================================================
* Masks
*/
-static void r200ColorMask( GLcontext *ctx,
+static void r200ColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -752,7 +752,7 @@ static void r200ColorMask( GLcontext *ctx,
* Polygon state
*/
-static void r200PolygonOffset( GLcontext *ctx,
+static void r200PolygonOffset( struct gl_context *ctx,
GLfloat factor, GLfloat units )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -770,7 +770,7 @@ static void r200PolygonOffset( GLcontext *ctx,
rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = constant.ui32;
}
-static void r200PolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
+static void r200PolygonMode( struct gl_context *ctx, GLenum face, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean flag = (ctx->_TriangleCaps & DD_TRI_UNFILLED) != 0;
@@ -797,7 +797,7 @@ static void r200PolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
/* Examine lighting and texture state to determine if separate specular
* should be enabled.
*/
-static void r200UpdateSpecular( GLcontext *ctx )
+static void r200UpdateSpecular( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
uint32_t p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
@@ -871,7 +871,7 @@ static void r200UpdateSpecular( GLcontext *ctx )
/* Update on colormaterial, material emmissive/ambient,
* lightmodel.globalambient
*/
-static void update_global_ambient( GLcontext *ctx )
+static void update_global_ambient( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
float *fcmd = (float *)R200_DB_STATE( glt );
@@ -902,7 +902,7 @@ static void update_global_ambient( GLcontext *ctx )
* - light[p].colors
* - light[p].enabled
*/
-static void update_light_colors( GLcontext *ctx, GLuint p )
+static void update_light_colors( struct gl_context *ctx, GLuint p )
{
struct gl_light *l = &ctx->Light.Light[p];
@@ -920,7 +920,7 @@ static void update_light_colors( GLcontext *ctx, GLuint p )
}
}
-static void r200ColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
+static void r200ColorMaterial( struct gl_context *ctx, GLenum face, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint light_model_ctl1 = rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1];
@@ -1022,7 +1022,7 @@ static void r200ColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
}
-void r200UpdateMaterial( GLcontext *ctx )
+void r200UpdateMaterial( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
@@ -1117,7 +1117,7 @@ void r200UpdateMaterial( GLcontext *ctx )
* lighting space (model or eye), hence dependencies on _NEW_MODELVIEW
* and _MESA_NEW_NEED_EYE_COORDS.
*/
-static void update_light( GLcontext *ctx )
+static void update_light( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1177,7 +1177,7 @@ static void update_light( GLcontext *ctx )
}
}
-static void r200Lightfv( GLcontext *ctx, GLenum light,
+static void r200Lightfv( struct gl_context *ctx, GLenum light,
GLenum pname, const GLfloat *params )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1288,7 +1288,7 @@ static void r200Lightfv( GLcontext *ctx, GLenum light,
}
}
-static void r200UpdateLocalViewer ( GLcontext *ctx )
+static void r200UpdateLocalViewer ( struct gl_context *ctx )
{
/* It looks like for the texgen modes GL_SPHERE_MAP, GL_NORMAL_MAP and
GL_REFLECTION_MAP we need R200_LOCAL_VIEWER set (fglrx does exactly that
@@ -1308,7 +1308,7 @@ static void r200UpdateLocalViewer ( GLcontext *ctx )
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_LOCAL_VIEWER;
}
-static void r200LightModelfv( GLcontext *ctx, GLenum pname,
+static void r200LightModelfv( struct gl_context *ctx, GLenum pname,
const GLfloat *param )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1343,7 +1343,7 @@ static void r200LightModelfv( GLcontext *ctx, GLenum pname,
}
}
-static void r200ShadeModel( GLcontext *ctx, GLenum mode )
+static void r200ShadeModel( struct gl_context *ctx, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL];
@@ -1384,7 +1384,7 @@ static void r200ShadeModel( GLcontext *ctx, GLenum mode )
* User clip planes
*/
-static void r200ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
+static void r200ClipPlane( struct gl_context *ctx, GLenum plane, const GLfloat *eq )
{
GLint p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1397,7 +1397,7 @@ static void r200ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
rmesa->hw.ucp[p].cmd[UCP_W] = ip[3];
}
-static void r200UpdateClipPlanes( GLcontext *ctx )
+static void r200UpdateClipPlanes( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint p;
@@ -1421,7 +1421,7 @@ static void r200UpdateClipPlanes( GLcontext *ctx )
*/
static void
-r200StencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
+r200StencilFuncSeparate( struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1466,7 +1466,7 @@ r200StencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
}
static void
-r200StencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
+r200StencilMaskSeparate( struct gl_context *ctx, GLenum face, GLuint mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1477,7 +1477,7 @@ r200StencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
}
static void
-r200StencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
+r200StencilOpSeparate( struct gl_context *ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1569,7 +1569,7 @@ r200StencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
}
}
-static void r200ClearStencil( GLcontext *ctx, GLint s )
+static void r200ClearStencil( struct gl_context *ctx, GLint s )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1588,7 +1588,7 @@ static void r200ClearStencil( GLcontext *ctx, GLint s )
* Called when window size or position changes or viewport or depth range
* state is changed. We update the hardware viewport state here.
*/
-void r200UpdateWindow( GLcontext *ctx )
+void r200UpdateWindow( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1624,7 +1624,7 @@ void r200UpdateWindow( GLcontext *ctx )
rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZOFFSET] = tz.ui32;
}
-void r200_vtbl_update_scissor( GLcontext *ctx )
+void r200_vtbl_update_scissor( struct gl_context *ctx )
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
unsigned x1, y1, x2, y2;
@@ -1650,7 +1650,7 @@ void r200_vtbl_update_scissor( GLcontext *ctx )
}
-static void r200Viewport( GLcontext *ctx, GLint x, GLint y,
+static void r200Viewport( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height )
{
/* Don't pipeline viewport changes, conflict with window offset
@@ -1662,13 +1662,13 @@ static void r200Viewport( GLcontext *ctx, GLint x, GLint y,
radeon_viewport(ctx, x, y, width, height);
}
-static void r200DepthRange( GLcontext *ctx, GLclampd nearval,
+static void r200DepthRange( struct gl_context *ctx, GLclampd nearval,
GLclampd farval )
{
r200UpdateWindow( ctx );
}
-void r200UpdateViewportOffset( GLcontext *ctx )
+void r200UpdateViewportOffset( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1724,7 +1724,7 @@ void r200UpdateViewportOffset( GLcontext *ctx )
* Miscellaneous
*/
-static void r200ClearColor( GLcontext *ctx, const GLfloat c[4] )
+static void r200ClearColor( struct gl_context *ctx, const GLfloat c[4] )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLubyte color[4];
@@ -1743,7 +1743,7 @@ static void r200ClearColor( GLcontext *ctx, const GLfloat c[4] )
}
-static void r200RenderMode( GLcontext *ctx, GLenum mode )
+static void r200RenderMode( struct gl_context *ctx, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
FALLBACK( rmesa, R200_FALLBACK_RENDER_MODE, (mode != GL_RENDER) );
@@ -1769,7 +1769,7 @@ static GLuint r200_rop_tab[] = {
R200_ROP_SET,
};
-static void r200LogicOpCode( GLcontext *ctx, GLenum opcode )
+static void r200LogicOpCode( struct gl_context *ctx, GLenum opcode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint rop = (GLuint)opcode - GL_CLEAR;
@@ -1784,7 +1784,7 @@ static void r200LogicOpCode( GLcontext *ctx, GLenum opcode )
* State enable/disable
*/
-static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
+static void r200Enable( struct gl_context *ctx, GLenum cap, GLboolean state )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint p, flag;
@@ -2168,7 +2168,7 @@ static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
}
-void r200LightingSpaceChange( GLcontext *ctx )
+void r200LightingSpaceChange( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean tmp;
@@ -2225,7 +2225,7 @@ static void upload_matrix_t( r200ContextPtr rmesa, const GLfloat *src, int idx )
}
-static void update_texturematrix( GLcontext *ctx )
+static void update_texturematrix( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
GLuint tpc = rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0];
@@ -2283,7 +2283,7 @@ static void update_texturematrix( GLcontext *ctx )
}
}
-static GLboolean r200ValidateBuffers(GLcontext *ctx)
+static GLboolean r200ValidateBuffers(struct gl_context *ctx)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
@@ -2333,7 +2333,7 @@ static GLboolean r200ValidateBuffers(GLcontext *ctx)
return GL_TRUE;
}
-GLboolean r200ValidateState( GLcontext *ctx )
+GLboolean r200ValidateState( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint new_state = rmesa->radeon.NewGLState;
@@ -2405,7 +2405,7 @@ GLboolean r200ValidateState( GLcontext *ctx )
}
-static void r200InvalidateState( GLcontext *ctx, GLuint new_state )
+static void r200InvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -2420,7 +2420,7 @@ static void r200InvalidateState( GLcontext *ctx, GLuint new_state )
* Should map to inputs just like the generic vertex arrays for vertex progs.
* In theory there could still be too many and we'd still need a fallback.
*/
-static GLboolean check_material( GLcontext *ctx )
+static GLboolean check_material( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLint i;
@@ -2435,7 +2435,7 @@ static GLboolean check_material( GLcontext *ctx )
return GL_FALSE;
}
-static void r200WrapRunPipeline( GLcontext *ctx )
+static void r200WrapRunPipeline( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean has_material;
@@ -2465,7 +2465,7 @@ static void r200WrapRunPipeline( GLcontext *ctx )
}
-static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void r200PolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
GLint i;
@@ -2538,7 +2538,7 @@ void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *func
}
-void r200InitTnlFuncs( GLcontext *ctx )
+void r200InitTnlFuncs( struct gl_context *ctx )
{
TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange = r200UpdateMaterial;
TNL_CONTEXT(ctx)->Driver.RunPipeline = r200WrapRunPipeline;
diff --git a/src/mesa/drivers/dri/r200/r200_state.h b/src/mesa/drivers/dri/r200/r200_state.h
index 327ba837e25..340bd8234ac 100644
--- a/src/mesa/drivers/dri/r200/r200_state.h
+++ b/src/mesa/drivers/dri/r200/r200_state.h
@@ -39,25 +39,25 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
extern void r200InitState( r200ContextPtr rmesa );
extern void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *functions );
-extern void r200InitTnlFuncs( GLcontext *ctx );
+extern void r200InitTnlFuncs( struct gl_context *ctx );
-extern void r200UpdateMaterial( GLcontext *ctx );
+extern void r200UpdateMaterial( struct gl_context *ctx );
-extern void r200UpdateViewportOffset( GLcontext *ctx );
-extern void r200UpdateWindow( GLcontext *ctx );
-extern void r200UpdateDrawBuffer(GLcontext *ctx);
+extern void r200UpdateViewportOffset( struct gl_context *ctx );
+extern void r200UpdateWindow( struct gl_context *ctx );
+extern void r200UpdateDrawBuffer(struct gl_context *ctx);
-extern GLboolean r200ValidateState( GLcontext *ctx );
+extern GLboolean r200ValidateState( struct gl_context *ctx );
-extern void r200_vtbl_update_scissor( GLcontext *ctx );
+extern void r200_vtbl_update_scissor( struct gl_context *ctx );
-extern void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void r200Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( rmesa, bit, mode ) do { \
if ( 0 ) fprintf( stderr, "FALLBACK in %s: #%d=%d\n", \
__FUNCTION__, bit, mode ); \
r200Fallback( rmesa->radeon.glCtx, bit, mode ); \
} while (0)
-extern void r200LightingSpaceChange( GLcontext *ctx );
+extern void r200LightingSpaceChange( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 16065530093..f6afb90d595 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -228,7 +228,7 @@ static int cmdscl2( int offset, int stride, int count )
* If it is active check function returns maximum emit size.
*/
#define CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
(void) rmesa; \
@@ -236,21 +236,21 @@ static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom) \
}
#define TCL_CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
return (!rmesa->radeon.TclFallback && !ctx->VertexProgram._Enabled && (FLAG)) ? atom->cmd_size + (ADD) : 0; \
}
#define TCL_OR_VP_CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom ) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom ) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
return (!rmesa->radeon.TclFallback && (FLAG)) ? atom->cmd_size + (ADD) : 0; \
}
#define VP_CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom ) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom ) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
(void) atom; \
@@ -337,7 +337,7 @@ VP_CHECK( tcl_vpp_size_add4, ctx->VertexProgram.Current->Base.NumNativeParameter
OUT_BATCH(CP_PACKET0_ONE(R200_SE_TCL_SCALAR_DATA_REG, h.scalars.count - 1)); \
OUT_BATCH_TABLE((data), h.scalars.count); \
} while(0)
-static int check_rrb(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_rrb(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
@@ -347,7 +347,7 @@ static int check_rrb(GLcontext *ctx, struct radeon_state_atom *atom)
return atom->cmd_size;
}
-static int check_polygon_stipple(GLcontext *ctx,
+static int check_polygon_stipple(struct gl_context *ctx,
struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
@@ -356,7 +356,7 @@ static int check_polygon_stipple(GLcontext *ctx,
return 0;
}
-static void mtl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void mtl_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -368,7 +368,7 @@ static void mtl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void lit_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void lit_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -380,7 +380,7 @@ static void lit_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void ptp_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ptp_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -392,7 +392,7 @@ static void ptp_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void veclinear_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void veclinear_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -401,7 +401,7 @@ static void veclinear_emit(GLcontext *ctx, struct radeon_state_atom *atom)
OUT_VECLINEAR(atom->cmd[0], atom->cmd+1);
}
-static void scl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void scl_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -413,7 +413,7 @@ static void scl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void vec_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void vec_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -424,7 +424,7 @@ static void vec_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void ctx_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ctx_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -491,7 +491,7 @@ static void ctx_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static int check_always_ctx( GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_always_ctx( struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
struct radeon_renderbuffer *rrb, *drb;
@@ -516,7 +516,7 @@ static int check_always_ctx( GLcontext *ctx, struct radeon_state_atom *atom)
return dwords;
}
-static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -600,7 +600,7 @@ static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static int get_tex_size(GLcontext* ctx, struct radeon_state_atom *atom)
+static int get_tex_size(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
uint32_t dwords = atom->cmd_size + 2;
@@ -612,7 +612,7 @@ static int get_tex_size(GLcontext* ctx, struct radeon_state_atom *atom)
return dwords;
}
-static int check_tex_pair(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex_pair(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
/** XOR is bit flip operation so use it for finding pair */
@@ -622,7 +622,7 @@ static int check_tex_pair(GLcontext* ctx, struct radeon_state_atom *atom)
return get_tex_size(ctx, atom);
}
-static int check_tex(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
if (!(r200->state.texture.unit[atom->idx].unitneeded))
@@ -632,7 +632,7 @@ static int check_tex(GLcontext* ctx, struct radeon_state_atom *atom)
}
-static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void tex_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -657,7 +657,7 @@ static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static int get_tex_mm_size(GLcontext* ctx, struct radeon_state_atom *atom)
+static int get_tex_mm_size(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
uint32_t dwords = atom->cmd_size + 2;
@@ -676,7 +676,7 @@ static int get_tex_mm_size(GLcontext* ctx, struct radeon_state_atom *atom)
return dwords;
}
-static int check_tex_pair_mm(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex_pair_mm(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
/** XOR is bit flip operation so use it for finding pair */
@@ -686,7 +686,7 @@ static int check_tex_pair_mm(GLcontext* ctx, struct radeon_state_atom *atom)
return get_tex_mm_size(ctx, atom);
}
-static int check_tex_mm(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex_mm(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
if (!(r200->state.texture.unit[atom->idx].unitneeded))
@@ -696,7 +696,7 @@ static int check_tex_mm(GLcontext* ctx, struct radeon_state_atom *atom)
}
-static void tex_emit_mm(GLcontext *ctx, struct radeon_state_atom *atom)
+static void tex_emit_mm(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -726,7 +726,7 @@ static void tex_emit_mm(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void cube_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void cube_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -753,7 +753,7 @@ static void cube_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
+static void cube_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -782,7 +782,7 @@ static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
*/
void r200InitState( r200ContextPtr rmesa )
{
- GLcontext *ctx = rmesa->radeon.glCtx;
+ struct gl_context *ctx = rmesa->radeon.glCtx;
GLuint i;
rmesa->radeon.state.color.clear = 0x00000000;
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index effe6fb933a..38864162ced 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -75,7 +75,7 @@ do { \
rmesa->radeon.swtcl.vertex_attr_count++; \
} while (0)
-static void r200SetVertexFormat( GLcontext *ctx )
+static void r200SetVertexFormat( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -221,7 +221,7 @@ static void r200_predict_emit_size( r200ContextPtr rmesa )
}
-static void r200RenderStart( GLcontext *ctx )
+static void r200RenderStart( struct gl_context *ctx )
{
r200SetVertexFormat( ctx );
if (RADEON_DEBUG & RADEON_VERTS)
@@ -234,7 +234,7 @@ static void r200RenderStart( GLcontext *ctx )
* determine in advance whether or not the hardware can / should do the
* projection divide or Mesa should do it.
*/
-void r200ChooseVertexState( GLcontext *ctx )
+void r200ChooseVertexState( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -286,7 +286,7 @@ void r200ChooseVertexState( GLcontext *ctx )
}
}
-void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
+void r200_swtcl_flush(struct gl_context *ctx, uint32_t current_offset)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
if (RADEON_DEBUG & RADEON_VERTS)
@@ -315,7 +315,7 @@ void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
/**************************************************************************/
-static INLINE GLuint reduced_hw_prim( GLcontext *ctx, GLuint prim)
+static INLINE GLuint reduced_hw_prim( struct gl_context *ctx, GLuint prim)
{
switch (prim) {
case GL_POINTS:
@@ -336,9 +336,9 @@ static INLINE GLuint reduced_hw_prim( GLcontext *ctx, GLuint prim)
}
-static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim );
-static void r200RenderPrimitive( GLcontext *ctx, GLenum prim );
-static void r200ResetLineStipple( GLcontext *ctx );
+static void r200RasterPrimitive( struct gl_context *ctx, GLuint hwprim );
+static void r200RenderPrimitive( struct gl_context *ctx, GLenum prim );
+static void r200ResetLineStipple( struct gl_context *ctx );
/***********************************************************************
* Emit primitives as inline vertices *
@@ -568,7 +568,7 @@ static void init_rast_tab( void )
/* Choose render functions */
/**********************************************************************/
-void r200ChooseRenderState( GLcontext *ctx )
+void r200ChooseRenderState( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -608,7 +608,7 @@ void r200ChooseRenderState( GLcontext *ctx )
/**********************************************************************/
-static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim )
+static void r200RasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -634,7 +634,7 @@ static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim )
}
}
-static void r200RenderPrimitive( GLcontext *ctx, GLenum prim )
+static void r200RenderPrimitive( struct gl_context *ctx, GLenum prim )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
rmesa->radeon.swtcl.render_primitive = prim;
@@ -642,11 +642,11 @@ static void r200RenderPrimitive( GLcontext *ctx, GLenum prim )
r200RasterPrimitive( ctx, reduced_hw_prim(ctx, prim) );
}
-static void r200RenderFinish( GLcontext *ctx )
+static void r200RenderFinish( struct gl_context *ctx )
{
}
-static void r200ResetLineStipple( GLcontext *ctx )
+static void r200ResetLineStipple( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
R200_STATECHANGE( rmesa, lin );
@@ -678,7 +678,7 @@ static const char *getFallbackString(GLuint bit)
}
-void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void r200Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -745,7 +745,7 @@ void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
* NV_texture_rectangle).
*/
void
-r200PointsBitmap( GLcontext *ctx, GLint px, GLint py,
+r200PointsBitmap( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
@@ -920,7 +920,7 @@ r200PointsBitmap( GLcontext *ctx, GLint px, GLint py,
/* Initialization. */
/**********************************************************************/
-void r200InitSwtcl( GLcontext *ctx )
+void r200InitSwtcl( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r200ContextPtr rmesa = R200_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.h b/src/mesa/drivers/dri/r200/r200_swtcl.h
index b0905879d7a..668e175603f 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.h
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.h
@@ -38,32 +38,32 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "swrast/swrast.h"
#include "r200_context.h"
-extern void r200InitSwtcl( GLcontext *ctx );
+extern void r200InitSwtcl( struct gl_context *ctx );
-extern void r200ChooseRenderState( GLcontext *ctx );
-extern void r200ChooseVertexState( GLcontext *ctx );
+extern void r200ChooseRenderState( struct gl_context *ctx );
+extern void r200ChooseVertexState( struct gl_context *ctx );
-extern void r200CheckTexSizes( GLcontext *ctx );
+extern void r200CheckTexSizes( struct gl_context *ctx );
-extern void r200BuildVertices( GLcontext *ctx, GLuint start, GLuint count,
+extern void r200BuildVertices( struct gl_context *ctx, GLuint start, GLuint count,
GLuint newinputs );
extern void r200PrintSetupFlags(char *msg, GLuint flags );
-extern void r200_translate_vertex( GLcontext *ctx,
+extern void r200_translate_vertex( struct gl_context *ctx,
const radeonVertex *src,
SWvertex *dst );
-extern void r200_print_vertex( GLcontext *ctx, const radeonVertex *v );
+extern void r200_print_vertex( struct gl_context *ctx, const radeonVertex *v );
-extern void r200_import_float_colors( GLcontext *ctx );
-extern void r200_import_float_spec_colors( GLcontext *ctx );
+extern void r200_import_float_colors( struct gl_context *ctx );
+extern void r200_import_float_spec_colors( struct gl_context *ctx );
-extern void r200PointsBitmap( GLcontext *ctx, GLint px, GLint py,
+extern void r200PointsBitmap( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap );
-void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset);
+void r200_swtcl_flush(struct gl_context *ctx, uint32_t current_offset);
#endif
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index ba54177476f..84db7c9d4eb 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -177,7 +177,7 @@ while (0)
* discrete and there are no intervening state changes. (Somewhat
* duplicates changes to DrawArrays code)
*/
-static void r200EmitPrim( GLcontext *ctx,
+static void r200EmitPrim( struct gl_context *ctx,
GLenum prim,
GLuint hwprim,
GLuint start,
@@ -241,7 +241,7 @@ static void r200EmitPrim( GLcontext *ctx,
/* External entrypoints */
/**********************************************************************/
-void r200EmitPrimitive( GLcontext *ctx,
+void r200EmitPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -249,7 +249,7 @@ void r200EmitPrimitive( GLcontext *ctx,
tcl_render_tab_verts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void r200EmitEltPrimitive( GLcontext *ctx,
+void r200EmitEltPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -257,7 +257,7 @@ void r200EmitEltPrimitive( GLcontext *ctx,
tcl_render_tab_elts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void r200TclPrimitive( GLcontext *ctx,
+void r200TclPrimitive( struct gl_context *ctx,
GLenum prim,
int hw_prim )
{
@@ -339,7 +339,7 @@ r200InitStaticFogData( void )
* Fog blend factors are in the range [0,1].
*/
float
-r200ComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord )
+r200ComputeFogBlendFactor( struct gl_context *ctx, GLfloat fogcoord )
{
GLfloat end = ctx->Fog.End;
GLfloat d, temp;
@@ -374,7 +374,7 @@ r200ComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord )
* Predict total emit size for next rendering operation so there is no flush in middle of rendering
* Prediction has to aim towards the best possible value that is worse than worst case scenario
*/
-static GLuint r200EnsureEmitSize( GLcontext * ctx , GLubyte* vimap_rev )
+static GLuint r200EnsureEmitSize( struct gl_context * ctx , GLubyte* vimap_rev )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -439,7 +439,7 @@ static GLuint r200EnsureEmitSize( GLcontext * ctx , GLubyte* vimap_rev )
/* TCL render.
*/
-static GLboolean r200_run_tcl_render( GLcontext *ctx,
+static GLboolean r200_run_tcl_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -596,7 +596,7 @@ const struct tnl_pipeline_stage _r200_tcl_stage =
*/
-static void transition_to_swtnl( GLcontext *ctx )
+static void transition_to_swtnl( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -620,7 +620,7 @@ static void transition_to_swtnl( GLcontext *ctx )
rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] &= ~(R200_VAP_TCL_ENABLE|R200_VAP_PROG_VTX_SHADER_ENABLE);
}
-static void transition_to_hwtnl( GLcontext *ctx )
+static void transition_to_hwtnl( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -690,7 +690,7 @@ static char *getFallbackString(GLuint bit)
-void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void r200TclFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint oldfallback = rmesa->radeon.TclFallback;
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.h b/src/mesa/drivers/dri/r200/r200_tcl.h
index f191ddc7eb9..53a1f11e9db 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.h
+++ b/src/mesa/drivers/dri/r200/r200_tcl.h
@@ -37,17 +37,17 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_context.h"
-extern void r200TclPrimitive( GLcontext *ctx, GLenum prim, int hw_prim );
-extern void r200EmitEltPrimitive( GLcontext *ctx, GLuint first, GLuint last,
+extern void r200TclPrimitive( struct gl_context *ctx, GLenum prim, int hw_prim );
+extern void r200EmitEltPrimitive( struct gl_context *ctx, GLuint first, GLuint last,
GLuint flags );
-extern void r200EmitPrimitive( GLcontext *ctx, GLuint first, GLuint last,
+extern void r200EmitPrimitive( struct gl_context *ctx, GLuint first, GLuint last,
GLuint flags );
-extern void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void r200TclFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
extern void r200InitStaticFogData( void );
-extern float r200ComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord );
+extern float r200ComputeFogBlendFactor( struct gl_context *ctx, GLfloat fogcoord );
#define R200_TCL_FALLBACK_RASTER 0x1 /* rasterization */
#define R200_TCL_FALLBACK_UNFILLED 0x2 /* unfilled tris */
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 6723b12bf49..5207c2901a3 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -294,7 +294,7 @@ static void r200SetTexBorderColor( radeonTexObjPtr t, const GLfloat color[4] )
t->pp_border_color = radeonPackColor( 4, c[0], c[1], c[2], c[3] );
}
-static void r200TexEnv( GLcontext *ctx, GLenum target,
+static void r200TexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -366,7 +366,7 @@ static void r200TexEnv( GLcontext *ctx, GLenum target,
* next UpdateTextureState
*/
-static void r200TexParameter( GLcontext *ctx, GLenum target,
+static void r200TexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params )
{
@@ -409,7 +409,7 @@ static void r200TexParameter( GLcontext *ctx, GLenum target,
}
-static void r200DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
+static void r200DeleteTexture(struct gl_context * ctx, struct gl_texture_object *texObj)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
@@ -446,7 +446,7 @@ static void r200DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
* Basically impossible to do this on the fly - just collect some
* basic info & do the checks from ValidateState().
*/
-static void r200TexGen( GLcontext *ctx,
+static void r200TexGen( struct gl_context *ctx,
GLenum coord,
GLenum pname,
const GLfloat *params )
@@ -464,7 +464,7 @@ static void r200TexGen( GLcontext *ctx,
* allocate the default texture objects.
* Fixup MaxAnisotropy according to user preference.
*/
-static struct gl_texture_object *r200NewTextureObject(GLcontext * ctx,
+static struct gl_texture_object *r200NewTextureObject(struct gl_context * ctx,
GLuint name,
GLenum target)
{
diff --git a/src/mesa/drivers/dri/r200/r200_tex.h b/src/mesa/drivers/dri/r200/r200_tex.h
index 1a1e7038df6..8bebf8a037b 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.h
+++ b/src/mesa/drivers/dri/r200/r200_tex.h
@@ -42,7 +42,7 @@ extern void r200SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
unsigned long long offset, GLint depth,
GLuint pitch);
-extern void r200UpdateTextureState( GLcontext *ctx );
+extern void r200UpdateTextureState( struct gl_context *ctx );
extern int r200UploadTexImages( r200ContextPtr rmesa, radeonTexObjPtr t, GLuint face );
@@ -50,8 +50,8 @@ extern void r200DestroyTexObj( r200ContextPtr rmesa, radeonTexObjPtr t );
extern void r200InitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *functions );
-extern void r200UpdateFragmentShader( GLcontext *ctx );
+extern void r200UpdateFragmentShader( struct gl_context *ctx );
-extern void set_re_cntl_d3d( GLcontext *ctx, int unit, GLboolean use_d3d );
+extern void set_re_cntl_d3d( struct gl_context *ctx, int unit, GLboolean use_d3d );
#endif /* __R200_TEX_H__ */
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 9ccf30c3ac9..690bec640bd 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -302,7 +302,7 @@ do { \
* Texture unit state management
*/
-static GLboolean r200UpdateTextureEnv( GLcontext *ctx, int unit, int slot, GLuint replaceargs )
+static GLboolean r200UpdateTextureEnv( struct gl_context *ctx, int unit, int slot, GLuint replaceargs )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -869,7 +869,7 @@ void r200SetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
#define REF_COLOR 1
#define REF_ALPHA 2
-static GLboolean r200UpdateAllTexEnv( GLcontext *ctx )
+static GLboolean r200UpdateAllTexEnv( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLint i, j, currslot;
@@ -1203,7 +1203,7 @@ static GLuint r200_need_dis_texgen(const GLbitfield texGenEnabled,
/*
* Returns GL_FALSE if fallback required.
*/
-static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
+static GLboolean r200_validate_texgen( struct gl_context *ctx, GLuint unit )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -1385,7 +1385,7 @@ static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
return GL_TRUE;
}
-void set_re_cntl_d3d( GLcontext *ctx, int unit, GLboolean use_d3d )
+void set_re_cntl_d3d( struct gl_context *ctx, int unit, GLboolean use_d3d )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1521,7 +1521,7 @@ static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
}
-static GLboolean r200_validate_texture(GLcontext *ctx, struct gl_texture_object *texObj, int unit)
+static GLboolean r200_validate_texture(struct gl_context *ctx, struct gl_texture_object *texObj, int unit)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -1564,7 +1564,7 @@ static GLboolean r200_validate_texture(GLcontext *ctx, struct gl_texture_object
return !t->border_fallback;
}
-static GLboolean r200UpdateTextureUnit(GLcontext *ctx, int unit)
+static GLboolean r200UpdateTextureUnit(struct gl_context *ctx, int unit)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint unitneeded = rmesa->state.texture.unit[unit].unitneeded;
@@ -1588,7 +1588,7 @@ static GLboolean r200UpdateTextureUnit(GLcontext *ctx, int unit)
}
-void r200UpdateTextureState( GLcontext *ctx )
+void r200UpdateTextureState( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean ok;
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c
index 5d268319f3f..5d69012a81f 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.c
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.c
@@ -100,7 +100,7 @@ static struct{
};
#undef OPN
-static GLboolean r200VertexProgUpdateParams(GLcontext *ctx, struct r200_vertex_program *vp)
+static GLboolean r200VertexProgUpdateParams(struct gl_context *ctx, struct r200_vertex_program *vp)
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
GLfloat *fcmd = (GLfloat *)&rmesa->hw.vpp[0].cmd[VPP_CMD_0 + 1];
@@ -396,7 +396,7 @@ static unsigned long op_operands(enum prog_opcode opcode)
*
* \return GL_TRUE for success, GL_FALSE for failure.
*/
-static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_vertex_program *vp)
+static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r200_vertex_program *vp)
{
struct gl_vertex_program *mesa_vp = &vp->mesa_program;
struct prog_instruction *vpi;
@@ -1098,7 +1098,7 @@ else {
return GL_TRUE;
}
-void r200SetupVertexProg( GLcontext *ctx ) {
+void r200SetupVertexProg( struct gl_context *ctx ) {
r200ContextPtr rmesa = R200_CONTEXT(ctx);
struct r200_vertex_program *vp = (struct r200_vertex_program *)ctx->VertexProgram.Current;
GLboolean fallback;
@@ -1179,7 +1179,7 @@ void r200SetupVertexProg( GLcontext *ctx ) {
static void
-r200BindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog)
+r200BindProgram(struct gl_context *ctx, GLenum target, struct gl_program *prog)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1194,7 +1194,7 @@ r200BindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog)
}
static struct gl_program *
-r200NewProgram(GLcontext *ctx, GLenum target, GLuint id)
+r200NewProgram(struct gl_context *ctx, GLenum target, GLuint id)
{
struct r200_vertex_program *vp;
@@ -1213,13 +1213,13 @@ r200NewProgram(GLcontext *ctx, GLenum target, GLuint id)
static void
-r200DeleteProgram(GLcontext *ctx, struct gl_program *prog)
+r200DeleteProgram(struct gl_context *ctx, struct gl_program *prog)
{
_mesa_delete_program(ctx, prog);
}
static GLboolean
-r200ProgramStringNotify(GLcontext *ctx, GLenum target, struct gl_program *prog)
+r200ProgramStringNotify(struct gl_context *ctx, GLenum target, struct gl_program *prog)
{
struct r200_vertex_program *vp = (void *)prog;
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1244,7 +1244,7 @@ r200ProgramStringNotify(GLcontext *ctx, GLenum target, struct gl_program *prog)
}
static GLboolean
-r200IsProgramNative(GLcontext *ctx, GLenum target, struct gl_program *prog)
+r200IsProgramNative(struct gl_context *ctx, GLenum target, struct gl_program *prog)
{
struct r200_vertex_program *vp = (void *)prog;
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.h b/src/mesa/drivers/dri/r200/r200_vertprog.h
index 938237680ce..4757f4b32bc 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.h
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.h
@@ -11,7 +11,7 @@ typedef struct {
} VERTEX_SHADER_INSTRUCTION;
extern void r200InitShaderFuncs(struct dd_function_table *functions);
-extern void r200SetupVertexProg( GLcontext *ctx );
+extern void r200SetupVertexProg( struct gl_context *ctx );
#define VSF_FLAG_X 1
#define VSF_FLAG_Y 2