aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-04-30 15:15:04 +0200
committerMarek Olšák <[email protected]>2019-08-06 17:03:18 -0400
commitf28d9ab1a3d486c1c9535fb3dd7d9f49a65c3e96 (patch)
tree29fa13a37cb7314f4bacdc3e63a738c2b4a8beac /src/mesa/main
parent989c3758524d80aa33f0fb86f0b05ccc7b96a5d5 (diff)
mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXT
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp4
-rw-r--r--src/mesa/main/texparam.c42
-rw-r--r--src/mesa/main/texparam.h6
3 files changed, 49 insertions, 3 deletions
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index bb5ba961a68..a0e7bc58f75 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -1085,8 +1085,8 @@ const struct function common_desktop_functions_possible[] = {
//{ "glCopyMultiTexSubImage1DEXT", 12, -1 },
//{ "glCopyMultiTexSubImage2DEXT", 12, -1 },
{ "glGetMultiTexImageEXT", 12, -1 },
- //{ "glGetMultiTexParameterfvEXT", 12, -1 },
- //{ "glGetMultiTexParameterivEXT", 12, -1 },
+ { "glGetMultiTexParameterfvEXT", 12, -1 },
+ { "glGetMultiTexParameterivEXT", 12, -1 },
//{ "glGetMultiTexLevelParameterfvEXT", 12, -1 },
//{ "glGetMultiTexLevelParameterivEXT", 12, -1 },
{ "glMultiTexImage3DEXT", 12, -1 },
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index a61bd57d7d2..9b3f77d1a75 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -2598,6 +2598,26 @@ _mesa_GetTextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, GLfl
}
void GLAPIENTRY
+_mesa_GetMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ false,
+ "glGetMultiTexParameterfvEXT");
+ if (!texObj)
+ return;
+
+ if (!is_texparameteri_target_valid(texObj->Target)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMultiTexParameterfvEXT");
+ return;
+ }
+ get_tex_parameterfv(ctx, texObj, pname, params, true);
+}
+
+void GLAPIENTRY
_mesa_GetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
{
struct gl_texture_object *obj;
@@ -2626,7 +2646,27 @@ _mesa_GetTextureParameterivEXT(GLuint texture, GLenum target, GLenum pname, GLin
return;
}
get_tex_parameteriv(ctx, texObj, pname, params, true);
- }
+}
+
+void GLAPIENTRY
+_mesa_GetMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, GLint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ false,
+ "glGetMultiTexParameterivEXT");
+ if (!texObj)
+ return;
+
+ if (!is_texparameteri_target_valid(texObj->Target)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMultiTexParameterivEXT");
+ return;
+ }
+ get_tex_parameteriv(ctx, texObj, pname, params, true);
+}
void GLAPIENTRY
_mesa_GetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
diff --git a/src/mesa/main/texparam.h b/src/mesa/main/texparam.h
index a336d2bb6ad..fa837261402 100644
--- a/src/mesa/main/texparam.h
+++ b/src/mesa/main/texparam.h
@@ -197,4 +197,10 @@ _mesa_MultiTexParameteriEXT(GLenum texunit, GLenum target, GLenum pname, GLint p
extern void GLAPIENTRY
_mesa_MultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint *params);
+extern void GLAPIENTRY
+_mesa_GetMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
+
+extern void GLAPIENTRY
+_mesa_GetMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, GLint *params);
+
#endif /* TEXPARAM_H */