diff options
author | Ian Romanick <[email protected]> | 2016-08-18 09:57:54 +0100 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-08-26 15:03:15 -0700 |
commit | daf1a61e1147fcd5d6849920d4836bee7118c406 (patch) | |
tree | 3a4317ab7126246c364277213109e7b66a752586 /src/mesa/main/texstorage.c | |
parent | d79c950eebc3614d44e688172ffeb59fb6cfd3fa (diff) |
mesa: Cosmetic changes in legal_texobj_target
Use bool instead of GLboolean and constify ctx.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/texstorage.c')
-rw-r--r-- | src/mesa/main/texstorage.c | 24 |
1 files changed, 12 insertions, 12 deletions
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"); |