diff options
author | Marek Olšák <[email protected]> | 2016-10-24 23:26:39 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-26 13:02:58 +0200 |
commit | 29144d0f34d9325a3549e4ed0feecc0577c70358 (patch) | |
tree | f73d8c2fea2d28c967f02883f75592a627cdf218 /src/gallium/drivers | |
parent | e3c3a7fadaf87f68b5d8053d21d8c986a90dec30 (diff) |
gallium/radeon: stop using PIPE_BIND_CUSTOM
it has no effect whatsoever
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_compute.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_video.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pm4.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 9 |
11 files changed, 18 insertions, 24 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index fe43f375749..f66c9f6de28 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -87,9 +87,7 @@ struct r600_resource *r600_compute_buffer_alloc_vram(struct r600_screen *screen, assert(size); buffer = pipe_buffer_create((struct pipe_screen*) screen, - PIPE_BIND_CUSTOM, - PIPE_USAGE_IMMUTABLE, - size); + 0, PIPE_USAGE_IMMUTABLE, size); return (struct r600_resource *)buffer; } @@ -335,7 +333,7 @@ static void evergreen_compute_upload_input(struct pipe_context *ctx, if (!shader->kernel_param) { /* Add space for the grid dimensions */ shader->kernel_param = (struct r600_resource *) - pipe_buffer_create(ctx->screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(ctx->screen, 0, PIPE_USAGE_IMMUTABLE, input_size); } diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 59a13ec2483..b5e7b7d7223 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -137,7 +137,7 @@ static int store_shader(struct pipe_context *ctx, if (shader->bo == NULL) { shader->bo = (struct r600_resource*) - pipe_buffer_create(ctx->screen, PIPE_BIND_CUSTOM, PIPE_USAGE_IMMUTABLE, shader->shader.bc.ndw * 4); + pipe_buffer_create(ctx->screen, 0, PIPE_USAGE_IMMUTABLE, shader->shader.bc.ndw * 4); if (shader->bo == NULL) { return -ENOMEM; } diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 48c54432956..60490b0d695 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1326,14 +1326,14 @@ static void update_gs_block_state(struct r600_context *rctx, unsigned enable) if (enable && !rctx->gs_rings.esgs_ring.buffer) { unsigned size = 0x1C000; rctx->gs_rings.esgs_ring.buffer = - pipe_buffer_create(rctx->b.b.screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(rctx->b.b.screen, 0, PIPE_USAGE_DEFAULT, size); rctx->gs_rings.esgs_ring.buffer_size = size; size = 0x4000000; rctx->gs_rings.gsvs_ring.buffer = - pipe_buffer_create(rctx->b.b.screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(rctx->b.b.screen, 0, PIPE_USAGE_DEFAULT, size); rctx->gs_rings.gsvs_ring.buffer_size = size; } diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index a5c8595ea12..047f597a235 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -338,7 +338,7 @@ static struct r600_resource *r600_new_query_buffer(struct r600_common_context *c * usage pattern. */ struct r600_resource *buf = (struct r600_resource*) - pipe_buffer_create(ctx->b.screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(ctx->b.screen, 0, PIPE_USAGE_STAGING, buf_size); if (!buf) return NULL; @@ -1580,7 +1580,7 @@ void r600_query_init_backend_mask(struct r600_common_context *ctx) /* create buffer for event data */ buffer = (struct r600_resource*) - pipe_buffer_create(ctx->b.screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(ctx->b.screen, 0, PIPE_USAGE_STAGING, ctx->max_db*16); if (!buffer) goto err; diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index db65cd9235b..bc981da4bed 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -879,8 +879,7 @@ static void r600_texture_allocate_htile(struct r600_common_screen *rscreen, return; rtex->htile_buffer = (struct r600_resource*) - r600_aligned_buffer_create(&rscreen->b, PIPE_BIND_CUSTOM, - PIPE_USAGE_DEFAULT, + r600_aligned_buffer_create(&rscreen->b, 0, PIPE_USAGE_DEFAULT, rtex->surface.htile_size, rtex->surface.htile_alignment); if (rtex->htile_buffer == NULL) { diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index b4fd3065428..59e735b4744 100644 --- a/src/gallium/drivers/radeon/radeon_video.c +++ b/src/gallium/drivers/radeon/radeon_video.c @@ -72,7 +72,7 @@ bool rvid_create_buffer(struct pipe_screen *screen, struct rvid_buffer *buffer, * non-sub-allocated buffer. */ buffer->res = (struct r600_resource *) - pipe_buffer_create(screen, PIPE_BIND_CUSTOM | PIPE_BIND_SHARED, + pipe_buffer_create(screen, PIPE_BIND_SHARED, usage, size); return buffer->res != NULL; diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 7c11bafcb29..87ba31659b0 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -159,7 +159,7 @@ void si_begin_new_cs(struct si_context *ctx) /* Create a buffer used for writing trace IDs and initialize it to 0. */ assert(!ctx->trace_buf); ctx->trace_buf = (struct r600_resource*) - pipe_buffer_create(ctx->b.b.screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(ctx->b.b.screen, 0, PIPE_USAGE_STAGING, 4); if (ctx->trace_buf) pipe_buffer_write_nooverlap(&ctx->b.b, &ctx->trace_buf->b.b, diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index ccd7f3fdcdd..bf3b442dbcc 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -202,8 +202,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, sctx->ce_suballocator = u_suballocator_create(&sctx->b.b, 1024 * 1024, - PIPE_BIND_CUSTOM, - PIPE_USAGE_DEFAULT, false); + 0, PIPE_USAGE_DEFAULT, false); if (!sctx->ce_suballocator) goto fail; } @@ -217,7 +216,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, goto fail; sctx->border_color_buffer = (struct r600_resource*) - pipe_buffer_create(screen, PIPE_BIND_CUSTOM, PIPE_USAGE_DEFAULT, + pipe_buffer_create(screen, 0, PIPE_USAGE_DEFAULT, SI_MAX_BORDER_COLORS * sizeof(*sctx->border_color_table)); if (!sctx->border_color_buffer) diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 8fc5fcc370f..6b74e496db6 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -406,8 +406,7 @@ si_resource_create_custom(struct pipe_screen *screen, unsigned usage, unsigned size) { assert(size); - return r600_resource(pipe_buffer_create(screen, - PIPE_BIND_CUSTOM, usage, size)); + return r600_resource(pipe_buffer_create(screen, 0, usage, size)); } static inline void diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c index 386d0935e83..97b6799f361 100644 --- a/src/gallium/drivers/radeonsi/si_pm4.c +++ b/src/gallium/drivers/radeonsi/si_pm4.c @@ -190,7 +190,7 @@ void si_pm4_upload_indirect_buffer(struct si_context *sctx, r600_resource_reference(&state->indirect_buffer, NULL); state->indirect_buffer = (struct r600_resource*) - pipe_buffer_create(screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(screen, 0, PIPE_USAGE_DEFAULT, aligned_ndw * 4); if (!state->indirect_buffer) return; diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index f59bfcd7d41..3037a04b03c 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1730,7 +1730,7 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx) if (update_esgs) { pipe_resource_reference(&sctx->esgs_ring, NULL); - sctx->esgs_ring = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM, + sctx->esgs_ring = pipe_buffer_create(sctx->b.b.screen, 0, PIPE_USAGE_DEFAULT, esgs_ring_size); if (!sctx->esgs_ring) @@ -1739,7 +1739,7 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx) if (update_gsvs) { pipe_resource_reference(&sctx->gsvs_ring, NULL); - sctx->gsvs_ring = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM, + sctx->gsvs_ring = pipe_buffer_create(sctx->b.b.screen, 0, PIPE_USAGE_DEFAULT, gsvs_ring_size); if (!sctx->gsvs_ring) @@ -2008,7 +2008,7 @@ static void si_init_tess_factor_ring(struct si_context *sctx) } assert(!sctx->tf_ring); - sctx->tf_ring = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM, + sctx->tf_ring = pipe_buffer_create(sctx->b.b.screen, 0, PIPE_USAGE_DEFAULT, 32768 * sctx->screen->b.info.max_se); if (!sctx->tf_ring) @@ -2016,8 +2016,7 @@ static void si_init_tess_factor_ring(struct si_context *sctx) assert(((sctx->tf_ring->width0 / 4) & C_030938_SIZE) == 0); - sctx->tess_offchip_ring = pipe_buffer_create(sctx->b.b.screen, - PIPE_BIND_CUSTOM, + sctx->tess_offchip_ring = pipe_buffer_create(sctx->b.b.screen, 0, PIPE_USAGE_DEFAULT, max_offchip_buffers * sctx->screen->tess_offchip_block_dw_size * 4); |