diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2008-12-10 12:02:24 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2008-12-10 12:02:24 +0000 |
commit | a8e7852b05f95cc695f3a05692a6ccd36298faf7 (patch) | |
tree | 4cbd4afd285e1888354c3a45b5bf3e95671fa04a /src/gallium/auxiliary/draw/draw_pt_fetch_emit.c | |
parent | e3f5370d637f367dbfe7d21f726e84185ad1e07d (diff) |
gallium: more vertex count checks
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_emit.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_emit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c index 8ab08959e3..5727b91c48 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c @@ -229,6 +229,11 @@ static void fetch_emit_run( struct draw_pt_middle_end *middle, */ draw_do_flush( draw, DRAW_FLUSH_BACKEND ); + if (fetch_count > 65535) { /* FIXME */ + assert(0); + return; + } + hw_verts = draw->render->allocate_vertices( draw->render, (ushort)feme->translate->key.output_stride, (ushort)fetch_count ); @@ -283,6 +288,11 @@ static void fetch_emit_run_linear( struct draw_pt_middle_end *middle, */ draw_do_flush( draw, DRAW_FLUSH_BACKEND ); + if (count > 65535) { /* FIXME */ + assert(0); + return; + } + hw_verts = draw->render->allocate_vertices( draw->render, (ushort)feme->translate->key.output_stride, (ushort)count ); |