From 7c24a4c6a86402be1f68d23f4d52d4d071957801 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 10 Feb 2011 10:16:21 +0100 Subject: r300g: add a way to change texture properties arbitrarily So that we can implement resource_copy on arbitrary data. --- src/gallium/drivers/r300/r300_screen_buffer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/r300/r300_screen_buffer.c') diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index cf4a2e9dae..bc4762c108 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -214,6 +214,7 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen, rbuf->b.user_ptr = NULL; rbuf->domain = R300_DOMAIN_GTT; rbuf->buf = NULL; + rbuf->buf_size = templ->width0; rbuf->constant_buffer = NULL; /* Alloc constant buffers in RAM. */ @@ -262,6 +263,7 @@ struct pipe_resource *r300_user_buffer_create(struct pipe_screen *screen, rbuf->b.user_ptr = ptr; rbuf->domain = R300_DOMAIN_GTT; rbuf->buf = NULL; + rbuf->buf_size = size; rbuf->constant_buffer = NULL; return &rbuf->b.b.b; } -- cgit v1.2.3