i965: Check for potential vertex array overflow every time
There was a reason why we need to check at the start of every composite operation to see if we have enough space in the array to fit the vertices, which I promptly forgot when moving the code around to make it look pretty. * sigh. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
55c5f1876e
commit
f40f8bcf07
|
|
@ -1836,19 +1836,19 @@ i965_composite(PixmapPtr dest, int srcX, int srcY, int maskX, int maskY,
|
|||
i965_emit_composite_state(scrn);
|
||||
}
|
||||
|
||||
if (intel->vertex_offset == 0) {
|
||||
if (intel->vertex_used &&
|
||||
intel->floats_per_vertex != intel->last_floats_per_vertex) {
|
||||
intel->vertex_index = (intel->vertex_used + intel->floats_per_vertex - 1) / intel->floats_per_vertex;
|
||||
intel->vertex_used = intel->vertex_index * intel->floats_per_vertex;
|
||||
}
|
||||
if (intel->floats_per_vertex != intel->last_floats_per_vertex ||
|
||||
intel_vertex_space(intel) < 3*4*intel->floats_per_vertex) {
|
||||
intel_next_vertex(intel);
|
||||
i965_select_vertex_buffer(intel);
|
||||
intel->vertex_index = 0;
|
||||
}
|
||||
if (intel->vertex_used &&
|
||||
intel->floats_per_vertex != intel->last_floats_per_vertex) {
|
||||
intel->vertex_index = (intel->vertex_used + intel->floats_per_vertex - 1) / intel->floats_per_vertex;
|
||||
intel->vertex_used = intel->vertex_index * intel->floats_per_vertex;
|
||||
}
|
||||
if (intel->floats_per_vertex != intel->last_floats_per_vertex ||
|
||||
intel_vertex_space(intel) < 3*4*intel->floats_per_vertex) {
|
||||
intel_next_vertex(intel);
|
||||
i965_select_vertex_buffer(intel);
|
||||
intel->vertex_index = 0;
|
||||
}
|
||||
|
||||
if (intel->vertex_offset == 0) {
|
||||
OUT_BATCH(BRW_3DPRIMITIVE |
|
||||
BRW_3DPRIMITIVE_VERTEX_SEQUENTIAL |
|
||||
(_3DPRIM_RECTLIST << BRW_3DPRIMITIVE_TOPOLOGY_SHIFT) |
|
||||
|
|
|
|||
Loading…
Reference in New Issue