mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXT
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 30 Apr 2019 13:15:04 +0000 (15:15 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Aug 2019 21:03:18 +0000 (17:03 -0400)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mapi/glapi/gen/EXT_direct_state_access.xml
src/mapi/glapi/gen/static_data.py
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/texparam.c
src/mesa/main/texparam.h

index 3eb62d20eef1fcf5e0bf871c061dee2c00659b35..8d567bd881600bbcad6465e49a408abd269c24a2 100644 (file)
       <param name="param" type="const GLfloat*" />
    </function>
 
+   <function name="GetMultiTexParameterivEXT">
+      <param name="texunit" type="GLenum" />
+      <param name="target" type="GLenum" />
+      <param name="pname" type="GLenum" />
+      <param name="params" type="GLint*" />
+   </function>
+
+   <function name="GetMultiTexParameterfvEXT">
+      <param name="texunit" type="GLenum" />
+      <param name="target" type="GLenum" />
+      <param name="pname" type="GLenum" />
+      <param name="params" type="GLfloat*" />
+   </function>
+
    <function name="GetMultiTexImageEXT">
       <param name="texunit" type="GLenum" />
       <param name="target" type="GLenum" />
index ff71436953521c24466cf1c42b8b399f7310f381..5d92f61b4ea51f742cdf984b7a30f37e8ec86d7f 100644 (file)
@@ -1534,6 +1534,8 @@ offsets = {
     "MultiTexSubImage1DEXT": 1498,
     "MultiTexSubImage2DEXT": 1499,
     "MultiTexSubImage3DEXT": 1500,
+    "GetMultiTexParameterivEXT": 1501,
+    "GetMultiTexParameterfvEXT": 1502,
 }
 
 functions = [
index bb5ba961a68a48d37800c835b636c8a381729bef..a0e7bc58f754db409be36785807a55f263cbb285 100644 (file)
@@ -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 },
index a61bd57d7d23ca5e4ab5d93ea92f3a0452dd4aba..9b3f77d1a750dbfa13517f49a8e0251aa3d25a7a 100644 (file)
@@ -2597,6 +2597,26 @@ _mesa_GetTextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, GLfl
    get_tex_parameterfv(ctx, texObj, pname, params, true);
 }
 
+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)
 {
@@ -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)
index a336d2bb6ad52d9887239f171ba7de7e65cd1ca6..fa837261402d66c826f3ebe7c450cfccb60f53c7 100644 (file)
@@ -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 */