aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen_buffer.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-26 12:07:54 +0200
committerMarek Olšák <[email protected]>2012-04-29 14:48:45 +0200
commita784d86508a4b609d12ca07986d43005ff2686ae (patch)
treee6c1ff4f86bef59522a7bba1ef5f80c495f9124f /src/gallium/drivers/r300/r300_screen_buffer.c
parent2ed1cdb2a56257c97f8f64cdefd5f28fb64773b8 (diff)
r300g: use u_default_transfer_inline_write
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen_buffer.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index bb2c7c14bd8..a3b09500d4b 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -140,34 +140,6 @@ static void r300_buffer_transfer_unmap( struct pipe_context *pipe,
}
}
-static void r300_buffer_transfer_inline_write(struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level,
- unsigned usage,
- const struct pipe_box *box,
- const void *data,
- unsigned stride,
- unsigned layer_stride)
-{
- struct r300_context *r300 = r300_context(pipe);
- struct radeon_winsys *rws = r300->screen->rws;
- struct r300_resource *rbuf = r300_resource(resource);
- uint8_t *map = NULL;
-
- if (rbuf->constant_buffer) {
- memcpy(rbuf->constant_buffer + box->x, data, box->width);
- return;
- }
- assert(rbuf->b.b.user_ptr == NULL);
-
- map = rws->buffer_map(rbuf->cs_buf, r300->cs,
- PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE | usage);
-
- memcpy(map + box->x, data, box->width);
-
- rws->buffer_unmap(rbuf->cs_buf);
-}
-
static const struct u_resource_vtbl r300_buffer_vtbl =
{
NULL, /* get_handle */
@@ -177,7 +149,7 @@ static const struct u_resource_vtbl r300_buffer_vtbl =
r300_buffer_transfer_map, /* transfer_map */
NULL, /* transfer_flush_region */
r300_buffer_transfer_unmap, /* transfer_unmap */
- r300_buffer_transfer_inline_write /* transfer_inline_write */
+ NULL /* transfer_inline_write */
};
struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,