diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_winsys.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_winsys.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index 3d0413f90a..6ce218923b 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -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); @@ -67,8 +74,9 @@ struct r300_winsys_screen { struct r300_winsys_buffer *(*buffer_create)(struct r300_winsys_screen *ws, unsigned alignment, unsigned usage, + enum r300_buffer_domain domain, unsigned size); - + /** * Map the entire data store of a buffer object into the client's address. * flags is bitmask of R300_WINSYS_BUFFER_USAGE_CPU_READ/WRITE flags. @@ -93,16 +101,17 @@ struct r300_winsys_screen { /* Add a pipe_resource to the list of buffer objects to validate. */ boolean (*add_buffer)(struct r300_winsys_screen *winsys, struct r300_winsys_buffer *buf, - uint32_t rd, - uint32_t wd); + enum r300_buffer_domain rd, + enum r300_buffer_domain wd); /* Revalidate all currently setup pipe_buffers. * 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, @@ -121,8 +130,8 @@ struct r300_winsys_screen { /* Write a relocated dword to the command buffer. */ void (*write_cs_reloc)(struct r300_winsys_screen *winsys, struct r300_winsys_buffer *buf, - uint32_t rd, - uint32_t wd, + enum r300_buffer_domain rd, + enum r300_buffer_domain wd, uint32_t flags); /* Finish a command emit. */ |