From daf1a61e1147fcd5d6849920d4836bee7118c406 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 18 Aug 2016 09:57:54 +0100 Subject: mesa: Cosmetic changes in legal_texobj_target Use bool instead of GLboolean and constify ctx. Signed-off-by: Ian Romanick Reviewed-by: Ilia Mirkin Reviewed-by: Kenneth Graunke --- src/mesa/main/texstorage.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/mesa/main/texstorage.c') diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index e319fa5c334..c43f2d402d6 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -48,19 +48,19 @@ * This is a bit different than legal_teximage_target() when it comes * to cube maps. */ -static GLboolean -legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) +static bool +legal_texobj_target(const struct gl_context *ctx, GLuint dims, GLenum target) { if (dims < 1 || dims > 3) { _mesa_problem(ctx, "invalid dims=%u in legal_texobj_target()", dims); - return GL_FALSE; + return false; } switch (dims) { case 2: switch (target) { case GL_TEXTURE_2D: - return GL_TRUE; + return true; case GL_TEXTURE_CUBE_MAP: return ctx->Extensions.ARB_texture_cube_map; } @@ -68,7 +68,7 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) case 3: switch (target) { case GL_TEXTURE_3D: - return GL_TRUE; + return true; case GL_TEXTURE_2D_ARRAY: return ctx->Extensions.EXT_texture_array; } @@ -76,21 +76,21 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) } if (!_mesa_is_desktop_gl(ctx)) - return GL_FALSE; + return false; switch (dims) { case 1: switch (target) { case GL_TEXTURE_1D: case GL_PROXY_TEXTURE_1D: - return GL_TRUE; + return true; default: - return GL_FALSE; + return false; } case 2: switch (target) { case GL_PROXY_TEXTURE_2D: - return GL_TRUE; + return true; case GL_PROXY_TEXTURE_CUBE_MAP: return ctx->Extensions.ARB_texture_cube_map; case GL_TEXTURE_RECTANGLE: @@ -100,19 +100,19 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_PROXY_TEXTURE_1D_ARRAY: return ctx->Extensions.EXT_texture_array; default: - return GL_FALSE; + return false; } case 3: switch (target) { case GL_PROXY_TEXTURE_3D: - return GL_TRUE; + return true; case GL_PROXY_TEXTURE_2D_ARRAY: return ctx->Extensions.EXT_texture_array; case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: return ctx->Extensions.ARB_texture_cube_map_array; default: - return GL_FALSE; + return false; } default: unreachable("impossible dimensions"); -- cgit v1.2.3