diff options
author | Marek Olšák <[email protected]> | 2017-11-02 00:00:53 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-11-06 16:23:20 +0100 |
commit | 4b0dc098b2561c07c59f7dab2813640a25789bf1 (patch) | |
tree | dac245ade98bd4e4dc5ba804d81771c6ef91339d /src/gallium/drivers/radeon | |
parent | a5d3999c31e2460f690b561b41170bb7bc24fc65 (diff) |
gallium/u_threaded: don't map big VRAM buffers for the first upload directly
This improves Paraview "many spheres" performance 4x along with the radeonsi
commit.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 67daaa40053..92521f47792 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -191,10 +191,15 @@ void si_init_resource_fields(struct r600_common_screen *rscreen, res->vram_usage = 0; res->gart_usage = 0; - if (res->domains & RADEON_DOMAIN_VRAM) + if (res->domains & RADEON_DOMAIN_VRAM) { res->vram_usage = size; - else if (res->domains & RADEON_DOMAIN_GTT) + + res->b.max_forced_staging_uploads = + rscreen->info.has_dedicated_vram && + size >= rscreen->info.vram_vis_size / 4 ? 1 : 0; + } else if (res->domains & RADEON_DOMAIN_GTT) { res->gart_usage = size; + } } bool si_alloc_resource(struct r600_common_screen *rscreen, @@ -289,6 +294,7 @@ void si_replace_buffer_storage(struct pipe_context *ctx, pb_reference(&rdst->buf, rsrc->buf); rdst->gpu_address = rsrc->gpu_address; rdst->b.b.bind = rsrc->b.b.bind; + rdst->b.max_forced_staging_uploads = rsrc->b.max_forced_staging_uploads; rdst->flags = rsrc->flags; assert(rdst->vram_usage == rsrc->vram_usage); |