From 5104ed3dbf18d47736fc67a8e3e317ea18360fa8 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 13 May 2013 23:07:14 -0400 Subject: draw: try to prevent overflows on index buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass in the size of the index buffer, when available, and use it to handle out of bounds conditions. The behavior in the case of an overflow needs to be the same as with other overflows in the vertex processing pipeline meaning that a vertex should still be generated but all attributes in it set to zero. Signed-off-by: Zack Rusin Reviewed-by: José Fonseca Reviewed-by: Roland Scheidegger --- src/gallium/auxiliary/draw/draw_llvm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/auxiliary/draw/draw_llvm.h') diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index d517b29..347fde2 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -271,6 +271,7 @@ typedef int struct vertex_header *io, const struct draw_vertex_buffer vbuffers[PIPE_MAX_ATTRIBS], const unsigned *fetch_elts, + unsigned fetch_max_elt, unsigned fetch_count, unsigned stride, struct pipe_vertex_buffer *vertex_buffers, -- cgit v1.1