summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-02-04 16:01:41 +1000
committerDave Airlie <[email protected]>2009-02-04 16:01:41 +1000
commit8fe61fc5ba70be29b9d7dbdfab45c5434be587fc (patch)
tree7c69ee57a98d47c083cf43f7a445af74d3802b54 /src/mesa/drivers
parentb584b0728d3a001a142f76dde22f9e8ed7d2dd16 (diff)
radeon/r200 remove more unused code
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.h34
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c15
2 files changed, 7 insertions, 42 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.h b/src/mesa/drivers/dri/r200/r200_ioctl.h
index 3e39a9124d2..30b089658d5 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.h
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.h
@@ -169,40 +169,6 @@ do { \
#define ELTS_BUFSZ(nr) (12 + nr * 2)
#define VBUF_BUFSZ (3 * sizeof(int))
-/* Ensure that a minimum amount of space is available in the command buffer.
- * This is used to ensure atomicity of state updates with the rendering requests
- * that rely on them.
- *
- * An alternative would be to implement a "soft lock" such that when the buffer
- * wraps at an inopportune time, we grab the lock, flush the current buffer,
- * and hang on to the lock until the critical section is finished and we flush
- * the buffer again and unlock.
- */
-#if 0
-static INLINE void r200EnsureCmdBufSpace( r200ContextPtr rmesa, int bytes )
-{
- if (rmesa->store.cmd_used + bytes > R200_CMD_BUF_SZ)
- rcommonFlushCmdBuf( rmesa, __FUNCTION__ );
- assert( bytes <= R200_CMD_BUF_SZ );
-}
-
-/* Alloc space in the command buffer
- */
-static INLINE char *r200AllocCmdBuf( r200ContextPtr rmesa,
- int bytes, const char *where )
-{
- char * head;
-
- if (rmesa->store.cmd_used + bytes > R200_CMD_BUF_SZ)
- r200FlushCmdBuf( rmesa, where );
-
- head = rmesa->store.cmd_buf + rmesa->store.cmd_used;
- rmesa->store.cmd_used += bytes;
- assert( rmesa->store.cmd_used <= R200_CMD_BUF_SZ );
- return head;
-}
-#endif
-
static inline uint32_t cmdpacket3(int cmd_type)
{
drm_radeon_cmd_header_t cmd;
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index a823c79d6cc..94e930a1f44 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -60,8 +60,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define RADEON_IDLE_RETRY 16
-static int radeonFlushCmdBufLocked( r100ContextPtr rmesa,
- const char * caller );
static void print_state_atom( struct radeon_state_atom *state )
{
@@ -123,7 +121,7 @@ static void radeonBackUpAndEmitLostStateLocked( r100ContextPtr rmesa )
saved_store = rmesa->store;
rmesa->radeon.dma.nr_released_bufs = 0;
rmesa->store = rmesa->backup_store;
- radeonFlushCmdBufLocked( rmesa, __FUNCTION__ );
+ rcommonFlushCmdBufLocked( &rmesa->radeon, __FUNCTION__ );
rmesa->radeon.dma.nr_released_bufs = nr_released_bufs;
rmesa->store = saved_store;
}
@@ -310,7 +308,6 @@ GLushort *radeonAllocEltsOpenEnded( r100ContextPtr rmesa,
GLuint primitive,
GLuint min_nr )
{
- drm_radeon_cmd_header_t *cmd;
GLushort *retval;
if (RADEON_DEBUG & DEBUG_IOCTL)
@@ -330,15 +327,15 @@ GLushort *radeonAllocEltsOpenEnded( r100ContextPtr rmesa,
retval = rmesa->tcl.elt_dma_bo->ptr + rmesa->tcl.elt_dma_offset;
if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: header 0x%x vfmt 0x%x prim %x \n",
+ fprintf(stderr, "%s: header vfmt 0x%x prim %x \n",
__FUNCTION__,
- cmd[1].i, vertex_format, primitive);
+ vertex_format, primitive);
assert(!rmesa->radeon.dma.flush);
rmesa->radeon.glCtx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
rmesa->radeon.dma.flush = radeonFlushElts;
- rmesa->store.elts_start = ((char *)cmd) - rmesa->store.cmd_buf;
+ // rmesa->store.elts_start = ((char *)cmd) - rmesa->store.cmd_buf;
return retval;
}
@@ -424,6 +421,8 @@ void radeonEmitAOS( r100ContextPtr rmesa,
#endif
}
+
+
/* using already shifted color_fmt! */
void radeonEmitBlit( r100ContextPtr rmesa, /* FIXME: which drmMinor is required? */
GLuint color_fmt,
@@ -600,7 +599,7 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask )
}
/* Send current state to the hardware */
- radeonFlushCmdBufLocked( rmesa, __FUNCTION__ );
+ rcommonFlushCmdBufLocked( &rmesa->radeon, __FUNCTION__ );
for ( i = 0 ; i < dPriv->numClipRects ; ) {
GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, dPriv->numClipRects );