summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-11-26 19:24:57 +0100
committerMichal Krol <michal@vmware.com>2009-11-26 20:41:41 +0100
commit3bae72e20493aeb683e16297d67648e59a817b76 (patch)
treee68e94ef934124390126f0d17790b859baadae31 /src/gallium
parent75df599e30bda03b40c0442eff3e39ec84397ede (diff)
draw: Fix max_index check.
We want to fallback to draw splitting when vertex element indices might be too high for atomic draw path (currently limited to 4095).
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_vcache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_vcache.c b/src/gallium/auxiliary/draw/draw_pt_vcache.c
index d3f179ced1..757c487454 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vcache.c
+++ b/src/gallium/auxiliary/draw/draw_pt_vcache.c
@@ -346,7 +346,8 @@ vcache_check_run( struct draw_pt_front_end *frontend,
vcache->fetch_max,
draw_count);
- if (max_index == 0xffffffff ||
+ if (max_index >= DRAW_PIPE_MAX_VERTICES ||
+ fetch_count >= UNDEFINED_VERTEX_ID ||
fetch_count > draw_count) {
if (0) debug_printf("fail\n");
goto fail;