From 13384b962620ad189ca83f853c949131f59afbac Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Sat, 18 Sep 2021 14:04:00 -0700 Subject: [PATCH] mesa: Prioritize checking for GLES2's uniform transpose error. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The negative API tests ask to transpose a non-matrix uniform, and expect the transpose error rather than the non-matrix error. This may be a test bug about ambiguous results, but since every other driver is presumably doing this too, just follow along. Reviewed-by: Marek Olšák Reviewed-by: Andreas Baierl Part-of: --- src/broadcom/ci/deqp-vc4-rpi3-fails.txt | 1 - src/etnaviv/ci/deqp-etnaviv-gc2000-fails.txt | 1 - .../drivers/i915/ci/deqp-i915-g33-fails.txt | 7 ------- src/gallium/drivers/lima/ci/deqp-lima-fails.txt | 1 - src/mesa/main/uniform_query.cpp | 22 +++++++++++----------- 5 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/broadcom/ci/deqp-vc4-rpi3-fails.txt b/src/broadcom/ci/deqp-vc4-rpi3-fails.txt index 6ffe025..3639251 100644 --- a/src/broadcom/ci/deqp-vc4-rpi3-fails.txt +++ b/src/broadcom/ci/deqp-vc4-rpi3-fails.txt @@ -403,7 +403,6 @@ dEQP-GLES2.functional.draw.draw_arrays.line_loop.multiple_attributes,Fail 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.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 diff --git a/src/etnaviv/ci/deqp-etnaviv-gc2000-fails.txt b/src/etnaviv/ci/deqp-etnaviv-gc2000-fails.txt index 80186be..414d40f 100644 --- a/src/etnaviv/ci/deqp-etnaviv-gc2000-fails.txt +++ b/src/etnaviv/ci/deqp-etnaviv-gc2000-fails.txt @@ -137,7 +137,6 @@ dEQP-GLES2.functional.fragment_ops.random.90,Fail 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.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 diff --git a/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt index 58e0f4b..9d39560 100644 --- a/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt +++ b/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt @@ -22,13 +22,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip,Fail dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center,Fail dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail -# " // GL_INVALID_OPERATION returned -# // ERROR: expected GL_INVALID_VALUE" -# Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(non-matrix uniform) -# Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(non-matrix uniform) -# Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(non-matrix uniform) -dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,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 diff --git a/src/gallium/drivers/lima/ci/deqp-lima-fails.txt b/src/gallium/drivers/lima/ci/deqp-lima-fails.txt index 161b760..215b580 100644 --- a/src/gallium/drivers/lima/ci/deqp-lima-fails.txt +++ b/src/gallium/drivers/lima/ci/deqp-lima-fails.txt @@ -30,7 +30,6 @@ dEQP-GLES2.functional.fragment_ops.depth_stencil.random.7,Fail 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.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 diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 206f6a8..c63cacf 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -1677,6 +1677,17 @@ _mesa_uniform_matrix(GLint location, GLsizei count, if (uni == NULL) return; + /* GL_INVALID_VALUE is generated if `transpose' is not GL_FALSE. + * http://www.khronos.org/opengles/sdk/docs/man/xhtml/glUniform.xml + */ + if (transpose) { + if (ctx->API == API_OPENGLES2 && ctx->Version < 30) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glUniformMatrix(matrix transpose is not GL_FALSE)"); + return; + } + } + if (!uni->type->is_matrix()) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix(non-matrix uniform)"); @@ -1699,17 +1710,6 @@ _mesa_uniform_matrix(GLint location, GLsizei count, return; } - /* GL_INVALID_VALUE is generated if `transpose' is not GL_FALSE. - * http://www.khronos.org/opengles/sdk/docs/man/xhtml/glUniform.xml - */ - if (transpose) { - if (ctx->API == API_OPENGLES2 && ctx->Version < 30) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glUniformMatrix(matrix transpose is not GL_FALSE)"); - return; - } - } - /* Section 2.11.7 (Uniform Variables) of the OpenGL 4.2 Core Profile spec * says: * -- 2.7.4