mesa: Throw an error for compressed glGenerateMipmap on GLES2 contexts.

This error is gone from GLES3.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12924>
This commit is contained in:
Emma Anholt 2021-09-18 13:48:41 -07:00 committed by Marge Bot
parent 8a3e94c619
commit 5a39938b00
5 changed files with 13 additions and 8 deletions

View File

@ -404,7 +404,6 @@ dEQP-GLES2.functional.draw.draw_arrays.line_loop.single_attribute,Fail
dEQP-GLES2.functional.fbo.render.texsubimage.after_render_tex2d_rgba,Fail
dEQP-GLES2.functional.fbo.render.texsubimage.between_render_tex2d_rgba,Fail
dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,Fail
dEQP-GLES2.functional.negative_api.vertex_array.vertex_attrib,Fail
dEQP-GLES2.functional.negative_api.vertex_array.vertex_attribv,Fail
dEQP-GLES2.functional.texture.filtering.2d.nearest_mipmap_linear_linear_mirror_rgba8888,Fail

View File

@ -138,7 +138,6 @@ dEQP-GLES2.functional.fragment_ops.random.96,Fail
dEQP-GLES2.functional.fragment_ops.random.97,Fail
dEQP-GLES2.functional.fragment_ops.random.98,Fail
dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,Fail
dEQP-GLES2.functional.rasterization.limits.points,Fail
dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_read_fragment,Fail
dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_read_vertex,Fail

View File

@ -29,11 +29,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail
# Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(non-matrix uniform)
dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
# "GL_INVALID_OPERATION is generated if the zero level array is stored in a compressed internal format.
# // GL_NO_ERROR returned
# // ERROR: expected GL_INVALID_OPERATION"
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,Fail
# Maybe doesn't like the color interpolation in wide lines?
dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide,Fail
dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide,Fail

View File

@ -31,7 +31,6 @@ dEQP-GLES2.functional.fragment_ops.depth_stencil.random.8,Fail
dEQP-GLES2.functional.fragment_ops.depth_stencil.random.9,Fail
dEQP-GLES2.functional.fragment_ops.depth_stencil.write_mask.stencil,Fail
dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,Fail
dEQP-GLES2.functional.shaders.builtin_variable.frontfacing,Fail
dEQP-GLES2.functional.shaders.indexing.matrix_subscript.mat4_dynamic_loop_write_dynamic_loop_read_vertex,Fail
dEQP-GLES2.functional.shaders.indexing.matrix_subscript.mat4_dynamic_loop_write_dynamic_read_vertex,Fail

View File

@ -150,6 +150,19 @@ generate_texture_mipmap(struct gl_context *ctx,
_mesa_enum_to_string(srcImage->InternalFormat));
return;
}
/* The GLES 2.0 spec says:
*
* "If the level zero array is stored in a compressed internal format,
* the error INVALID_OPERATION is generated."
*
* and this text is gone from the GLES 3.0 spec.
*/
if (ctx->API == API_OPENGLES2 && ctx->Version < 30 &&
_mesa_is_format_compressed(srcImage->TexFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "generate mipmaps on compressed texture");
return;
}
}
if (srcImage->Width == 0 || srcImage->Height == 0) {