aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-01-22 22:49:16 +1000
committerDave Airlie <[email protected]>2009-01-22 22:50:36 +1000
commitf69e2f42d53337702ce52173a58a49e53bfdee56 (patch)
tree68547c3ab8b5e5a4cd7e5717b2a783b2c8eb538e /src/mesa
parentd93dc4338279c03b8fa2b0adec01dedae4fe4895 (diff)
r200: fix up swtcl/tcl flushes
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r200/r200_cmdbuf.c3
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.h4
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c6
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.h9
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c6
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c8
6 files changed, 16 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
index 5768f39e5c1..fb8dddad3fa 100644
--- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
@@ -272,8 +272,9 @@ static void r200FireEB(r200ContextPtr rmesa, int vertex_count, int type)
}
}
-void r200FlushElts( r200ContextPtr rmesa )
+void r200FlushElts(GLcontext *ctx)
{
+ r200ContextPtr rmesa = R200_CONTEXT(ctx);
int dwords;
int nr, elt_used = rmesa->tcl.elt_used;
diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h
index 607997fafc9..62847be522e 100644
--- a/src/mesa/drivers/dri/r200/r200_context.h
+++ b/src/mesa/drivers/dri/r200/r200_context.h
@@ -548,7 +548,7 @@ struct r200_tcl_info {
int elt_dma_offset; /** Offset into this buffer object, in bytes */
int elt_used;
- void (*flush) (r200ContextPtr);
+ void (*flush) (GLcontext *ctx);
struct radeon_dma_region vertex_data[15];
};
@@ -606,7 +606,7 @@ struct r200_swtcl_info {
GLboolean needproj;
struct radeon_bo *bo;
- void (*flush) (r200ContextPtr);
+ void (*flush) (GLcontext *ctx);
};
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index 65786be96cb..744a2d8a4fd 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -277,11 +277,11 @@ void r200Flush( GLcontext *ctx )
if (R200_DEBUG & DEBUG_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
- if (rmesa->dma.flush)
- rmesa->dma.flush( ctx );
+ if (rmesa->swtcl.flush)
+ rmesa->swtcl.flush( ctx );
if (rmesa->tcl.flush)
- rmesa->tcl.flush( rmesa );
+ rmesa->tcl.flush( ctx );
r200EmitState( rmesa );
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.h b/src/mesa/drivers/dri/r200/r200_ioctl.h
index e3f0b66514d..ccc15c5b49d 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.h
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.h
@@ -53,8 +53,7 @@ extern void r200EmitVbufPrim( r200ContextPtr rmesa,
GLuint primitive,
GLuint vertex_nr );
-extern void r200FlushElts(r200ContextPtr rmesa);
-
+extern void r200FlushElts(GLcontext *ctx);
extern GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
GLuint primitive,
@@ -113,8 +112,8 @@ void r200SetUpAtomList( r200ContextPtr rmesa );
*/
#define R200_NEWPRIM( rmesa ) \
do { \
- if ( rmesa->dma.flush ) \
- rmesa->dma.flush( rmesa->radeon.glCtx ); \
+ if ( rmesa->swtcl.flush ) \
+ rmesa->swtcl.flush( rmesa->radeon.glCtx ); \
} while (0)
/* Can accomodate several state changes and primitive changes without
@@ -154,7 +153,7 @@ static INLINE int R200_DB_STATECHANGE(
*/
#define R200_FIREVERTICES( rmesa ) \
do { \
- if ( rmesa->store.cmd_used || rmesa->dma.flush ) { \
+ if ( rmesa->swtcl.flush || rmesa->tcl.flush ) { \
r200Flush( rmesa->radeon.glCtx ); \
} \
} while (0)
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index 7275886f846..663e4ae0bc6 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -210,10 +210,6 @@ static void r200RenderStart( GLcontext *ctx )
r200ContextPtr rmesa = R200_CONTEXT( ctx );
r200SetVertexFormat( ctx );
-
- if (rmesa->dma.flush != 0 &&
- rmesa->dma.flush != flush_last_swtcl_prim)
- rmesa->dma.flush( ctx );
}
@@ -283,7 +279,7 @@ static void flush_last_swtcl_prim(GLcontext *ctx)
if (R200_DEBUG & DEBUG_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
- rmesa->dma.flush = NULL;
+ rmesa->swtcl.flush = NULL;
radeon_bo_unmap(rmesa->swtcl.bo);
rcommonEnsureCmdBufSpace(rmesa,
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index 10c0dacd30e..9562c8b315f 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -155,7 +155,7 @@ static GLushort *r200AllocElts( r200ContextPtr rmesa, GLuint nr )
}
else {
if (rmesa->tcl.flush)
- rmesa->tcl.flush( rmesa );
+ rmesa->tcl.flush( rmesa->radeon.glCtx );
rcommonEnsureCmdBufSpace(rmesa, AOS_BUFSZ(rmesa->tcl.nr_aos_components));
@@ -564,10 +564,10 @@ static void transition_to_hwtnl( GLcontext *ctx )
tnl->Driver.NotifyMaterialChange = r200UpdateMaterial;
- if ( rmesa->dma.flush )
- rmesa->dma.flush( rmesa->radeon.glCtx );
+ if ( rmesa->swtcl.flush )
+ rmesa->swtcl.flush( rmesa->radeon.glCtx );
- rmesa->dma.flush = NULL;
+ rmesa->swtcl.flush = NULL;
R200_STATECHANGE( rmesa, vap );
rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] |= R200_VAP_TCL_ENABLE;