mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 11:10:10 +01:00
mesa: Fix glGetVertexAttribi(GL_VERTEX_ATTRIB_ARRAY_SIZE)
mesa currently returns 4 when GL_VERTEX_ATTRIB_ARRAY_SIZE is queried
for a vertex array initially set up with size=GL_BGRA. This patch
makes changes to return size=GL_BGRA as required by the spec.
Fixes Khronos OpenGL CTS test: vertex_array_bgra_basic.test
V2: Use array->Format instead of adding a new variable
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit fdd8bebc22)
This commit is contained in:
parent
cda6610d85
commit
b026b6bbfe
1 changed files with 1 additions and 1 deletions
|
|
@ -738,7 +738,7 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
|
|||
case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB:
|
||||
return array->Enabled;
|
||||
case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB:
|
||||
return array->Size;
|
||||
return (array->Format == GL_BGRA) ? GL_BGRA : array->Size;
|
||||
case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB:
|
||||
return array->Stride;
|
||||
case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue