diff options
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 8 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 02af5d7f2f8..6f4231d76e3 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -63,7 +63,7 @@ static void r300_release_referenced_objects(struct r300_context *r300) } /* Manually-created vertex buffers. */ - pipe_resource_reference(&r300->dummy_vb.buffer, NULL); + pipe_vertex_buffer_unreference(&r300->dummy_vb); pb_reference(&r300->vbo, NULL); r300->context.delete_depth_stencil_alpha_state(&r300->context, @@ -468,7 +468,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, vb.height0 = 1; vb.depth0 = 1; - r300->dummy_vb.buffer = screen->resource_create(screen, &vb); + r300->dummy_vb.buffer.resource = screen->resource_create(screen, &vb); r300->context.set_vertex_buffers(&r300->context, 0, 1, &r300->dummy_vb); } diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 671aa623bd3..63f12de0a86 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -966,7 +966,7 @@ void r300_emit_vertex_arrays(struct r300_context* r300, int offset, } for (i = 0; i < vertex_array_count; i++) { - buf = r300_resource(vbuf[velem[i].vertex_buffer_index].buffer); + buf = r300_resource(vbuf[velem[i].vertex_buffer_index].buffer.resource); OUT_CS_RELOC(buf); } } else { @@ -1018,7 +1018,7 @@ void r300_emit_vertex_arrays(struct r300_context* r300, int offset, } for (i = 0; i < vertex_array_count; i++) { - buf = r300_resource(vbuf[velem[i].vertex_buffer_index].buffer); + buf = r300_resource(vbuf[velem[i].vertex_buffer_index].buffer.resource); OUT_CS_RELOC(buf); } } @@ -1381,7 +1381,7 @@ validate: struct pipe_resource *buf; for (; vbuf != last; vbuf++) { - buf = vbuf->buffer; + buf = vbuf->buffer.resource; if (!buf) continue; diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 9702a2e32ed..1d3e676e322 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -373,7 +373,7 @@ static void r300_draw_arrays_immediate(struct r300_context *r300, /* Map the buffer. */ if (!map[vbi]) { map[vbi] = (uint32_t*)r300->rws->buffer_map( - r300_resource(vbuf->buffer)->buf, + r300_resource(vbuf->buffer.resource)->buf, r300->cs, PIPE_TRANSFER_READ | PIPE_TRANSFER_UNSYNCHRONIZED); map[vbi] += (vbuf->buffer_offset / 4) + stride[i] * info->start; } @@ -741,13 +741,13 @@ static unsigned r300_max_vertex_count(struct r300_context *r300) unsigned size, max_count, value; /* We're not interested in constant and per-instance attribs. */ - if (!vb->buffer || + if (!vb->buffer.resource || !vb->stride || velems[i].instance_divisor) { continue; } - size = vb->buffer->width0; + size = vb->buffer.resource->width0; /* Subtract buffer_offset. */ value = vb->buffer_offset; diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index 95ada570e66..4af1c46856e 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -111,7 +111,7 @@ r300_buffer_transfer_map( struct pipe_context *context, /* We changed the buffer, now we need to bind it where the old one was bound. */ for (i = 0; i < r300->nr_vertex_buffers; i++) { - if (r300->vertex_buffer[i].buffer == &rbuf->b.b) { + if (r300->vertex_buffer[i].buffer.resource == &rbuf->b.b) { r300->vertex_arrays_dirty = TRUE; break; } diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 709cbd1a1f4..b3bfafd376a 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1773,12 +1773,12 @@ static void r300_set_vertex_buffers_swtcl(struct pipe_context* pipe, return; for (i = 0; i < count; i++) { - if (buffers[i].user_buffer) { + if (buffers[i].is_user_buffer) { draw_set_mapped_vertex_buffer(r300->draw, start_slot + i, - buffers[i].user_buffer, ~0); - } else if (buffers[i].buffer) { + buffers[i].buffer.user, ~0); + } else if (buffers[i].buffer.resource) { draw_set_mapped_vertex_buffer(r300->draw, start_slot + i, - r300_resource(buffers[i].buffer)->malloced_buffer, ~0); + r300_resource(buffers[i].buffer.resource)->malloced_buffer, ~0); } } } |