summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-10 05:36:44 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-10 11:27:35 +0100
commit56ba7e913fef0ea2b1bead582108f9ab3ab8263d (patch)
treef65cb5007441ab0a8fc07e6baa13efc71218acbe /src/gallium/drivers/r300/r300_render.c
parentce9c0d280104c8001a3ee360b07218ad3d260e46 (diff)
downloadexternal_mesa3d-56ba7e913fef0ea2b1bead582108f9ab3ab8263d.zip
external_mesa3d-56ba7e913fef0ea2b1bead582108f9ab3ab8263d.tar.gz
external_mesa3d-56ba7e913fef0ea2b1bead582108f9ab3ab8263d.tar.bz2
r300g: consolidate buffers and textures to r300_resource
Transfers and create/destroy are still handled separately.
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 0df3f9a..eda5c48 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -250,7 +250,7 @@ static boolean r300_emit_states(struct r300_context *r300,
if (user_buffers)
r300->upload_vb_validated = TRUE;
if (r300->index_buffer.buffer &&
- r300_buffer(r300->index_buffer.buffer)->b.user_ptr) {
+ r300_resource(r300->index_buffer.buffer)->b.user_ptr) {
r300->upload_ib_validated = TRUE;
}
}
@@ -330,7 +330,7 @@ static boolean immd_is_good_idea(struct r300_context *r300,
if (!checked[vbi]) {
buf = r300->vbuf_mgr->real_vertex_buffer[vbi];
- if (!(r300_buffer(buf)->domain & R300_DOMAIN_GTT)) {
+ if (!(r300_resource(buf)->domain & R300_DOMAIN_GTT)) {
return FALSE;
}
@@ -536,7 +536,7 @@ static void r300_emit_draw_elements(struct r300_context *r300,
(0 << R300_INDX_BUFFER_SKIP_SHIFT));
OUT_CS(offset_dwords << 2);
OUT_CS(count_dwords);
- OUT_CS_RELOC(r300_buffer(indexBuffer));
+ OUT_CS_RELOC(r300_resource(indexBuffer));
END_CS;
}
@@ -570,7 +570,7 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
/* Fallback for misaligned ushort indices. */
if (indexSize == 2 && (start & 1) &&
- !r300_buffer(indexBuffer)->b.user_ptr) {
+ !r300_resource(indexBuffer)->b.user_ptr) {
struct pipe_transfer *transfer;
struct pipe_resource *userbuf;
@@ -592,7 +592,7 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
}
pipe_buffer_unmap(pipe, transfer);
} else {
- if (r300_buffer(indexBuffer)->b.user_ptr)
+ if (r300_resource(indexBuffer)->b.user_ptr)
r300_upload_index_buffer(r300, &indexBuffer, indexSize, &start, count);
}