Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / mesa / drivers / dri / common / texmem.h
index 705cd4d3445f89d9262635fe1556cfdacb0dd9db..9c065da8b4f65f1e2468e3a58937826730b146bd 100644 (file)
@@ -28,7 +28,6 @@
  *    Kevin E. Martin <kem@users.sourceforge.net>
  *    Gareth Hughes <gareth@nvidia.com>
  */
-/* $XFree86:$ */
 
 /** \file texmem.h
  * Public interface to the DRI texture memory management routines.
@@ -39,8 +38,8 @@
 #ifndef DRI_TEXMEM_H
 #define DRI_TEXMEM_H
 
-#include "mtypes.h"
-#include "mm.h"
+#include "main/mtypes.h"
+#include "main/mm.h"
 #include "xf86drm.h"
 
 struct dri_tex_heap;
@@ -66,8 +65,14 @@ struct dri_texture_object {
                                         * texture memory in use by another context.
                                         * A placeholder should have a heap and a memBlock.
                                         */
-       PMemBlock   memBlock;           /**< Memory block containing texture */
-       unsigned    bound;              /**< Texture unit currently bound to */
+       struct mem_block *memBlock;     /**< Memory block containing texture */
+
+        unsigned    reserved;          /**< Cannot be swapped out by user contexts.  */
+
+       unsigned    bound;              /**< Bitmask indicating which tex units
+                                        * this texture object is bound to.
+                                        * Bit 0 = unit 0, Bit 1 = unit 1, etc
+                                        */
 
        unsigned    totalSize;          /**< Total size of the texture,
                                         * including all mipmap levels 
@@ -170,7 +175,7 @@ struct dri_tex_heap {
        /** Memory heap used to manage texture memory represented by
         * this texture heap.
         */
-       memHeap_t    * memory_heap;
+       struct mem_block * memory_heap;
 
        /** List of objects that we currently believe to be in texture
         * memory.
@@ -285,13 +290,14 @@ void
 driCalculateMaxTextureLevels( driTexHeap * const * heaps,
                              unsigned nr_heaps,
                              struct gl_constants * limits,
-                             unsigned max_bytes_per_texel, 
+                             unsigned max_bytes_per_texel,
                              unsigned max_2D_size,
                              unsigned max_3D_size,
                              unsigned max_cube_size,
                              unsigned max_rect_size,
                              unsigned mipmaps_at_once,
-                             int all_textures_one_heap );
+                             int all_textures_one_heap,
+                             int allow_larger_textures );
 
 void
 driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter );