From 0f37e3c3398fd807f3645f3af59e5a189703e5b9 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Sun, 10 Jul 2022 08:02:51 -0700 Subject: [PATCH] mesa: Fix the error check for VertexAttrib*. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was checking "mesa's theoretical max attributes" rather than "the driver's max attributes." Reviewed-by: Adam Jackson Reviewed-by: Marek Olšák Reviewed-by: Jose Maria Casanova Crespo Part-of: --- src/broadcom/ci/broadcom-rpi3-fails.txt | 5 ----- src/mesa/vbo/vbo_exec_api.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/broadcom/ci/broadcom-rpi3-fails.txt b/src/broadcom/ci/broadcom-rpi3-fails.txt index 1c8a6cc5b2d..44783d78f53 100644 --- a/src/broadcom/ci/broadcom-rpi3-fails.txt +++ b/src/broadcom/ci/broadcom-rpi3-fails.txt @@ -25,11 +25,6 @@ dEQP-GLES2.functional.fbo.render.texsubimage.after_render_tex2d_rgba,Fail # A glTexImage, glDraw, glTexSubImage, glDraw sequence into a texture is missing what looks like the first drawing. dEQP-GLES2.functional.fbo.render.texsubimage.between_render_tex2d_rgba,Fail -# "GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS." -# but we didn't generate an error. -dEQP-GLES2.functional.negative_api.vertex_array.vertex_attrib,Fail -dEQP-GLES2.functional.negative_api.vertex_array.vertex_attribv,Fail - # Sampling grid slightly off in test 2? dEQP-GLES2.functional.texture.filtering.2d.nearest_mipmap_linear_linear_mirror_rgba8888,Fail dEQP-GLES2.functional.texture.filtering.2d.nearest_mipmap_linear_linear_repeat_rgba8888,Fail diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 57008119850..cff420ee68e 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -1006,7 +1006,7 @@ static void VertexAttrib4f_nopos(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { GET_CURRENT_CONTEXT(ctx); - if (index < MAX_VERTEX_GENERIC_ATTRIBS) + if (index < ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) ATTRF(VBO_ATTRIB_GENERIC0 + index, 4, x, y, z, w); else ERROR(GL_INVALID_VALUE);