[Mesa-dev] [PATCH 1/3] st/mesa: notify u_vbuf/driver that draw index bounds are unknown for indirect
Marek Olšák
maraeo at gmail.com
Tue Jul 17 06:00:37 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/state_tracker/st_draw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index dee69783ada..eb52d9505b6 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -254,20 +254,21 @@ st_indirect_draw_vbo(struct gl_context *ctx,
assert(stride);
prepare_draw(st, ctx);
if (st->vertex_array_out_of_memory)
return;
memset(&indirect, 0, sizeof(indirect));
util_draw_init_info(&info);
info.start = 0; /* index offset / index size */
+ info.max_index = ~0u; /* so that u_vbuf can tell that it's unknown */
if (ib) {
struct gl_buffer_object *bufobj = ib->obj;
/* indices are always in a real VBO */
assert(_mesa_is_bufferobj(bufobj));
info.index_size = ib->index_size;
info.index.resource = st_buffer_object(bufobj)->buffer;
info.start = pointer_to_offset(ib->ptr) / info.index_size;
--
2.17.1
More information about the mesa-dev
mailing list