From 02f8f134643f631364ca621fe0b6d6b72449e00c Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 28 Jan 2011 03:03:38 +0100 Subject: r600g: add back u_upload_mgr integration I can't see a performance difference with this code, which means all the driver-specific code removed in this commit was unnecessary. Now we use u_upload_mgr in a slightly different way than we did before it got dropped. I am not restoring the original code "as is" due to latest u_upload_mgr changes that r300g performance benefits from. This also fixes: - piglit/fp-kil --- src/gallium/drivers/r600/r600_resource.h | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/gallium/drivers/r600/r600_resource.h') diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h index 28b3e1e5e4..6e30244471 100644 --- a/src/gallium/drivers/r600/r600_resource.h +++ b/src/gallium/drivers/r600/r600_resource.h @@ -71,7 +71,6 @@ struct r600_resource_buffer { struct r600_resource r; uint32_t magic; void *user_buffer; - bool uploaded; }; struct r600_surface { @@ -98,10 +97,8 @@ static INLINE struct r600_resource_buffer *r600_buffer(struct pipe_resource *buf return NULL; } -static INLINE boolean r600_buffer_is_user_buffer(struct pipe_resource *buffer) +static INLINE boolean r600_is_user_buffer(struct pipe_resource *buffer) { - if (r600_buffer(buffer)->uploaded) - return FALSE; return r600_buffer(buffer)->user_buffer ? TRUE : FALSE; } @@ -121,15 +118,7 @@ void r600_texture_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer* transfer); struct r600_pipe_context; -struct r600_upload *r600_upload_create(struct r600_pipe_context *rctx, - unsigned default_size, - unsigned alignment); -void r600_upload_flush(struct r600_upload *upload); -void r600_upload_destroy(struct r600_upload *upload); -int r600_upload_buffer(struct r600_upload *upload, unsigned offset, - unsigned size, struct r600_resource_buffer *in_buffer, - unsigned *out_offset, unsigned *out_size, - struct r600_bo **out_buffer); - -int r600_upload_const_buffer(struct r600_pipe_context *rctx, struct pipe_resource *cbuffer, uint32_t *offset); + +void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resource_buffer **rbuffer, uint32_t *offset); + #endif -- cgit v1.2.3