draw: add assertion, rearrange debug code
This commit is contained in:
@@ -342,19 +342,22 @@ draw_arrays_instanced(struct draw_context *draw,
|
|||||||
unsigned reduced_prim = u_reduced_prim(mode);
|
unsigned reduced_prim = u_reduced_prim(mode);
|
||||||
unsigned instance;
|
unsigned instance;
|
||||||
|
|
||||||
|
assert(instanceCount > 0);
|
||||||
|
|
||||||
if (reduced_prim != draw->reduced_prim) {
|
if (reduced_prim != draw->reduced_prim) {
|
||||||
draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
|
draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
|
||||||
draw->reduced_prim = reduced_prim;
|
draw->reduced_prim = reduced_prim;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0)
|
if (0)
|
||||||
draw_print_arrays(draw, mode, start, MIN2(count, 20));
|
debug_printf("draw_arrays(mode=%u start=%u count=%u):\n",
|
||||||
|
mode, start, count);
|
||||||
|
|
||||||
|
if (0)
|
||||||
|
tgsi_dump(draw->vs.vertex_shader->state.tokens, 0);
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
debug_printf("draw_arrays(mode=%u start=%u count=%u):\n",
|
|
||||||
mode, start, count);
|
|
||||||
tgsi_dump(draw->vs.vertex_shader->state.tokens, 0);
|
|
||||||
debug_printf("Elements:\n");
|
debug_printf("Elements:\n");
|
||||||
for (i = 0; i < draw->pt.nr_vertex_elements; i++) {
|
for (i = 0; i < draw->pt.nr_vertex_elements; i++) {
|
||||||
debug_printf(" %u: src_offset=%u inst_div=%u vbuf=%u format=%s\n",
|
debug_printf(" %u: src_offset=%u inst_div=%u vbuf=%u format=%s\n",
|
||||||
@@ -375,6 +378,9 @@ draw_arrays_instanced(struct draw_context *draw,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0)
|
||||||
|
draw_print_arrays(draw, mode, start, MIN2(count, 20));
|
||||||
|
|
||||||
for (instance = 0; instance < instanceCount; instance++) {
|
for (instance = 0; instance < instanceCount; instance++) {
|
||||||
draw->instance_id = instance + startInstance;
|
draw->instance_id = instance + startInstance;
|
||||||
draw_pt_arrays(draw, mode, start, count);
|
draw_pt_arrays(draw, mode, start, count);
|
||||||
|
Reference in New Issue
Block a user