summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index ac17539f094..ee77c45d03c 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -755,13 +755,22 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
v->value_bool = !!(ctx->Array.VAO->Enabled & VERT_BIT_POINT_SIZE);
break;
- case GL_TEXTURE_COORD_ARRAY_SIZE:
case GL_TEXTURE_COORD_ARRAY_TYPE:
case GL_TEXTURE_COORD_ARRAY_STRIDE:
array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)];
v->value_int = *(GLuint *) ((char *) array + d->offset);
break;
+ case GL_TEXTURE_COORD_ARRAY_SIZE:
+ array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)];
+ v->value_int = array->Format.Size;
+ break;
+
+ case GL_VERTEX_ARRAY_SIZE:
+ array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_POS];
+ v->value_int = array->Format.Size;
+ break;
+
case GL_ACTIVE_TEXTURE_ARB:
v->value_int = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
break;
@@ -969,11 +978,11 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
/* ARB_vertex_array_bgra */
case GL_COLOR_ARRAY_SIZE:
array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_COLOR0];
- v->value_int = array->Format == GL_BGRA ? GL_BGRA : array->Size;
+ v->value_int = array->Format.Format == GL_BGRA ? GL_BGRA : array->Format.Size;
break;
case GL_SECONDARY_COLOR_ARRAY_SIZE:
array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_COLOR1];
- v->value_int = array->Format == GL_BGRA ? GL_BGRA : array->Size;
+ v->value_int = array->Format.Format == GL_BGRA ? GL_BGRA : array->Format.Size;
break;
/* ARB_copy_buffer */