summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.c15
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.h7
-rw-r--r--src/gallium/auxiliary/util/u_vbuf.c6
-rw-r--r--src/gallium/drivers/r300/r300_render_translate.c7
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.c3
-rw-r--r--src/gallium/drivers/r600/r600_buffer.c8
-rw-r--r--src/gallium/drivers/r600/r600_translate.c3
-rw-r--r--src/gallium/drivers/svga/svga_draw_elements.c4
-rw-r--r--src/gallium/drivers/svga/svga_pipe_draw.c4
9 files changed, 18 insertions, 39 deletions
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index 936e881d9c0..b4b4c91f1ec 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -158,7 +158,6 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
unsigned size,
unsigned *out_offset,
struct pipe_resource **outbuf,
- boolean *flushed,
void **ptr )
{
unsigned alloc_size = align( size, upload->alignment );
@@ -172,10 +171,6 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
alloc_offset + alloc_size);
if (ret != PIPE_OK)
return ret;
-
- *flushed = TRUE;
- } else {
- *flushed = FALSE;
}
offset = MAX2(upload->offset, alloc_offset);
@@ -214,12 +209,11 @@ enum pipe_error u_upload_data( struct u_upload_mgr *upload,
unsigned size,
const void *data,
unsigned *out_offset,
- struct pipe_resource **outbuf,
- boolean *flushed )
+ struct pipe_resource **outbuf)
{
uint8_t *ptr;
enum pipe_error ret = u_upload_alloc(upload, min_out_offset, size,
- out_offset, outbuf, flushed,
+ out_offset, outbuf,
(void**)&ptr);
if (ret != PIPE_OK)
return ret;
@@ -240,8 +234,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
unsigned size,
struct pipe_resource *inbuf,
unsigned *out_offset,
- struct pipe_resource **outbuf,
- boolean *flushed )
+ struct pipe_resource **outbuf)
{
enum pipe_error ret = PIPE_OK;
struct pipe_transfer *transfer = NULL;
@@ -265,7 +258,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
size,
map,
out_offset,
- outbuf, flushed );
+ outbuf);
pipe_buffer_unmap( upload->pipe, transfer );
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.h b/src/gallium/auxiliary/util/u_upload_mgr.h
index 98915139801..b50d3f32c93 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.h
+++ b/src/gallium/auxiliary/util/u_upload_mgr.h
@@ -94,7 +94,6 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
unsigned size,
unsigned *out_offset,
struct pipe_resource **outbuf,
- boolean *flushed,
void **ptr );
@@ -109,8 +108,7 @@ enum pipe_error u_upload_data( struct u_upload_mgr *upload,
unsigned size,
const void *data,
unsigned *out_offset,
- struct pipe_resource **outbuf,
- boolean *flushed );
+ struct pipe_resource **outbuf);
/**
@@ -125,8 +123,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
unsigned size,
struct pipe_resource *inbuf,
unsigned *out_offset,
- struct pipe_resource **outbuf,
- boolean *flushed );
+ struct pipe_resource **outbuf);
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
index 7c87bf8b210..943336d8484 100644
--- a/src/gallium/auxiliary/util/u_vbuf.c
+++ b/src/gallium/auxiliary/util/u_vbuf.c
@@ -195,7 +195,6 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr,
struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0};
struct pipe_resource *out_buffer = NULL;
unsigned i, out_offset, num_verts = max_index + 1 - min_index;
- boolean upload_flushed = FALSE;
memset(&key, 0, sizeof(key));
memset(tr_elem_index, 0xff, sizeof(tr_elem_index));
@@ -263,7 +262,7 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr,
u_upload_alloc(mgr->b.uploader,
key.output_stride * min_index,
key.output_stride * num_verts,
- &out_offset, &out_buffer, &upload_flushed,
+ &out_offset, &out_buffer,
(void**)&out_map);
out_offset -= key.output_stride * min_index;
@@ -600,7 +599,6 @@ u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
/* Upload buffers. */
for (i = 0; i < nr_vbufs; i++) {
unsigned start, end = end_offset[i];
- boolean flushed;
struct pipe_vertex_buffer *real_vb;
uint8_t *ptr;
@@ -615,7 +613,7 @@ u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
ptr = u_vbuf_resource(mgr->b.vertex_buffer[i].buffer)->user_ptr;
u_upload_data(mgr->b.uploader, start, end - start, ptr + start,
- &real_vb->buffer_offset, &real_vb->buffer, &flushed);
+ &real_vb->buffer_offset, &real_vb->buffer);
real_vb->buffer_offset -= start;
}
diff --git a/src/gallium/drivers/r300/r300_render_translate.c b/src/gallium/drivers/r300/r300_render_translate.c
index f8c7558f4b4..c2eb3c547f4 100644
--- a/src/gallium/drivers/r300/r300_render_translate.c
+++ b/src/gallium/drivers/r300/r300_render_translate.c
@@ -33,12 +33,11 @@ void r300_translate_index_buffer(struct r300_context *r300,
struct pipe_resource *out_buffer = NULL;
unsigned out_offset;
void *ptr;
- boolean flushed;
switch (*index_size) {
case 1:
u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
- &out_offset, &out_buffer, &flushed, &ptr);
+ &out_offset, &out_buffer, &ptr);
util_shorten_ubyte_elts_to_userptr(
&r300->context, *index_buffer, index_offset,
@@ -53,7 +52,7 @@ void r300_translate_index_buffer(struct r300_context *r300,
case 2:
if (index_offset) {
u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
- &out_offset, &out_buffer, &flushed, &ptr);
+ &out_offset, &out_buffer, &ptr);
util_rebuild_ushort_elts_to_userptr(&r300->context, *index_buffer,
index_offset, *start,
@@ -68,7 +67,7 @@ void r300_translate_index_buffer(struct r300_context *r300,
case 4:
if (index_offset) {
u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 4,
- &out_offset, &out_buffer, &flushed, &ptr);
+ &out_offset, &out_buffer, &ptr);
util_rebuild_uint_elts_to_userptr(&r300->context, *index_buffer,
index_offset, *start,
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index 2e9e7d7f408..9d8ce62a6d2 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -38,7 +38,6 @@ void r300_upload_index_buffer(struct r300_context *r300,
unsigned count, uint8_t *ptr)
{
unsigned index_offset;
- boolean flushed;
*index_buffer = NULL;
@@ -46,7 +45,7 @@ void r300_upload_index_buffer(struct r300_context *r300,
0, count * index_size,
ptr + (*start * index_size),
&index_offset,
- index_buffer, &flushed);
+ index_buffer);
*start = index_offset / index_size;
}
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c
index a0386fe4b26..b7f0b24ec8c 100644
--- a/src/gallium/drivers/r600/r600_buffer.c
+++ b/src/gallium/drivers/r600/r600_buffer.c
@@ -241,10 +241,9 @@ void r600_upload_index_buffer(struct r600_pipe_context *rctx,
struct pipe_index_buffer *ib, unsigned count)
{
struct r600_resource *rbuffer = r600_resource(ib->buffer);
- boolean flushed;
u_upload_data(rctx->vbuf_mgr->uploader, 0, count * ib->index_size,
- rbuffer->b.user_ptr, &ib->offset, &ib->buffer, &flushed);
+ rbuffer->b.user_ptr, &ib->offset, &ib->buffer);
}
void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resource **rbuffer,
@@ -253,7 +252,6 @@ void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resour
if ((*rbuffer)->b.user_ptr) {
uint8_t *ptr = (*rbuffer)->b.user_ptr;
unsigned size = (*rbuffer)->b.b.b.width0;
- boolean flushed;
*rbuffer = NULL;
@@ -271,12 +269,12 @@ void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resour
}
u_upload_data(rctx->vbuf_mgr->uploader, 0, size, tmpPtr, const_offset,
- (struct pipe_resource**)rbuffer, &flushed);
+ (struct pipe_resource**)rbuffer);
free(tmpPtr);
} else {
u_upload_data(rctx->vbuf_mgr->uploader, 0, size, ptr, const_offset,
- (struct pipe_resource**)rbuffer, &flushed);
+ (struct pipe_resource**)rbuffer);
}
} else {
*const_offset = 0;
diff --git a/src/gallium/drivers/r600/r600_translate.c b/src/gallium/drivers/r600/r600_translate.c
index 9159e452343..94497077cba 100644
--- a/src/gallium/drivers/r600/r600_translate.c
+++ b/src/gallium/drivers/r600/r600_translate.c
@@ -36,12 +36,11 @@ void r600_translate_index_buffer(struct r600_pipe_context *r600,
struct pipe_resource *out_buffer = NULL;
unsigned out_offset;
void *ptr;
- boolean flushed;
switch (ib->index_size) {
case 1:
u_upload_alloc(r600->vbuf_mgr->uploader, 0, count * 2,
- &out_offset, &out_buffer, &flushed, &ptr);
+ &out_offset, &out_buffer, &ptr);
util_shorten_ubyte_elts_to_userptr(
&r600->context, ib->buffer, 0, ib->offset, count, ptr);
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index ba492412b44..1c20881a34d 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -121,7 +121,6 @@ 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,
@@ -130,8 +129,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
count * index_size,
index_buffer,
&index_offset,
- &upload_buffer,
- &flushed );
+ &upload_buffer);
if (ret != PIPE_OK)
goto done;
diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c
index 141734b458c..c61d5d000de 100644
--- a/src/gallium/drivers/svga/svga_pipe_draw.c
+++ b/src/gallium/drivers/svga/svga_pipe_draw.c
@@ -138,7 +138,6 @@ svga_upload_user_buffers(struct svga_context *svga,
if (vb->buffer && svga_buffer_is_user_buffer(vb->buffer)) {
struct svga_buffer *buffer = svga_buffer(vb->buffer);
- boolean flushed;
/*
* Check if already uploaded. Otherwise go ahead and upload.
@@ -153,8 +152,7 @@ svga_upload_user_buffers(struct svga_context *svga,
buffer->uploaded.end - buffer->uploaded.start,
&buffer->b.b,
&buffer->uploaded.offset,
- &buffer->uploaded.buffer,
- &flushed);
+ &buffer->uploaded.buffer);
if (ret)
return ret;