Mesa (master): mesa: add gl_texture_image::Face, Level fields

Eric Anholt anholt at kemper.freedesktop.org
Wed Aug 24 17:44:56 UTC 2011


Module: Mesa
Branch: master
Commit: a231d245514b43cf547ccb996b68efc0186e6821
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a231d245514b43cf547ccb996b68efc0186e6821

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Jul 14 20:57:34 2011 -0600

mesa: add gl_texture_image::Face, Level fields

Several drivers have these fields in their subclasses of gl_texture_image.
They'll be useful for core Mesa too...

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/main/mtypes.h   |    3 +++
 src/mesa/main/teximage.c |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8b36503..f2eb889 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1279,6 +1279,9 @@ struct gl_texture_image
    GLboolean _IsPowerOfTwo;	/**< Are all dimensions powers of two? */
 
    struct gl_texture_object *TexObject;  /**< Pointer back to parent object */
+   GLuint Level;                /**< Which mipmap level am I? */
+   /** Cube map face: index into gl_texture_object::Image[] array */
+   GLuint Face;
 
    FetchTexelFuncC FetchTexelc;	/**< GLchan texel fetch function pointer */
    FetchTexelFuncF FetchTexelf;	/**< Float texel fetch function pointer */
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 27717cf..a005d29 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -571,6 +571,8 @@ _mesa_set_tex_image(struct gl_texture_object *tObj,
 
    /* Set the 'back' pointer */
    texImage->TexObject = tObj;
+   texImage->Level = level;
+   texImage->Face = face;
 }
 
 




More information about the mesa-commit mailing list