summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2013-11-25 16:31:26 -0700
committerBrian Paul <brianp@vmware.com>2013-12-13 12:31:54 -0700
commitbb5947de995d6425a681e591ed9566688772a3ca (patch)
tree0de72c8372d82c6f1f868ef9ab35e6b63790f943 /src/mesa/main/mipmap.c
parent320ec1deacd97fd32f14331030660f8fceb7235c (diff)
downloadexternal_mesa3d-bb5947de995d6425a681e591ed9566688772a3ca.zip
external_mesa3d-bb5947de995d6425a681e591ed9566688772a3ca.tar.gz
external_mesa3d-bb5947de995d6425a681e591ed9566688772a3ca.tar.bz2
mesa: consolidate multiple next_mipmap_level_size
Refactor to make next_mipmap_level_size defined in mipmap.c a _mesa_ helper function that can then be used by texture_view Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r--src/mesa/main/mipmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 180f891..0330157 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1767,8 +1767,8 @@ _mesa_generate_mipmap_level(GLenum target,
* compute next (level+1) image size
* \return GL_FALSE if no smaller size can be generated (eg. src is 1x1x1 size)
*/
-static GLboolean
-next_mipmap_level_size(GLenum target, GLint border,
+GLboolean
+_mesa_next_mipmap_level_size(GLenum target, GLint border,
GLint srcWidth, GLint srcHeight, GLint srcDepth,
GLint *dstWidth, GLint *dstHeight, GLint *dstDepth)
{
@@ -1911,7 +1911,7 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target,
srcDepth = srcImage->Depth;
border = srcImage->Border;
- nextLevel = next_mipmap_level_size(target, border,
+ nextLevel = _mesa_next_mipmap_level_size(target, border,
srcWidth, srcHeight, srcDepth,
&dstWidth, &dstHeight, &dstDepth);
if (!nextLevel)
@@ -2102,7 +2102,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
srcDepth = srcImage->Depth;
border = srcImage->Border;
- nextLevel = next_mipmap_level_size(target, border,
+ nextLevel = _mesa_next_mipmap_level_size(target, border,
srcWidth, srcHeight, srcDepth,
&dstWidth, &dstHeight, &dstDepth);
if (!nextLevel)