diff options
author | Marek Olšák <[email protected]> | 2016-10-24 23:29:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-26 13:02:58 +0200 |
commit | ad45dce4a2896639a28a91f4250e40dae9d43b1f (patch) | |
tree | 23aac2cd9b5831d67852dfcf0ae9482420997837 /src/gallium/drivers/radeonsi | |
parent | 29144d0f34d9325a3549e4ed0feecc0577c70358 (diff) |
radeonsi: remove si_resource_create_custom
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_cp_dma.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 8 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 4 |
5 files changed, 11 insertions, 20 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index e78510619c1..f1887bb8a55 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -276,9 +276,9 @@ static bool si_setup_compute_scratch_buffer(struct si_context *sctx, if (scratch_bo_size < scratch_needed) { r600_resource_reference(&sctx->compute_scratch_buffer, NULL); - sctx->compute_scratch_buffer = - si_resource_create_custom(&sctx->screen->b.b, - PIPE_USAGE_DEFAULT, scratch_needed); + sctx->compute_scratch_buffer = (struct r600_resource*) + pipe_buffer_create(&sctx->screen->b.b, 0, + PIPE_USAGE_DEFAULT, scratch_needed); if (!sctx->compute_scratch_buffer) return false; diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c index 0e8d1e89cc3..6667ae302b4 100644 --- a/src/gallium/drivers/radeonsi/si_cp_dma.c +++ b/src/gallium/drivers/radeonsi/si_cp_dma.c @@ -236,10 +236,9 @@ static void si_cp_dma_realign_engine(struct si_context *sctx, unsigned size) if (!sctx->scratch_buffer || sctx->scratch_buffer->b.b.width0 < scratch_size) { r600_resource_reference(&sctx->scratch_buffer, NULL); - sctx->scratch_buffer = - si_resource_create_custom(&sctx->screen->b.b, - PIPE_USAGE_DEFAULT, - scratch_size); + sctx->scratch_buffer = (struct r600_resource*) + pipe_buffer_create(&sctx->screen->b.b, 0, + PIPE_USAGE_DEFAULT, scratch_size); if (!sctx->scratch_buffer) return; sctx->emit_scratch_reloc = true; diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 6b74e496db6..0240a3c191d 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -401,14 +401,6 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, * common helpers */ -static inline struct r600_resource * -si_resource_create_custom(struct pipe_screen *screen, - unsigned usage, unsigned size) -{ - assert(size); - return r600_resource(pipe_buffer_create(screen, 0, usage, size)); -} - static inline void si_invalidate_draw_sh_constants(struct si_context *sctx) { diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 8edd5934234..2b8c168a1f0 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5977,9 +5977,9 @@ int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader) assert(!epilog || !epilog->rodata_size); r600_resource_reference(&shader->bo, NULL); - shader->bo = si_resource_create_custom(&sscreen->b.b, - PIPE_USAGE_IMMUTABLE, - bo_size); + shader->bo = (struct r600_resource*) + pipe_buffer_create(&sscreen->b.b, 0, + PIPE_USAGE_IMMUTABLE, bo_size); if (!shader->bo) return -ENOMEM; diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 3037a04b03c..e4ceb3b8150 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1905,8 +1905,8 @@ static bool si_update_spi_tmpring_size(struct si_context *sctx) /* Create a bigger scratch buffer */ r600_resource_reference(&sctx->scratch_buffer, NULL); - sctx->scratch_buffer = - si_resource_create_custom(&sctx->screen->b.b, + sctx->scratch_buffer = (struct r600_resource*) + pipe_buffer_create(&sctx->screen->b.b, 0, PIPE_USAGE_DEFAULT, scratch_needed_size); if (!sctx->scratch_buffer) return false; |