Merge branch 'gallium-drm-driver-drescriptor'
[mesa.git] / src / gallium / drivers / r300 / r300_winsys.h
index 8a8888d48133658539c66d5e20a27249b82f172c..3b5e9eec602033c9c26ec8cdcb4ca18faf37c1f9 100644 (file)
@@ -47,13 +47,6 @@ 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);
     
@@ -109,16 +102,13 @@ struct r300_winsys_screen {
      * Returns TRUE if a flush is required. */
     boolean (*validate)(struct r300_winsys_screen* winsys);
 
-    /* Return current CS info. */
-    void (*get_cs_info)(struct r300_winsys_screen *winsys,
-                        struct r300_cs_info *info);
+    /* Return the number of free dwords in CS. */
+    unsigned (*get_cs_free_dwords)(struct r300_winsys_screen *winsys);
 
-    /* Start a command emit. */
-    void (*begin_cs)(struct r300_winsys_screen* winsys,
-                     int size,
-                     const char* file,
-                     const char* function,
-                     int line);
+    /* Return the pointer to the first free dword in CS and assume a pipe
+     * driver wants to fill "count" dwords. */
+    uint32_t *(*get_cs_pointer)(struct r300_winsys_screen *winsys,
+                                unsigned count);
 
     /* Write a dword to the command buffer. */
     void (*write_cs_dword)(struct r300_winsys_screen* winsys, uint32_t dword);
@@ -134,12 +124,6 @@ struct r300_winsys_screen {
                            enum r300_buffer_domain wd,
                            uint32_t flags);
 
-    /* Finish a command emit. */
-    void (*end_cs)(struct r300_winsys_screen* winsys,
-                   const char* file,
-                   const char* function,
-                   int line);
-
     /* Flush the CS. */
     void (*flush_cs)(struct r300_winsys_screen* winsys);
 
@@ -164,12 +148,10 @@ struct r300_winsys_screen {
                          enum r300_value_id vid);
 
     struct r300_winsys_buffer *(*buffer_from_handle)(struct r300_winsys_screen *winsys,
-                                                    struct pipe_screen *screen,
-                                                    struct winsys_handle *whandle,
-                                                    unsigned *stride);
+                                                     unsigned handle);
+
     boolean (*buffer_get_handle)(struct r300_winsys_screen *winsys,
                                 struct r300_winsys_buffer *buffer,
-                                unsigned stride,
                                 struct winsys_handle *whandle);
 
     boolean (*is_buffer_referenced)(struct r300_winsys_screen *winsys,