vbo: Declare the index range invalid for DrawIndirect
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 18 May 2016 05:24:59 +0000 (22:24 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 24 May 2016 02:12:34 +0000 (19:12 -0700)
Right now, we're just setting the range to [0, MAX_UINT32] which, while
correct isn't helpful.  With DrawIndirect, you can't really know what the
actual range is so we may as well flag it as being an invalid range.  This
is what we do for draws with index buffer which is similar (the indices
aren't statically known) if a bit simpler.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/vbo/vbo_context.c

index 9f807a17512be4e994329e2ab60856f31af2d424..ae5d26530876f93a87033c67a53390b44e4543a1 100644 (file)
@@ -170,7 +170,7 @@ vbo_draw_indirect_prims(struct gl_context *ctx,
    }
 
    vbo->draw_prims(ctx, prim, draw_count,
-                   ib, GL_TRUE, 0, ~0,
+                   ib, false, ~0, ~0,
                    NULL, 0,
                    ctx->DrawIndirectBuffer);