r200: invalidate texture paths in some more places
[mesa.git] / src / mesa / drivers / dri / r200 / r200_ioctl.h
index ccc15c5b49de421641609258c7df69bcb1472177..6b9e4be30a099c846bf28d7da4b04b7effe4e681 100644 (file)
@@ -43,6 +43,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "drm.h"
 #include "radeon_drm.h"
 
+#include "common_cmdbuf.h"
+
 extern void r200EmitState( r200ContextPtr rmesa );
 extern void r200EmitVertexAOS( r200ContextPtr rmesa,
                               GLuint vertex_size,
@@ -61,32 +63,6 @@ extern GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
 
 extern void r200EmitAOS(r200ContextPtr rmesa, GLuint nr, GLuint offset);
 
-extern void r200EmitBlit( r200ContextPtr rmesa,
-                         GLuint color_fmt,
-                         GLuint src_pitch,
-                         GLuint src_offset,
-                         GLuint dst_pitch,
-                         GLuint dst_offset,
-                         GLint srcx, GLint srcy,
-                         GLint dstx, GLint dsty,
-                         GLuint w, GLuint h );
-
-extern void r200EmitWait( r200ContextPtr rmesa, GLuint flags );
-
-//extern void r200FlushCmdBuf( r200ContextPtr rmesa, const char * );
-//extern int r200FlushCmdBufLocked( r200ContextPtr rmesa, const char * caller );
-
-extern void r200RefillCurrentDmaRegion( r200ContextPtr rmesa );
-
-extern void r200AllocDmaRegion( r200ContextPtr rmesa,
-                                 struct radeon_dma_region *region,
-                                 int bytes, 
-                                 int alignment );
-
-extern void r200ReleaseDmaRegion( r200ContextPtr rmesa,
-                                   struct radeon_dma_region *region,
-                                   const char *caller );
-
 extern void r200Flush( GLcontext *ctx );
 extern void r200Finish( GLcontext *ctx );
 extern void r200InitIoctlFuncs( struct dd_function_table *functions );
@@ -112,8 +88,8 @@ void r200SetUpAtomList( r200ContextPtr rmesa );
  */
 #define R200_NEWPRIM( rmesa )                  \
 do {                                           \
-   if ( rmesa->swtcl.flush )                   \
-      rmesa->swtcl.flush( rmesa->radeon.glCtx );       \
+   if ( rmesa->radeon.dma.flush )                      \
+      rmesa->radeon.dma.flush( rmesa->radeon.glCtx );  \
 } while (0)
 
 /* Can accomodate several state changes and primitive changes without
@@ -153,7 +129,7 @@ static INLINE int R200_DB_STATECHANGE(
  */
 #define R200_FIREVERTICES( rmesa )                     \
 do {                                                   \
-   if ( rmesa->swtcl.flush || rmesa->tcl.flush ) {     \
+   if ( rmesa->radeon.dma.flush ) {    \
       r200Flush( rmesa->radeon.glCtx );                        \
    }                                                   \
 } while (0)
@@ -167,40 +143,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;