mesa: add ext_dsa GetMultiTexLevelParameterEXT
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 22 May 2019 16:04:33 +0000 (18:04 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 19 Aug 2019 22:50:08 +0000 (18:50 -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 ae25bb61fddf21e97e9efc07040122cf5f37acb0..32fa40949810f58bafc765daf448530e7e6b13a6 100644 (file)
       <param name="pixels" type="GLvoid*" />
    </function>
 
+   <function name="GetMultiTexLevelParameterivEXT">
+      <param name="texunit" type="GLenum" />
+      <param name="target" type="GLenum" />
+      <param name="level" type="GLint" />
+      <param name="pname" type="GLenum" />
+      <param name="params" type="GLint*" />
+   </function>
+
+   <function name="GetMultiTexLevelParameterfvEXT">
+      <param name="texunit" type="GLenum" />
+      <param name="target" type="GLenum" />
+      <param name="level" type="GLint" />
+      <param name="pname" type="GLenum" />
+      <param name="params" type="GLfloat*" />
+   </function>
+
    <function name="MultiTexImage1DEXT">
       <param name="texunit" type="GLenum" />
       <param name="target" type="GLenum" />
index 0c53ef1ac456f76fb7ae80e6cc1ba4de0e5a5f25..c1b3c6a5119b14629bece369fab0fa5801376994 100644 (file)
@@ -1565,6 +1565,8 @@ offsets = {
     "CompressedMultiTexSubImage2DEXT": 1529,
     "CompressedMultiTexSubImage3DEXT": 1530,
     "GetCompressedMultiTexImageEXT": 1531,
+    "GetMultiTexLevelParameterivEXT": 1532,
+    "GetMultiTexLevelParameterfvEXT": 1533,
 }
 
 functions = [
index 6ccdf3f83f82b8a0ade5f7e79356ba6616611709..6ba5180592e1893492bd22bc07645c8fffa1f676 100644 (file)
@@ -1087,8 +1087,8 @@ const struct function common_desktop_functions_possible[] = {
    { "glGetMultiTexImageEXT", 12, -1 },
    { "glGetMultiTexParameterfvEXT", 12, -1 },
    { "glGetMultiTexParameterivEXT", 12, -1 },
-   //{ "glGetMultiTexLevelParameterfvEXT", 12, -1 },
-   //{ "glGetMultiTexLevelParameterivEXT", 12, -1 },
+   { "glGetMultiTexLevelParameterfvEXT", 12, -1 },
+   { "glGetMultiTexLevelParameterivEXT", 12, -1 },
    { "glMultiTexImage3DEXT", 12, -1 },
    { "glMultiTexSubImage3DEXT", 12, -1 },
    { "glCopyMultiTexSubImage3DEXT", 12, -1 },
index 9b3f77d1a750dbfa13517f49a8e0251aa3d25a7a..ade10b2e2b4b18df7f16e5c93110df1fb00bbb82 100644 (file)
@@ -1977,6 +1977,30 @@ _mesa_GetTextureLevelParameterfvEXT(GLuint texture, GLenum target, GLint level,
    *params = (GLfloat) iparam;
 }
 
+void GLAPIENTRY
+_mesa_GetMultiTexLevelParameterfvEXT(GLenum texunit, GLenum target, GLint level,
+                                     GLenum pname, GLfloat *params)
+{
+   struct gl_texture_object *texObj;
+   GLint iparam;
+   GET_CURRENT_CONTEXT(ctx);
+
+   texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+                                                   texunit - GL_TEXTURE0,
+                                                   true,
+                                                   "glGetMultiTexLevelParameterfvEXT");
+   if (!texObj)
+      return;
+
+   if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
+      return;
+
+   get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
+                             pname, &iparam, true);
+
+   *params = (GLfloat) iparam;
+}
+
 void GLAPIENTRY
 _mesa_GetTextureLevelParameteriv(GLuint texture, GLint level,
                                  GLenum pname, GLint *params)
@@ -2015,6 +2039,27 @@ _mesa_GetTextureLevelParameterivEXT(GLuint texture, GLenum target, GLint level,
                              pname, params, true);
 }
 
+void GLAPIENTRY
+_mesa_GetMultiTexLevelParameterivEXT(GLenum texunit, GLenum target, GLint level,
+                                     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,
+                                                   true,
+                                                   "glGetMultiTexLevelParameterivEXT");
+   if (!texObj)
+      return;
+
+   if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
+      return;
+
+   get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
+                             pname, params, true);
+}
+
 
 /**
  * This isn't exposed to the rest of the driver because it is a part of the
index fa837261402d66c826f3ebe7c450cfccb60f53c7..858a5126a84b025e00277d0d31d9ceb6217074fe 100644 (file)
@@ -106,6 +106,16 @@ _mesa_GetTextureLevelParameterivEXT(GLuint texture, GLenum target,
                                     GLint level, GLenum pname,
                                     GLint *params);
 
+extern void GLAPIENTRY
+_mesa_GetMultiTexLevelParameterfvEXT(GLenum texunit, GLenum target,
+                                     GLint level, GLenum pname,
+                                     GLfloat *params);
+
+extern void GLAPIENTRY
+_mesa_GetMultiTexLevelParameterivEXT(GLenum texunit, GLenum target,
+                                     GLint level, GLenum pname,
+                                     GLint *params);
+
 extern void GLAPIENTRY
 _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params );