diff options
author | Marek Olšák <[email protected]> | 2013-11-29 16:26:36 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-12-12 18:34:11 +0100 |
commit | 12806449fa35aff47ad6f4615ede55776c9f66c8 (patch) | |
tree | e0f2a10c0203a12f46980bdbb0b9cb009498dbd7 /src/gallium/drivers/radeonsi | |
parent | e1374d86fecb58edc9cf9b456b05d74a0034eafd (diff) |
r600g,radeonsi: add common interface for buffer invalidation
This will be used by common code in the next commit.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.h | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_buffer.c b/src/gallium/drivers/radeonsi/r600_buffer.c index 560e7daf3cc..c952fe0084b 100644 --- a/src/gallium/drivers/radeonsi/r600_buffer.c +++ b/src/gallium/drivers/radeonsi/r600_buffer.c @@ -63,7 +63,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx, /* Check if mapping this buffer would cause waiting for the GPU. */ if (r600_rings_is_buffer_referenced(&rctx->b, rbuffer->cs_buf, RADEON_USAGE_READWRITE) || rctx->b.ws->buffer_is_busy(rbuffer->buf, RADEON_USAGE_READWRITE)) { - si_invalidate_buffer(&rctx->b.b, &rbuffer->b.b); + rctx->b.invalidate_buffer(&rctx->b.b, &rbuffer->b.b); } } diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 62c354fffcf..e6d566d02e0 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -551,7 +551,7 @@ static void si_desc_reset_buffer_offset(struct pipe_context *ctx, * idle by discarding its contents. Apps usually tell us when to do this using * map_buffer flags, for example. */ -void si_invalidate_buffer(struct pipe_context *ctx, struct pipe_resource *buf) +static void si_invalidate_buffer(struct pipe_context *ctx, struct pipe_resource *buf) { struct r600_context *rctx = (struct r600_context*)ctx; struct r600_resource *rbuffer = r600_resource(buf); @@ -811,6 +811,7 @@ void si_init_all_descriptors(struct r600_context *rctx) rctx->b.b.set_constant_buffer = si_set_constant_buffer; rctx->b.b.set_stream_output_targets = si_set_streamout_targets; rctx->b.clear_buffer = si_clear_buffer; + rctx->b.invalidate_buffer = si_invalidate_buffer; } void si_release_all_descriptors(struct r600_context *rctx) diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 7e2cb81eaaf..6774e57e21f 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -200,7 +200,6 @@ void si_all_descriptors_begin_new_cs(struct r600_context *rctx); void si_copy_buffer(struct r600_context *rctx, struct pipe_resource *dst, struct pipe_resource *src, uint64_t dst_offset, uint64_t src_offset, unsigned size); -void si_invalidate_buffer(struct pipe_context *ctx, struct pipe_resource *buf); /* si_state.c */ struct si_pipe_shader_selector; |