gallium/draw: initial code to properly support llvm in the draw module
[mesa.git] / src / mesa / drivers / dri / r600 / r600_cmdbuf.h
index 6c3ceb38fa699d8ffe859edf4b220c7342cf8135..dff000969993c1b87a1e6ac390fd037eb7c04ffb 100644 (file)
@@ -118,49 +118,35 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define R600_IT_SET_CTL_CONST                     0x00006F00
 #define R600_IT_SURFACE_BASE_UPDATE               0x00007300
 
-extern int r600_cs_write_reloc(struct radeon_cs *cs,
-                        struct radeon_bo *bo,
-                        uint32_t read_domain,
-                        uint32_t write_domain,
-                        uint32_t flags,
-                        offset_modifiers* poffset_mod);
-
-static inline void r600_cs_write_dword(struct radeon_cs *cs, uint32_t dword)
-{
-    cs->packets[cs->cdw++] = dword;
-}
+struct radeon_cs_manager * r600_radeon_cs_manager_legacy_ctor(struct radeon_context *ctx);
 
 /**
  * Write one dword to the command buffer.
  */
-#define R600_OUT_BATCH(data) \
-       do { \
-        r600_cs_write_dword(b_l_rmesa->cmdbuf.cs, data);\
-       } while(0)
+#define R600_OUT_BATCH(data)                           \
+do {                                                   \
+        radeon_cs_write_dword(b_l_rmesa->cmdbuf.cs, data);     \
+} while(0)
 
 /**
  * Write n dwords from ptr to the command buffer.
  */
-#define R600_OUT_BATCH_TABLE(ptr,n) \
-       do { \
-               int _i; \
-        for (_i=0; _i < n; _i++) {\
-            r600_cs_write_dword(b_l_rmesa->cmdbuf.cs, ptr[_i]);\
-        }\
-       } while(0)
+#define R600_OUT_BATCH_TABLE(ptr,n)            \
+do {                                                \
+       radeon_cs_write_table(b_l_rmesa->cmdbuf.cs, ptr, n);    \
+} while(0)
 
 /**
  * Write a relocated dword to the command buffer.
  */
-#define R600_OUT_BATCH_RELOC(data, bo, offset, rd, wd, flags, offset_mod)      \
+#define R600_OUT_BATCH_RELOC(data, bo, offset, rd, wd, flags)  \
        do {                                                    \
         if (0 && offset) {                                     \
             fprintf(stderr, "(%s:%s:%d) offset : %d\n",                \
             __FILE__, __FUNCTION__, __LINE__, offset);         \
         }                                                      \
-        r600_cs_write_dword(b_l_rmesa->cmdbuf.cs, offset);     \
-        r600_cs_write_reloc(b_l_rmesa->cmdbuf.cs,              \
-                              bo, rd, wd, flags, offset_mod);          \
+        radeon_cs_write_reloc(b_l_rmesa->cmdbuf.cs,            \
+                              bo, rd, wd, flags);              \
        } while(0)
 
 /* R600/R700 */