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/r600 | |
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/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 3 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 7239e5a365f..969803fe951 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -91,7 +91,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)) { - r600_invalidate_buffer(&rctx->b.b, &rbuffer->b.b); + rctx->b.invalidate_buffer(&rctx->b.b, &rbuffer->b.b); } } else if ((usage & PIPE_TRANSFER_DISCARD_RANGE) && diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 45512639b52..15e89a0e263 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -717,7 +717,6 @@ unsigned r600_get_swizzle_combined(const unsigned char *swizzle_format, uint32_t r600_translate_texformat(struct pipe_screen *screen, enum pipe_format format, const unsigned char *swizzle_view, uint32_t *word4_p, uint32_t *yuv_format_p); -void r600_invalidate_buffer(struct pipe_context *ctx, struct pipe_resource *buf); /* r600_uvd.c */ struct pipe_video_codec *r600_uvd_create_decoder(struct pipe_context *context, diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 718a173236d..3c7bfe94745 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -2072,7 +2072,7 @@ out_unknown: return ~0; } -void r600_invalidate_buffer(struct pipe_context *ctx, struct pipe_resource *buf) +static void r600_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); @@ -2162,6 +2162,7 @@ void r600_init_common_state_functions(struct r600_context *rctx) rctx->b.b.create_surface = r600_create_surface; rctx->b.b.surface_destroy = r600_surface_destroy; rctx->b.b.draw_vbo = r600_draw_vbo; + rctx->b.invalidate_buffer = r600_invalidate_buffer; } void r600_trace_emit(struct r600_context *rctx) |