diff options
author | Marek Olšák <[email protected]> | 2010-12-03 02:48:11 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-12-03 04:40:22 +0100 |
commit | 3ba8843307a909f35f2a04e6be6dcadd760ad82b (patch) | |
tree | 4c69fda7f8962184259483b8b96a85243a84e159 /src/gallium/drivers/r300/r300_winsys.h | |
parent | 6299f241e9fdd86e705d144a42d9b1979c13f9ad (diff) |
r300g: use internal BO handle for add_buffer and write_reloc
Small perf improvement in ipers.
radeon_drm_get_cs_handle is exactly what this commit tries to avoid
in every write_reloc.
Diffstat (limited to 'src/gallium/drivers/r300/r300_winsys.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_winsys.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index 4597332399a..c45888dbf38 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -36,7 +36,8 @@ struct winsys_handle; struct r300_winsys_screen; -struct r300_winsys_buffer; +struct r300_winsys_buffer; /* for map/unmap etc. */ +struct r300_winsys_cs_buffer; /* for write_reloc etc. */ struct r300_winsys_cs { uint32_t *ptr; /* Pointer to the beginning of the CS. */ @@ -102,6 +103,10 @@ struct r300_winsys_screen { unsigned usage, enum r300_buffer_domain domain); + struct r300_winsys_cs_buffer *(*buffer_get_cs_handle)( + struct r300_winsys_screen *ws, + struct r300_winsys_buffer *buf); + /** * Reference a buffer object (assign with reference counting). * @@ -242,7 +247,7 @@ struct r300_winsys_screen { * of the R300_DOMAIN_* flags. */ void (*cs_add_buffer)(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd); @@ -263,7 +268,7 @@ struct r300_winsys_screen { * \param wd A write domain containing a bitmask of the R300_DOMAIN_* flags. */ void (*cs_write_reloc)(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd); @@ -303,7 +308,7 @@ struct r300_winsys_screen { * \param domain A bitmask of the R300_REF_* enums. */ boolean (*cs_is_buffer_referenced)(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_reference_domain domain); }; |