mesa: add EXT_dsa glMultiTexCoordPointerEXT function
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 30 Apr 2019 16:28:15 +0000 (18:28 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Aug 2019 21:03:22 +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/varray.c
src/mesa/main/varray.h

index d6e61b2661d0bfb538bde5c90815e6f7e1ea2727..155b2ade145cf63686811e5cfc402fb0387b10f5 100644 (file)
       <param name="param" type="GLint *" />
    </function>
 
+   <function name="MultiTexCoordPointerEXT">
+      <param name="texunit" type="GLenum" />
+      <param name="size" type="GLint" />
+      <param name="type" type="GLenum" />
+      <param name="stride" type="GLsizei" />
+      <param name="pointer" type="const GLvoid *" />
+   </function>
+
    <!-- OpenGL 1.3 -->
 
    <function name="MatrixLoadTransposefEXT" offset="assign">
index 4c54bf50a9e41b0cc22845972cf3462d777f006a..b184fd8123da3d1d2d06cb7068e229c7f24f8c6d 100644 (file)
@@ -1550,6 +1550,7 @@ offsets = {
     "GetMultiTexGendvEXT": 1514,
     "GetMultiTexGenfvEXT": 1515,
     "GetMultiTexGenivEXT": 1516,
+    "MultiTexCoordPointerEXT": 1517,
 }
 
 functions = [
index d1bc68b020bc9652cadc801a134541363cda8014..4f8a40ba99e23a4b1fe281159e6f3fb98e04d8d0 100644 (file)
@@ -1056,7 +1056,7 @@ const struct function common_desktop_functions_possible[] = {
    { "glCopyTextureSubImage3DEXT", 12, -1 },
    /* GL_EXT_direct_state_access - GL 1.2.1 */
    { "glBindMultiTextureEXT", 12, -1 },
-   //{ "glMultiTexCoordPointerEXT", 12, -1 },
+   { "glMultiTexCoordPointerEXT", 12, -1 },
    { "glMultiTexEnvfEXT", 12, -1 },
    { "glMultiTexEnvfvEXT", 12, -1 },
    { "glMultiTexEnviEXT", 12, -1 },
index fad0c227d49c4e2b349e3f84c44bec444323a65b..61b2bf39af9899424c862e4e45b110ef8d4bf3de 100644 (file)
@@ -1673,6 +1673,32 @@ _mesa_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
 }
 
 
+void GLAPIENTRY
+_mesa_MultiTexCoordPointerEXT(GLenum texunit, GLint size, GLenum type,
+                              GLsizei stride, const GLvoid *ptr)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   const GLint sizeMin = 1;
+   const GLuint unit = texunit - GL_TEXTURE0;
+
+   GLenum format = GL_RGBA;
+   const GLbitfield legalTypes = (SHORT_BIT | INT_BIT |
+                                  HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
+                                  UNSIGNED_INT_2_10_10_10_REV_BIT |
+                                  INT_2_10_10_10_REV_BIT);
+
+   if (!validate_array_and_format(ctx, "glMultiTexCoordPointerEXT",
+                                  VERT_ATTRIB_TEX(unit), legalTypes,
+                                  sizeMin, 4, size, type, stride,
+                                  GL_FALSE, GL_FALSE, GL_FALSE, format, ptr,
+                                  ctx->Array.VAO))
+      return;
+
+   update_array(ctx, VERT_ATTRIB_TEX(unit), format, 4, size, type,
+                stride, GL_FALSE, GL_FALSE, GL_FALSE, ptr);
+}
+
+
 void GLAPIENTRY
 _mesa_EdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *ptr)
 {
index 2831720edfca9f8187c70f0296c7bb9269f2041c..1d1ce5152712f2cd219a4490d00954059fe4b53d 100644 (file)
@@ -142,7 +142,9 @@ _mesa_TexCoordPointer_no_error(GLint size, GLenum type, GLsizei stride,
 extern void GLAPIENTRY
 _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
                       const GLvoid *ptr);
-
+extern void GLAPIENTRY
+_mesa_MultiTexCoordPointerEXT(GLenum texunit, GLint size, GLenum type,
+                              GLsizei stride, const GLvoid *ptr);
 
 extern void GLAPIENTRY
 _mesa_EdgeFlagPointer_no_error(GLsizei stride, const GLvoid *ptr);