summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2018-02-27 11:24:44 -0800
committerIan Romanick <[email protected]>2018-04-11 16:20:42 -0700
commitfa44941072cb43c14c749cc991a7e4001c57f5ca (patch)
tree1fbf6237f63541b7420269b1d076495b1c801356 /src/mesa
parent377da9eb785d52904735cd62c0c7b205404c39d2 (diff)
mesa: Silence unused parameter warning in compressedteximage_only_format
Passing ctx to compressedteximage_only_format was the only use of the ctx parameter in _mesa_format_no_online_compression, so that parameter had to go too. ../../SOURCE/master/src/mesa/main/teximage.c: In function ‘compressedteximage_only_format’: ../../SOURCE/master/src/mesa/main/teximage.c:1355:57: warning: unused parameter ‘ctx’ [-Wunused-parameter] compressedteximage_only_format(const struct gl_context *ctx, GLenum format) ^~~ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/formatquery.c2
-rw-r--r--src/mesa/main/teximage.c16
-rw-r--r--src/mesa/main/teximage.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 834f11118ed..3b000fac5c4 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -502,7 +502,7 @@ _is_resource_supported(struct gl_context *ctx, GLenum target,
/* additional checks for compressed textures */
if (_mesa_is_compressed_format(ctx, internalformat) &&
(!_mesa_target_can_be_compressed(ctx, target, internalformat, NULL) ||
- _mesa_format_no_online_compression(ctx, internalformat)))
+ _mesa_format_no_online_compression(internalformat)))
return false;
break;
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index f560512fb48..bec1274f398 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1353,7 +1353,7 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target,
* Return true if the format is only valid for glCompressedTexImage.
*/
static bool
-compressedteximage_only_format(const struct gl_context *ctx, GLenum format)
+compressedteximage_only_format(GLenum format)
{
switch (format) {
case GL_PALETTE4_RGB8_OES:
@@ -1376,11 +1376,11 @@ compressedteximage_only_format(const struct gl_context *ctx, GLenum format)
* Return true if the format doesn't support online compression.
*/
bool
-_mesa_format_no_online_compression(const struct gl_context *ctx, GLenum format)
+_mesa_format_no_online_compression(GLenum format)
{
return _mesa_is_astc_format(format) ||
_mesa_is_etc2_format(format) ||
- compressedteximage_only_format(ctx, format);
+ compressedteximage_only_format(format);
}
/* Writes to an GL error pointer if non-null and returns whether or not the
@@ -1980,7 +1980,7 @@ texture_error_check( struct gl_context *ctx,
"glTexImage%dD(target can't be compressed)", dimensions);
return GL_TRUE;
}
- if (_mesa_format_no_online_compression(ctx, internalFormat)) {
+ if (_mesa_format_no_online_compression(internalFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexImage%dD(no compression for format)", dimensions);
return GL_TRUE;
@@ -2253,7 +2253,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
}
if (_mesa_is_format_compressed(texImage->TexFormat)) {
- if (_mesa_format_no_online_compression(ctx, texImage->InternalFormat)) {
+ if (_mesa_format_no_online_compression(texImage->InternalFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(no compression for format)", callerName);
return GL_TRUE;
@@ -2530,7 +2530,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
"glCopyTexImage%dD(target can't be compressed)", dimensions);
return GL_TRUE;
}
- if (_mesa_format_no_online_compression(ctx, internalFormat)) {
+ if (_mesa_format_no_online_compression(internalFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%dD(no compression for format)", dimensions);
return GL_TRUE;
@@ -2612,7 +2612,7 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
}
if (_mesa_is_format_compressed(texImage->TexFormat)) {
- if (_mesa_format_no_online_compression(ctx, texImage->InternalFormat)) {
+ if (_mesa_format_no_online_compression(texImage->InternalFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(no compression for format)", caller);
return GL_TRUE;
@@ -4848,7 +4848,7 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
return GL_TRUE;
}
- if (compressedteximage_only_format(ctx, format)) {
+ if (compressedteximage_only_format(format)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(format=%s cannot be updated)",
callerName, _mesa_enum_to_string(format));
return GL_TRUE;
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index bf790af2766..266a9f3d83d 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -221,7 +221,7 @@ _mesa_legal_texture_base_format_for_target(struct gl_context *ctx,
GLenum internalFormat);
bool
-_mesa_format_no_online_compression(const struct gl_context *ctx, GLenum format);
+_mesa_format_no_online_compression(GLenum format);
GLboolean
_mesa_is_renderable_texture_format(const struct gl_context *ctx,