Module: Mesa
Branch: gallium-0.2
Commit: 9106a18f46cd83180b17f4b30f54bd2d5b437db1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9106a18f46cd83180b17f4b30f54bd2d5b437db1

Author: Alan Hourihane <[EMAIL PROTECTED]>
Date:   Thu Dec 11 15:10:55 2008 +0000

gallium: catch vertex overflow higher up

---

 src/gallium/auxiliary/draw/draw_pt_vcache.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pt_vcache.c 
b/src/gallium/auxiliary/draw/draw_pt_vcache.c
index 80d7200..5d268a2 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vcache.c
+++ b/src/gallium/auxiliary/draw/draw_pt_vcache.c
@@ -324,7 +324,7 @@ vcache_check_run( struct draw_pt_front_end *frontend,
    unsigned fetch_count = max_index + 1 - min_index;
    const ushort *transformed_elts;
    ushort *storage = NULL;
-   boolean ok;
+   boolean ok = FALSE;
 
 
    if (0) debug_printf("fetch_count %d fetch_max %d draw_count %d\n", 
fetch_count, 
@@ -413,11 +413,12 @@ vcache_check_run( struct draw_pt_front_end *frontend,
       transformed_elts = storage;
    }
 
-   ok = vcache->middle->run_linear_elts( vcache->middle,
-                                         min_index, /* start */
-                                         fetch_count,
-                                         transformed_elts,
-                                         draw_count );
+   if (fetch_count < UNDEFINED_VERTEX_ID)
+      ok = vcache->middle->run_linear_elts( vcache->middle,
+                                            min_index, /* start */
+                                            fetch_count,
+                                            transformed_elts,
+                                            draw_count );
    
    FREE(storage);
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to