Module: Mesa
Branch: master
Commit: 3bae72e20493aeb683e16297d67648e59a817b76
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3bae72e20493aeb683e16297d67648e59a817b76

Author: Keith Whitwell <[email protected]>
Date:   Thu Nov 26 19:24:57 2009 +0100

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).

---

 src/gallium/auxiliary/draw/draw_pt_vcache.c |    3 ++-
 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 d3f179c..757c487 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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to