summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-02 16:22:54 +0200
committerMarek Olšák <[email protected]>2017-04-17 01:22:11 +0200
commit5438e39fae4faaae522cdec3edfd34c0478464e4 (patch)
treeb0e8c45855e72be7781a1967ff0dfb9a7cfce80f /src/gallium/drivers
parent1c94d29984f353b49f6e976553e9ab779e4885d3 (diff)
radeonsi: don't allow user indices with indirect draws
Not possible with GL and it will make future gallium rework easier. (also it's something I wouldn't like to support) Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 0ada60afac9..9b7b52c3597 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -1220,13 +1220,13 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
ib_tmp.index_size = 2;
ib = &ib_tmp;
} else if (ib->user_buffer && !ib->buffer) {
- unsigned start, count, start_offset;
+ unsigned start_offset;
- si_get_draw_start_count(sctx, info, &start, &count);
- start_offset = start * ib->index_size;
+ assert(!info->indirect);
+ start_offset = info->start * ib->index_size;
u_upload_data(ctx->stream_uploader, start_offset,
- count * ib->index_size,
+ info->count * ib->index_size,
sctx->screen->b.info.tcc_cache_line_size,
(char*)ib->user_buffer + start_offset,
&ib_tmp.offset, &ib_tmp.buffer);