Mesa (master): mesa: add _mesa_base_tex_image() helper function

Brian Paul brianp at kemper.freedesktop.org
Mon Jan 5 20:55:02 UTC 2015


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

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Jan  2 16:56:12 2015 -0700

mesa: add _mesa_base_tex_image() helper function

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/main/teximage.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 4b27381..caca971 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -114,6 +114,16 @@ _mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
                     GLenum target, GLint level);
 
 
+/**
+ * Return the base-level texture image for the given texture object.
+ */
+static inline const struct gl_texture_image *
+_mesa_base_tex_image(const struct gl_texture_object *texObj)
+{
+   return texObj->Image[0][texObj->BaseLevel];
+}
+
+
 extern GLint
 _mesa_max_texture_levels(struct gl_context *ctx, GLenum target);
 




More information about the mesa-commit mailing list