summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-04-10 21:29:06 +0200
committerMarek Olšák <maraeo@gmail.com>2012-04-24 01:39:21 +0200
commita52b3338c6e51421e3836ae210cd98d9c1ec337b (patch)
tree0b9d312f88760bbdc91bdd3e9d48195bfde6dce0 /src/gallium/drivers/r300/r300_render.c
parent7d36478d888accd18d55cc76ba41af0ad7d3baf8 (diff)
u_vbuf: remove u_vbuf_resource
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index c0f5687d80..d5ba4fab49 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -529,7 +529,7 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
switch (index_size) {
case 1:
- ptr1 = r300_resource(r300->index_buffer.buffer)->b.user_ptr;
+ ptr1 = r300->index_buffer.buffer->user_ptr;
ptr1 += info->start;
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
@@ -553,7 +553,7 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
break;
case 2:
- ptr2 = (uint16_t*)r300_resource(r300->index_buffer.buffer)->b.user_ptr;
+ ptr2 = (uint16_t*)r300->index_buffer.buffer->user_ptr;
ptr2 += info->start;
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
@@ -572,7 +572,7 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
break;
case 4:
- ptr4 = (uint32_t*)r300_resource(r300->index_buffer.buffer)->b.user_ptr;
+ ptr4 = (uint32_t*)r300->index_buffer.buffer->user_ptr;
ptr4 += info->start;
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
@@ -614,7 +614,7 @@ static void r300_draw_elements(struct r300_context *r300,
/* Fallback for misaligned ushort indices. */
if (indexSize == 2 && (start & 1) &&
- !r300_resource(indexBuffer)->b.user_ptr) {
+ !indexBuffer->user_ptr) {
/* If we got here, then orgIndexBuffer == indexBuffer. */
uint16_t *ptr = r300->rws->buffer_map(r300_resource(orgIndexBuffer)->buf,
r300->cs,
@@ -632,10 +632,10 @@ static void r300_draw_elements(struct r300_context *r300,
}
r300->rws->buffer_unmap(r300_resource(orgIndexBuffer)->buf);
} else {
- if (r300_resource(indexBuffer)->b.user_ptr)
+ if (indexBuffer->user_ptr)
r300_upload_index_buffer(r300, &indexBuffer, indexSize,
&start, count,
- r300_resource(indexBuffer)->b.user_ptr);
+ indexBuffer->user_ptr);
}
/* 19 dwords for emit_draw_elements. Give up if the function fails. */
@@ -775,7 +775,7 @@ static void r300_draw_vbo(struct pipe_context* pipe,
if (info.instance_count <= 1) {
if (info.count <= 8 &&
- r300_resource(r300->index_buffer.buffer)->b.user_ptr) {
+ r300->index_buffer.buffer->user_ptr) {
r300_draw_elements_immediate(r300, &info);
} else {
r300_draw_elements(r300, &info, -1);