diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-12-03 02:48:11 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-12-03 04:40:22 +0100 |
commit | 3ba8843307a909f35f2a04e6be6dcadd760ad82b (patch) | |
tree | 4c69fda7f8962184259483b8b96a85243a84e159 /src/gallium/drivers/r300/r300_screen_buffer.h | |
parent | 6299f241e9fdd86e705d144a42d9b1979c13f9ad (diff) | |
download | external_mesa3d-3ba8843307a909f35f2a04e6be6dcadd760ad82b.zip external_mesa3d-3ba8843307a909f35f2a04e6be6dcadd760ad82b.tar.gz external_mesa3d-3ba8843307a909f35f2a04e6be6dcadd760ad82b.tar.bz2 |
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_screen_buffer.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_screen_buffer.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.h b/src/gallium/drivers/r300/r300_screen_buffer.h index cafa9f9..a184ead 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.h +++ b/src/gallium/drivers/r300/r300_screen_buffer.h @@ -51,6 +51,7 @@ struct r300_buffer uint32_t magic; struct r300_winsys_buffer *buf; + struct r300_winsys_cs_buffer *cs_buf; enum r300_buffer_domain domain; @@ -86,11 +87,7 @@ unsigned r300_buffer_is_referenced(struct pipe_context *context, static INLINE struct r300_buffer *r300_buffer(struct pipe_resource *buffer) { - if (buffer) { - assert(((struct r300_buffer *)buffer)->magic == R300_BUFFER_MAGIC); - return (struct r300_buffer *)buffer; - } - return NULL; + return (struct r300_buffer *)buffer; } static INLINE boolean r300_buffer_is_user_buffer(struct pipe_resource *buffer) |