diff options
author | Brian Paul <[email protected]> | 2018-01-17 15:15:54 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-18 15:07:17 -0700 |
commit | 9e6efdd1776cb76386d8aa774926c77aa2db7804 (patch) | |
tree | f704b00b1bd0a7b3a919a6276038cb462bbe8ba6 /src/mesa/vbo/vbo_save_loopback.c | |
parent | 26bde1e354041558aae7b2ab004531055b4562b6 (diff) |
vbo: fix VBO optimization regression
The optimization in change 8e4efdc895ea ("vbo: optimize some display
list drawing") missed the loopback case. This is used when the
glBegin/End primitive doesn't have a uniform set of vertex attributes.
The new Piglit gl-1.0-dlist-materials test hits this.
So check the aligned_vertex_buffer_offset(list) value and adjust the
buffer offset accordingly.
We also need to remove the 'start == 0' assertion in the loopback
code since it no longer applies.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_loopback.c')
-rw-r--r-- | src/mesa/vbo/vbo_save_loopback.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c index 1dae91b0b77..9c0e937fe40 100644 --- a/src/mesa/vbo/vbo_save_loopback.c +++ b/src/mesa/vbo/vbo_save_loopback.c @@ -107,17 +107,17 @@ loopback_prim(struct gl_context *ctx, GLuint k; if (0) - printf("loopback prim %s(%s,%s) verts %d..%d\n", + printf("loopback prim %s(%s,%s) verts %d..%d vsize %d\n", _mesa_lookup_prim_by_nr(prim->mode), prim->begin ? "begin" : "..", prim->end ? "end" : "..", - start, end); + start, end, + vertex_size); if (prim->begin) { CALL_Begin(GET_DISPATCH(), (prim->mode)); } else { - assert(start == 0); start += wrap_count; } |