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 <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Ian Romanick 2018-02-27 11:24:44 -08:00
parent 377da9eb78
commit fa44941072
3 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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,