i965: Add _CACHE_ in brw_cache_id enum names.
[mesa.git] / src / mesa / drivers / dri / i965 / intel_tex_obj.h
index b9499126a546be8fae6e13c9eedeb11cefeed5f6..e078e0a75533d8026ac2f38fcc4c4b7747db7eef 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
  *
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2003 VMware, Inc.
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -18,7 +18,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -44,8 +44,8 @@ struct intel_texture_object
    unsigned int validated_first_level;
    unsigned int validated_last_level;
 
-   /* On validation any active images held in main memory or in other
-    * regions will be copied to this region and the old storage freed.
+   /* The miptree of pixel data for the texture (if !needs_validate).  After
+    * validation, the images will also have references to the same mt.
     */
    struct intel_mipmap_tree *mt;
 
@@ -54,6 +54,12 @@ struct intel_texture_object
     * might not all be the mipmap tree above.
     */
    bool needs_validate;
+
+   /* Mesa format for the validated texture object. For non-views this
+    * will always be the same as mt->format. For views, it may differ
+    * since the mt is shared across views with differing formats.
+    */
+   mesa_format _Format;
 };