diff options
author | Maciej Cencora <m.cencora@gmail.com> | 2009-10-25 13:51:45 +0100 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-11-07 11:53:13 -0800 |
commit | 1ef0341ea7ee08284ebafe4f347643e1190d5777 (patch) | |
tree | e1e457315e9813f4e90f77c1a12e3fddf8b9ae54 /src | |
parent | 3445f476977ae403cef9ca15661fa0f96ff50eca (diff) |
r300g: don't hang GPU on misbehaving apps
Diffstat (limited to 'src')
-rw-r--r-- | 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 86aaf841dd6..cbda30227da 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); |