svga: implement an index buffer translation cache
[mesa.git] / src / gallium / drivers / svga / svga_resource_buffer.h
index daf9c18a95a2629b6756386736b4776547d30807..69075888892056e8167fd9e22f6a6cd3b193f290 100644 (file)
@@ -192,6 +192,17 @@ struct svga_buffer
    unsigned size;  /**< Approximate size in bytes */
 
    boolean dirty;  /**< Need to do a readback before mapping? */
+
+   /** In some cases we try to keep the results of the translate_indices()
+    * function from svga_draw_elements.c
+    */
+   struct {
+      enum pipe_prim_type orig_prim, new_prim;
+      struct pipe_resource *buffer;
+      unsigned index_size;
+      unsigned offset;  /**< first index */
+      unsigned count;   /**< num indices */
+   } translated_indices;
 };