gallium: util_blit_pixels() takes source sampler view as argument.
[mesa.git] / src / gallium / auxiliary / draw / draw_pt_vcache.c
index 1a0527be63a8380ea9e5962fd7a0d9cf9c71e302..757c48745456d59db25a07084cb1a691d36f07df 100644 (file)
@@ -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;
@@ -394,6 +395,7 @@ vcache_check_run( struct draw_pt_front_end *frontend,
 
          default:
             assert(0);
+            FREE(storage);
             return;
          }
       }
@@ -422,6 +424,7 @@ vcache_check_run( struct draw_pt_front_end *frontend,
 
          default:
             assert(0);
+            FREE(storage);
             return;
          }
       }