diff options
author | Brian Paul <[email protected]> | 2015-01-02 16:56:12 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-01-05 13:50:54 -0700 |
commit | 3a400cbb662ff054f3732d3737af944f9a2d332f (patch) | |
tree | ab4be322c3ae0f6ee4e2e0f71effab080c731652 /src | |
parent | d0fa559e49799a13e56b65aa3c389e70926455c9 (diff) |
mesa: add _mesa_base_tex_image() helper function
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/teximage.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index 4b27381a0b9..caca9710f9a 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); |