From ce9b4296e125a15536180b6d6b01d0ebee3386cb Mon Sep 17 00:00:00 2001 From: Brendan Dougherty Date: Wed, 11 Nov 2020 11:26:39 -0600 Subject: [PATCH] mesa: Fix vertex_format_to_pipe_format index. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrects the index into the vertex_formats table for `integer` and `normalized` values other than 0 or 1. Fixes: e6448f993b1 ("mesa: translate into gallium vertex formats in mesa/main") Reviewed-by: Marek Olšák Reviewed-by: Eric Anholt Part-of: (cherry picked from commit 9edb6e1be0f8ac65496e1f0da6c78376d81d70ff) --- .pick_status.json | 2 +- src/mesa/main/varray.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c09e1101a31..e15d0d6fb0e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2956,7 +2956,7 @@ "description": "mesa: Fix vertex_format_to_pipe_format index.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "e6448f993b157a6d3757b69d5d4c2424e8af737e" }, diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index c50fd8da646..bf951b87dcb 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -459,8 +459,7 @@ static const uint16_t vertex_formats[][4][4] = { */ static enum pipe_format vertex_format_to_pipe_format(GLubyte size, GLenum16 type, GLenum16 format, - GLboolean normalized, GLboolean integer, - GLboolean doubles) + bool normalized, bool integer, bool doubles) { assert(size >= 1 && size <= 4); assert(format == GL_RGBA || format == GL_BGRA); @@ -674,8 +673,8 @@ validate_array_format(struct gl_context *ctx, const char *func, struct gl_vertex_array_object *vao, GLuint attrib, GLbitfield legalTypesMask, GLint sizeMin, GLint sizeMax, - GLint size, GLenum type, GLboolean normalized, - GLboolean integer, GLboolean doubles, + GLint size, GLenum type, bool normalized, + bool integer, bool doubles, GLuint relativeOffset, GLenum format) { GLbitfield typeBit;