Mesa (master): mesa: Fix vertex_format_to_pipe_format index.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 12 20:26:22 UTC 2020
Module: Mesa
Branch: master
Commit: 9edb6e1be0f8ac65496e1f0da6c78376d81d70ff
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9edb6e1be0f8ac65496e1f0da6c78376d81d70ff
Author: Brendan Dougherty <brandougherty1 at gmail.com>
Date: Wed Nov 11 11:26:39 2020 -0600
mesa: Fix vertex_format_to_pipe_format index.
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 <marek.olsak at amd.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7554>
---
src/mesa/main/varray.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 5c67afc2158..ec5d09ef151 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;
More information about the mesa-commit
mailing list