diff options
author | Marek Olšák <[email protected]> | 2011-01-28 03:03:38 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-01-30 03:29:48 +0100 |
commit | 02f8f134643f631364ca621fe0b6d6b72449e00c (patch) | |
tree | bf7352a45f9033373e76ff57aa693dc5c13c8436 /src/gallium/drivers/r600/r600_pipe.c | |
parent | f8a7a0b6f30ff38b2743860cbc4caeab102c2c29 (diff) |
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
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 9245dba5761..824cf7fc46a 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -35,6 +35,7 @@ #include <util/u_pack_color.h> #include <util/u_memory.h> #include <util/u_inlines.h> +#include "util/u_upload_mgr.h" #include <pipebuffer/pb_buffer.h> #include "r600.h" #include "r600d.h" @@ -68,8 +69,8 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags, #endif r600_context_flush(&rctx->ctx); - r600_upload_flush(rctx->rupload_vb); - r600_upload_flush(rctx->rupload_const); + u_upload_flush(rctx->upload_vb); + u_upload_flush(rctx->upload_const); } static void r600_destroy_context(struct pipe_context *context) @@ -88,8 +89,8 @@ static void r600_destroy_context(struct pipe_context *context) free(rctx->states[i]); } - r600_upload_destroy(rctx->rupload_vb); - r600_upload_destroy(rctx->rupload_const); + u_upload_destroy(rctx->upload_vb); + u_upload_destroy(rctx->upload_const); if (rctx->tran.translate_cache) translate_cache_destroy(rctx->tran.translate_cache); @@ -167,14 +168,17 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void return NULL; } - rctx->rupload_vb = r600_upload_create(rctx, 128 * 1024, 16); - if (rctx->rupload_vb == NULL) { + rctx->upload_vb = u_upload_create(&rctx->context, 1024 * 1024, 16, + PIPE_BIND_VERTEX_BUFFER | + PIPE_BIND_INDEX_BUFFER); + if (rctx->upload_vb == NULL) { r600_destroy_context(&rctx->context); return NULL; } - rctx->rupload_const = r600_upload_create(rctx, 128 * 1024, 256); - if (rctx->rupload_const == NULL) { + rctx->upload_const = u_upload_create(&rctx->context, 1024 * 1024, 256, + PIPE_BIND_CONSTANT_BUFFER); + if (rctx->upload_const == NULL) { r600_destroy_context(&rctx->context); return NULL; } |