summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i965/brw_draw_upload.c12
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.c10
-rw-r--r--src/gallium/drivers/svga/svga_draw_elements.c5
-rw-r--r--src/gallium/drivers/svga/svga_state_vdecl.c6
4 files changed, 23 insertions, 10 deletions
diff --git a/src/gallium/drivers/i965/brw_draw_upload.c b/src/gallium/drivers/i965/brw_draw_upload.c
index ebeb1e146a..cf9405470c 100644
--- a/src/gallium/drivers/i965/brw_draw_upload.c
+++ b/src/gallium/drivers/i965/brw_draw_upload.c
@@ -89,13 +89,16 @@ static int brw_prepare_vertices(struct brw_context *brw)
vb->buffer->width0 - vb->buffer_offset :
MAX2(vb->buffer->width0 - vb->buffer_offset,
vb->stride * (max_index + 1 - min_index)));
+ boolean flushed;
- ret = u_upload_buffer( brw->vb.upload_vertex,
+ ret = u_upload_buffer( brw->vb.upload_vertex,
+ 0,
vb->buffer_offset + min_index * vb->stride,
size,
vb->buffer,
&offset,
- &upload_buf );
+ &upload_buf,
+ &flushed );
if (ret)
return ret;
@@ -251,13 +254,16 @@ static int brw_prepare_indices(struct brw_context *brw)
/* Turn userbuffer into a proper hardware buffer?
*/
if (brw_buffer_is_user_buffer(index_buffer)) {
+ boolean flushed;
ret = u_upload_buffer( brw->vb.upload_index,
+ 0,
index_offset,
ib_size,
index_buffer,
&offset,
- &upload_buf );
+ &upload_buf,
+ &flushed );
if (ret)
return ret;
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index f96998195a..11ad87ed89 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -62,15 +62,16 @@ void r300_upload_index_buffer(struct r300_context *r300,
unsigned count)
{
unsigned index_offset;
+ boolean flushed;
uint8_t *ptr = r300_buffer(*index_buffer)->user_buffer;
*index_buffer = NULL;
u_upload_data(r300->upload_ib,
- count * index_size,
+ 0, count * index_size,
ptr + (*start * index_size),
&index_offset,
- index_buffer);
+ index_buffer, &flushed);
*start = index_offset / index_size;
}
@@ -78,6 +79,7 @@ void r300_upload_index_buffer(struct r300_context *r300,
void r300_upload_user_buffers(struct r300_context *r300)
{
int i, nr = r300->velems->count;
+ boolean flushed;
for (i = 0; i < nr; i++) {
struct pipe_vertex_buffer *vb =
@@ -85,9 +87,9 @@ void r300_upload_user_buffers(struct r300_context *r300)
if (r300_buffer_is_user_buffer(vb->buffer)) {
u_upload_data(r300->upload_vb,
- vb->buffer->width0,
+ 0, vb->buffer->width0,
r300_buffer(vb->buffer)->user_buffer,
- &vb->buffer_offset, &vb->buffer);
+ &vb->buffer_offset, &vb->buffer, &flushed);
r300->validate_buffers = TRUE;
r300->vertex_arrays_dirty = TRUE;
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index c7ea014bba..83527c6ef4 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -120,14 +120,17 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
if (index_buffer &&
svga_buffer_is_user_buffer(index_buffer))
{
+ boolean flushed;
assert( index_buffer->width0 >= index_offset + count * index_size );
ret = u_upload_buffer( hwtnl->upload_ib,
+ 0,
index_offset,
count * index_size,
index_buffer,
&index_offset,
- &upload_buffer );
+ &upload_buffer,
+ &flushed );
if (ret)
goto done;
diff --git a/src/gallium/drivers/svga/svga_state_vdecl.c b/src/gallium/drivers/svga/svga_state_vdecl.c
index 3af7bf2b35..958d00393f 100644
--- a/src/gallium/drivers/svga/svga_state_vdecl.c
+++ b/src/gallium/drivers/svga/svga_state_vdecl.c
@@ -57,12 +57,14 @@ upload_user_buffers( struct svga_context *svga )
struct svga_buffer *buffer = svga_buffer(svga->curr.vb[i].buffer);
if (!buffer->uploaded.buffer) {
+ boolean flushed;
ret = u_upload_buffer( svga->upload_vb,
- 0,
+ 0, 0,
buffer->b.b.width0,
&buffer->b.b,
&buffer->uploaded.offset,
- &buffer->uploaded.buffer );
+ &buffer->uploaded.buffer,
+ &flushed);
if (ret)
return ret;