diff options
author | Rob Clark <[email protected]> | 2017-05-13 14:43:45 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-05-14 15:10:08 -0400 |
commit | 06a51fb4e5bcec4fa9911b6a20a38deac45d9e21 (patch) | |
tree | d9ef5a21d0300ee584989a374325b2b6599b77bc /src/gallium/drivers/freedreno/freedreno_draw.h | |
parent | d4e4c36c7c96d3e38b7f3ce6f3aac9956b6c9df8 (diff) |
freedreno: fix indexbuffer upload
My fault for not having time to test Marek's patches while they were on
list.
Fixes: 330d0607 ("gallium: remove pipe_index_buffer and set_index_buffer")
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_draw.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.h b/src/gallium/drivers/freedreno/freedreno_draw.h index f2163bb10d1..b293f73b82e 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.h +++ b/src/gallium/drivers/freedreno/freedreno_draw.h @@ -115,7 +115,8 @@ static inline void fd_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring, enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode, - const struct pipe_draw_info *info) + const struct pipe_draw_info *info, + unsigned index_offset) { struct pipe_resource *idx_buffer = NULL; enum pc_di_index_size idx_type = INDEX_SIZE_IGN; @@ -128,7 +129,7 @@ fd_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring, idx_buffer = info->index.resource; idx_type = size2indextype(info->index_size); idx_size = info->index_size * info->count; - idx_offset = info->start * info->index_size; + idx_offset = index_offset + info->start * info->index_size; src_sel = DI_SRC_SEL_DMA; } else { idx_buffer = NULL; |