radeon: Enable GL_EXT_framebuffer_blit
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_cmdbuf.h
index 6fcd1ce7ca628328d8842f23b6cae5c18f82084b..31b95fd661af68d7deb69813cca5dc297eeca9c1 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef COMMON_CMDBUF_H
 #define COMMON_CMDBUF_H
 
-#include "radeon_bocs_wrapper.h"
-
 GLboolean rcommonEnsureCmdBufSpace(radeonContextPtr rmesa, int dwords, const char *caller);
 int rcommonFlushCmdBuf(radeonContextPtr rmesa, const char *caller);
 int rcommonFlushCmdBufLocked(radeonContextPtr rmesa, const char *caller);
@@ -11,7 +9,6 @@ void rcommonDestroyCmdBuf(radeonContextPtr rmesa);
 
 void rcommonBeginBatch(radeonContextPtr rmesa,
                       int n,
-                      int dostate,
                       const char *file,
                       const char *function,
                       int line);
@@ -31,15 +28,10 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
        const radeonContextPtr b_l_rmesa = rmesa
 
 /**
- * Prepare writing n dwords to the command buffer,
- * including producing any necessary state emits on buffer wraparound.
+ * Prepare writing n dwords to the command buffer.  Does not cause automatic
+ * state emits.
  */
-#define BEGIN_BATCH(n) rcommonBeginBatch(b_l_rmesa, n, 1, __FILE__, __FUNCTION__, __LINE__)
-
-/**
- * Same as BEGIN_BATCH, but do not cause automatic state emits.
- */
-#define BEGIN_BATCH_NO_AUTOSTATE(n) rcommonBeginBatch(b_l_rmesa, n, 0, __FILE__, __FUNCTION__, __LINE__)
+#define BEGIN_BATCH(n) rcommonBeginBatch(b_l_rmesa, n, __FILE__, __FUNCTION__, __LINE__)
 
 /**
  * Write one dword to the command buffer.
@@ -62,8 +54,6 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
         radeon_cs_write_dword(b_l_rmesa->cmdbuf.cs, __offset); \
         radeon_cs_write_reloc(b_l_rmesa->cmdbuf.cs,            \
                               bo, rd, wd, flags);              \
-       if (!b_l_rmesa->radeonScreen->kernel_mm)                \
-               b_l_rmesa->cmdbuf.cs->section_cdw += 2;         \
        } while(0)
 
 
@@ -104,10 +94,6 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
 #define OUT_BATCH_REGSEQ(reg, count) \
        OUT_BATCH(cmdpacket0(b_l_rmesa->radeonScreen, (reg), (count)))
 
-/** Write a 32 bit float to the ring; requires 1 dword. */
-#define OUT_BATCH_FLOAT32(f) \
-       OUT_BATCH(radeonPackFloat32((f)))
-
 /* +r6/r7 : code here moved */
 
 /* Fire the buffered vertices no matter what.
@@ -115,7 +101,7 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
 static INLINE void radeon_firevertices(radeonContextPtr radeon)
 {
    if (radeon->cmdbuf.cs->cdw || radeon->dma.flush )
-      radeon->glCtx->Driver.Flush(radeon->glCtx); /* +r6/r7 */
+      radeon->glCtx.Driver.Flush(&radeon->glCtx); /* +r6/r7 */
 }
 
 #endif