summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/r600_buffer.c4
-rw-r--r--src/gallium/drivers/radeonsi/r600_state_common.c2
-rw-r--r--src/gallium/drivers/radeonsi/r600_translate.c3
3 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_buffer.c b/src/gallium/drivers/radeonsi/r600_buffer.c
index 912c4ebcdc9..7e8e2ca6887 100644
--- a/src/gallium/drivers/radeonsi/r600_buffer.c
+++ b/src/gallium/drivers/radeonsi/r600_buffer.c
@@ -211,10 +211,8 @@ struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
void r600_upload_index_buffer(struct r600_context *rctx,
struct pipe_index_buffer *ib, unsigned count)
{
- struct r600_resource *rbuffer = r600_resource(ib->buffer);
-
u_upload_data(rctx->uploader, 0, count * ib->index_size,
- rbuffer->b.b.user_ptr, &ib->offset, &ib->buffer);
+ ib->user_buffer, &ib->offset, &ib->buffer);
}
void r600_upload_const_buffer(struct r600_context *rctx, struct r600_resource **rbuffer,
diff --git a/src/gallium/drivers/radeonsi/r600_state_common.c b/src/gallium/drivers/radeonsi/r600_state_common.c
index 1970b52312d..05a201ce3bc 100644
--- a/src/gallium/drivers/radeonsi/r600_state_common.c
+++ b/src/gallium/drivers/radeonsi/r600_state_common.c
@@ -731,7 +731,7 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo)
/* Translate or upload, if needed. */
r600_translate_index_buffer(rctx, &ib, info.count);
- if (ib.buffer->user_ptr) {
+ if (ib.user_buffer) {
r600_upload_index_buffer(rctx, &ib, info.count);
}
diff --git a/src/gallium/drivers/radeonsi/r600_translate.c b/src/gallium/drivers/radeonsi/r600_translate.c
index 985f1f6f8dc..8633d770d10 100644
--- a/src/gallium/drivers/radeonsi/r600_translate.c
+++ b/src/gallium/drivers/radeonsi/r600_translate.c
@@ -24,7 +24,6 @@
*/
#include "util/u_index_modify.h"
-#include "util/u_inlines.h"
#include "util/u_upload_mgr.h"
#include "radeonsi_pipe.h"
@@ -43,7 +42,7 @@ void r600_translate_index_buffer(struct r600_context *r600,
&out_offset, &out_buffer, &ptr);
util_shorten_ubyte_elts_to_userptr(
- &r600->context, ib->buffer, 0, ib->offset, count, ptr);
+ &r600->context, ib, 0, ib->offset, count, ptr);
pipe_resource_reference(&ib->buffer, NULL);
ib->buffer = out_buffer;