summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/get.c12
-rw-r--r--src/mesa/main/get.h3
-rw-r--r--src/mesa/main/getstring.c26
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp3
4 files changed, 40 insertions, 4 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index f213002d9f8..b32552a9cb8 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -2678,8 +2678,6 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
case GL_TEXTURE_BINDING_RECTANGLE: {
int target;
- if (ctx->API != API_OPENGL_CORE)
- goto invalid_enum;
target = tex_binding_to_index(ctx, pname);
if (target < 0)
goto invalid_enum;
@@ -2771,6 +2769,16 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
_mesa_ClientActiveTexture(GL_TEXTURE0 + curTexUnitSave);
return TYPE_INT;
}
+ case GL_TEXTURE_MATRIX:
+ if (index >= ARRAY_SIZE(ctx->TextureMatrixStack))
+ goto invalid_enum;
+ v->value_matrix = ctx->TextureMatrixStack[index].Top;
+ return TYPE_MATRIX;
+ case GL_TRANSPOSE_TEXTURE_MATRIX:
+ if (index >= ARRAY_SIZE(ctx->TextureMatrixStack))
+ goto invalid_enum;
+ v->value_matrix = ctx->TextureMatrixStack[index].Top;
+ return TYPE_MATRIX_T;
}
invalid_enum:
diff --git a/src/mesa/main/get.h b/src/mesa/main/get.h
index 34cb9381fed..898fb49cdb3 100644
--- a/src/mesa/main/get.h
+++ b/src/mesa/main/get.h
@@ -69,6 +69,9 @@ extern void GLAPIENTRY
_mesa_GetPointerv( GLenum pname, GLvoid **params );
extern void GLAPIENTRY
+_mesa_GetPointerIndexedvEXT( GLenum pname, GLuint index, GLvoid **params );
+
+extern void GLAPIENTRY
_mesa_GetFloati_v(GLenum target, GLuint index, GLfloat *data);
extern void GLAPIENTRY
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index e2f5af29b37..bd02b9db0b0 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -328,6 +328,32 @@ invalid_pname:
}
+void GLAPIENTRY
+_mesa_GetPointerIndexedvEXT( GLenum pname, GLuint index, GLvoid **params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!params)
+ return;
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "%s %s\n", "glGetPointerIndexedvEXT", _mesa_enum_to_string(pname));
+
+ switch (pname) {
+ case GL_TEXTURE_COORD_ARRAY_POINTER:
+ *params = (GLvoid *) ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_TEX(index)].Ptr;
+ break;
+ default:
+ goto invalid_pname;
+ }
+
+ return;
+
+invalid_pname:
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerIndexedvEXT");
+ return;
+}
+
/**
* Returns the current GL error code, or GL_NO_ERROR.
* \return current error code
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index cecca5e0aa9..0702c6de0a3 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -1094,7 +1094,7 @@ const struct function common_desktop_functions_possible[] = {
//{ "glCopyMultiTexSubImage3DEXT", 12, -1 },
{ "glEnableClientStateIndexedEXT", 12, -1 },
{ "glDisableClientStateIndexedEXT", 12, -1 },
- //{ "glGetPointerIndexedvEXT", 12, -1 },
+ { "glGetPointerIndexedvEXT", 12, -1 },
/* GL_EXT_direct_state_access - ARB_vertex_program */
//{ "glNamedProgramStringEXT", 10, -1 },
//{ "glNamedProgramLocalParameter4dEXT", 10, -1 },
@@ -1185,7 +1185,6 @@ const struct function common_desktop_functions_possible[] = {
/* GL_EXT_direct_state_access - GL 3.0 */
//{ "glGetFloati_vEXT", 30, -1 },
//{ "glGetDoublei_vEXT", 30, -1 },
- //{ "glGetPointeri_vEXT", 30, -1 },
//{ "glNamedRenderbufferStorageEXT", 30, -1 },
//{ "glGetNamedRenderbufferParameterivEXT", 30, -1 },
//{ "glNamedRenderbufferStorageMultisampleEXT", 30, -1 },