gallium: more vertex count checks
This commit is contained in:
@@ -165,8 +165,10 @@ void draw_pt_emit( struct pt_emit *emit,
|
||||
*/
|
||||
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
|
||||
|
||||
if (count > 65535) /* FIXME */
|
||||
return FALSE;
|
||||
if (vertex_count > 65535) { /* FIXME */
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* XXX: and work out some way to coordinate the render primitive
|
||||
* between vbuf.c and here...
|
||||
@@ -229,6 +231,11 @@ void draw_pt_emit_linear(struct pt_emit *emit,
|
||||
*/
|
||||
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
|
||||
|
||||
if (count > 65535) { /* FIXME */
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* XXX: and work out some way to coordinate the render primitive
|
||||
* between vbuf.c and here...
|
||||
*/
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -234,8 +234,10 @@ static void fse_run_linear( struct draw_pt_middle_end *middle,
|
||||
*/
|
||||
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
|
||||
|
||||
if (count > 65535) /* FIXME */
|
||||
return FALSE;
|
||||
if (count > 65535) { /* FIXME */
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
|
||||
hw_verts = draw->render->allocate_vertices( draw->render,
|
||||
(ushort)fse->key.output_stride,
|
||||
@@ -296,6 +298,11 @@ fse_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)fse->key.output_stride,
|
||||
(ushort)fetch_count );
|
||||
@@ -350,6 +357,9 @@ static boolean fse_run_linear_elts( struct draw_pt_middle_end *middle,
|
||||
*/
|
||||
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
|
||||
|
||||
if (count > 65535) /* FIXME */
|
||||
return FALSE;
|
||||
|
||||
hw_verts = draw->render->allocate_vertices( draw->render,
|
||||
(ushort)fse->key.output_stride,
|
||||
(ushort)count );
|
||||
|
||||
Reference in New Issue
Block a user