Module: Mesa Branch: master Commit: 1ef0341ea7ee08284ebafe4f347643e1190d5777 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ef0341ea7ee08284ebafe4f347643e1190d5777
Author: Maciej Cencora <[email protected]> Date: Sun Oct 25 13:51:45 2009 +0100 r300g: don't hang GPU on misbehaving apps --- src/gallium/drivers/r300/r300_render.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 86aaf84..cbda302 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -112,6 +112,9 @@ boolean r300_draw_range_elements(struct pipe_context* pipe, { struct r300_context* r300 = r300_context(pipe); + if (!u_trim_pipe_prim(mode, &count)) + return false; + r300_update_derived_state(r300); setup_vertex_buffers(r300); @@ -147,6 +150,9 @@ boolean r300_draw_arrays(struct pipe_context* pipe, unsigned mode, { struct r300_context* r300 = r300_context(pipe); + if (!u_trim_pipe_prim(mode, &count)) + return false; + r300_update_derived_state(r300); setup_vertex_buffers(r300); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
