mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 14:58:32 +02:00
mesa: Fix error in target validation of glCompressedTex(ture)SubImage3D() calls
Basically, two different target error checks are chained consecutively, and the second one is executed regardless the result of the first one. This produces an incorrect error if the first check fails but is overrided by the second. This patch conditions the execution of the second check to a successful pass of the first one. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d Reviewed-by: Laura Ekstrand <laura@jlekstrand.net>
This commit is contained in:
parent
a3b53beaa0
commit
b469cf10ef
1 changed files with 2 additions and 1 deletions
|
|
@ -4586,7 +4586,8 @@ compressed_subtexture_target_check(struct gl_context *ctx, GLenum target,
|
|||
* are valid here, which they are not, but of course not mentioned by
|
||||
* core spec.
|
||||
*/
|
||||
if (target != GL_TEXTURE_2D_ARRAY && target != GL_TEXTURE_CUBE_MAP_ARRAY) {
|
||||
if (targetOK && target != GL_TEXTURE_2D_ARRAY &&
|
||||
target != GL_TEXTURE_CUBE_MAP_ARRAY) {
|
||||
bool invalidformat;
|
||||
switch (format) {
|
||||
/* These came from _mesa_is_compressed_format in glformats.c. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue