mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
mesa: fix fallthrough in glformats
Before908f817918this would fallthrough to GL_INVALID_OPERATION if the validation condition was not met. But since that change it will now only return GL_INVALID_OPERATION if !_mesa_has_EXT_texture_compression_bptc(ctx) is true. This seems unintended. Here we fix up the fallthrough and add the fallthrough comment so this doesn't happen again. Fixes:908f817918("mesa: expose EXT_texture_compression_bptc in GLES") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3005 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5705>
This commit is contained in:
parent
8591adea38
commit
040b07c7fe
1 changed files with 4 additions and 3 deletions
|
|
@ -3059,14 +3059,15 @@ _mesa_gles_error_check_format_and_type(const struct gl_context *ctx,
|
|||
if (ctx->Version <= 20)
|
||||
return GL_INVALID_OPERATION;
|
||||
break;
|
||||
case GL_RGB:
|
||||
if (_mesa_has_OES_texture_float(ctx) && internalFormat == format)
|
||||
break;
|
||||
case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:
|
||||
case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:
|
||||
if (!_mesa_has_EXT_texture_compression_bptc(ctx))
|
||||
return GL_INVALID_OPERATION;
|
||||
break;
|
||||
case GL_RGB:
|
||||
if (_mesa_has_OES_texture_float(ctx) && internalFormat == format)
|
||||
break;
|
||||
/* fallthrough */
|
||||
default:
|
||||
return GL_INVALID_OPERATION;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue