r300g: better describe another flush and move it closer to the real problem
[mesa.git] / src / gallium / drivers / r300 / r300_winsys.h
index 2bd40176d10dbadab4ac7fb0f2317546a4e58c9d..f7cbbde410a0402efd826ead4c0672fc5255fbd9 100644 (file)
@@ -39,7 +39,7 @@ enum r300_value_id {
     R300_VID_GB_PIPES,
     R300_VID_Z_PIPES,
     R300_VID_SQUARE_TILING_SUPPORT,
-    R300_VID_TEX3D_MIP_BUG,
+    R300_VID_DRM_2_3_0,
 };
 
 enum r300_reference_domain { /* bitfield */
@@ -47,6 +47,13 @@ enum r300_reference_domain { /* bitfield */
     R300_REF_HW = 2
 };
 
+struct r300_cs_info {
+    /* In DWORDs. */
+    unsigned used;
+    unsigned free;
+    unsigned capacity;
+};
+
 struct r300_winsys_screen {
     void (*destroy)(struct r300_winsys_screen *ws);
     
@@ -87,13 +94,8 @@ struct r300_winsys_screen {
                             struct r300_winsys_buffer **pdst,
                             struct r300_winsys_buffer *src);
 
-    boolean (*buffer_references)(struct r300_winsys_buffer *a,
-                                struct r300_winsys_buffer *b);
-
-    void (*buffer_flush_range)(struct r300_winsys_screen *rws,
-                              struct r300_winsys_buffer *buf,
-                              unsigned offset,
-                              unsigned length);
+    void (*buffer_wait)(struct r300_winsys_screen *rws,
+                        struct r300_winsys_buffer *buf);
 
     /* Add a pipe_resource to the list of buffer objects to validate. */
     boolean (*add_buffer)(struct r300_winsys_screen *winsys,
@@ -106,8 +108,9 @@ struct r300_winsys_screen {
      * Returns TRUE if a flush is required. */
     boolean (*validate)(struct r300_winsys_screen* winsys);
 
-    /* Check to see if there's room for commands. */
-    boolean (*check_cs)(struct r300_winsys_screen* winsys, int size);
+    /* Return current CS info. */
+    void (*get_cs_info)(struct r300_winsys_screen *winsys,
+                        struct r300_cs_info *info);
 
     /* Start a command emit. */
     void (*begin_cs)(struct r300_winsys_screen* winsys,
@@ -119,6 +122,10 @@ struct r300_winsys_screen {
     /* Write a dword to the command buffer. */
     void (*write_cs_dword)(struct r300_winsys_screen* winsys, uint32_t dword);
 
+    /* Write a table of dwords to the command buffer. */
+    void (*write_cs_table)(struct r300_winsys_screen* winsys,
+                           const void *dwords, unsigned count);
+
     /* Write a relocated dword to the command buffer. */
     void (*write_cs_reloc)(struct r300_winsys_screen *winsys,
                            struct r300_winsys_buffer *buf,