r300: release bo from pixmap
[mesa.git] / src / mesa / drivers / dri / r300 / r300_cmdbuf.h
index 98cb1af1260cd6bfaed5e4e67bb60b82e1ffa67d..1a249c8d52cbbf8c6c69d788a81d5bb8606a7a2c 100644 (file)
@@ -84,10 +84,20 @@ void r300BeginBatch(r300ContextPtr r300,
 /**
  * Write a relocated dword to the command buffer.
  */
-#define OUT_BATCH_RELOC(data, bo, offset, flags) \
+#define OUT_BATCH_RELOC(data, bo, offset, rd, wd, flags) \
        do { \
+        if (offset) {\
+            fprintf(stderr, "(%s:%s:%d) offset : %d\n",\
+            __FILE__, __FUNCTION__, __LINE__, offset);\
+        }\
         radeon_cs_write_dword(b_l_r300->cmdbuf.cs, offset);\
-        radeon_cs_write_reloc(b_l_r300->cmdbuf.cs,bo,0,(bo)->size,flags);\
+        radeon_cs_write_reloc(b_l_r300->cmdbuf.cs, \
+                              bo, \
+                              offset, \
+                              (bo)->size, \
+                              rd, \
+                              wd, \
+                              flags);\
        } while(0)
 
 /**
@@ -119,4 +129,7 @@ void r300BeginBatch(r300ContextPtr r300,
        do { \
        } while(0)
 
+void emit_vpu(r300ContextPtr r300, struct r300_state_atom * atom);
+int check_vpu(r300ContextPtr r300, struct r300_state_atom *atom);
+
 #endif                         /* __R300_CMDBUF_H__ */