meta: Use the _mesa_meta_compile_and_link_program helper more places.
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_cmdbuf.h
index 9f8d6cc49de1ae79e9fb9cb52a9f4d84e8e435a4..da179a7e367df12d61b17aef051fd455cfdfbb3b 100644 (file)
@@ -9,7 +9,6 @@ void rcommonDestroyCmdBuf(radeonContextPtr rmesa);
 
 void rcommonBeginBatch(radeonContextPtr rmesa,
                       int n,
-                      int dostate,
                       const char *file,
                       const char *function,
                       int line);
@@ -29,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__, __func__, __LINE__)
 
 /**
  * Write one dword to the command buffer.
@@ -55,7 +49,7 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
        int  __offset = (offset);                               \
         if (0 && __offset) {                                   \
             fprintf(stderr, "(%s:%s:%d) offset : %d\n",                \
-            __FILE__, __FUNCTION__, __LINE__, __offset);       \
+            __FILE__, __func__, __LINE__, __offset);   \
         }                                                      \
         radeon_cs_write_dword(b_l_rmesa->cmdbuf.cs, __offset); \
         radeon_cs_write_reloc(b_l_rmesa->cmdbuf.cs,            \
@@ -78,7 +72,7 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
  */
 #define END_BATCH() \
        do { \
-        radeon_cs_end(b_l_rmesa->cmdbuf.cs, __FILE__, __FUNCTION__, __LINE__);\
+        radeon_cs_end(b_l_rmesa->cmdbuf.cs, __FILE__, __func__, __LINE__);\
        } while(0)
 
 /**
@@ -104,10 +98,10 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
 
 /* Fire the buffered vertices no matter what.
  */
-static INLINE void radeon_firevertices(radeonContextPtr radeon)
+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