[Mesa-dev] [PATCH 3/3] glapi: add GL_ARB_draw_buffers_blend to GL 4.0

Jordan Justen jordan.l.justen at intel.com
Thu Nov 8 13:57:28 PST 2012


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mapi/glapi/gen/AMD_draw_buffers_blend.xml |    8 +++----
 src/mapi/glapi/gen/ARB_draw_buffers_blend.xml |    9 ++++----
 src/mapi/glapi/gen/GL4x.xml                   |   25 ++++++++++++++++++++++
 src/mesa/main/dlist.c                         |   28 ++++++++++++-------------
 src/mesa/main/tests/dispatch_sanity.cpp       |    8 +++----
 5 files changed, 51 insertions(+), 27 deletions(-)

diff --git a/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml b/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml
index 2ed0e0b..1614e4e 100644
--- a/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml
+++ b/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml
@@ -8,24 +8,24 @@
 
 <category name="GL_AMD_draw_buffers_blend" number="366">
 
-    <function name="BlendEquationIndexedAMD" alias="BlendEquationiARB">
+    <function name="BlendEquationIndexedAMD" alias="BlendEquationi">
         <param name="buf" type="GLuint"/>
         <param name="mode" type="GLenum"/>
     </function>
 
-    <function name="BlendEquationSeparateIndexedAMD" alias="BlendEquationSeparateiARB">
+    <function name="BlendEquationSeparateIndexedAMD" alias="BlendEquationSeparatei">
         <param name="buf" type="GLuint"/>
         <param name="modeRGB" type="GLenum"/>
         <param name="modeA" type="GLenum"/>
     </function>
 
-    <function name="BlendFuncIndexedAMD" alias="BlendFunciARB">
+    <function name="BlendFuncIndexedAMD" alias="BlendFunci">
         <param name="buf" type="GLuint"/>
         <param name="src" type="GLenum"/>
         <param name="dst" type="GLenum"/>
     </function>
 
-    <function name="BlendFuncSeparateIndexedAMD" alias="BlendFuncSeparateiARB">
+    <function name="BlendFuncSeparateIndexedAMD" alias="BlendFuncSeparatei">
         <param name="buf" type="GLuint"/>
         <param name="srcRGB" type="GLenum"/>
         <param name="dstRGB" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml b/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
index c08017a..ed3729b 100644
--- a/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
+++ b/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
@@ -8,25 +8,24 @@
 
 <category name="GL_ARB_draw_buffers_blend" number="69">
 
-    <function name="BlendEquationiARB" offset="assign" mesa_name="-ARB">
+    <function name="BlendEquationiARB" alias="BlendEquationi">
         <param name="buf" type="GLuint"/>
         <param name="mode" type="GLenum"/>
     </function>
 
-    <function name="BlendEquationSeparateiARB" offset="assign"
-              mesa_name="-ARB">
+    <function name="BlendEquationSeparateiARB" alias="BlendEquationSeparatei">
         <param name="buf" type="GLuint"/>
         <param name="modeRGB" type="GLenum"/>
         <param name="modeA" type="GLenum"/>
     </function>
 
-    <function name="BlendFunciARB" offset="assign" mesa_name="-ARB">
+    <function name="BlendFunciARB" alias="BlendFunci">
         <param name="buf" type="GLuint"/>
         <param name="src" type="GLenum"/>
         <param name="dst" type="GLenum"/>
     </function>
 
-    <function name="BlendFuncSeparateiARB" offset="assign" mesa_name="-ARB">
+    <function name="BlendFuncSeparateiARB" alias="BlendFuncSeparatei">
         <param name="buf" type="GLuint"/>
         <param name="srcRGB" type="GLenum"/>
         <param name="dstRGB" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/GL4x.xml b/src/mapi/glapi/gen/GL4x.xml
index 04170ed..c23e3af 100644
--- a/src/mapi/glapi/gen/GL4x.xml
+++ b/src/mapi/glapi/gen/GL4x.xml
@@ -13,6 +13,31 @@
     <param name="value" type="GLfloat"/>
   </function>
 
+  <function name="BlendEquationi" offset="assign">
+    <param name="buf" type="GLuint"/>
+    <param name="mode" type="GLenum"/>
+  </function>
+
+  <function name="BlendEquationSeparatei" offset="assign">
+    <param name="buf" type="GLuint"/>
+    <param name="modeRGB" type="GLenum"/>
+    <param name="modeA" type="GLenum"/>
+  </function>
+
+  <function name="BlendFunci" offset="assign">
+    <param name="buf" type="GLuint"/>
+    <param name="src" type="GLenum"/>
+    <param name="dst" type="GLenum"/>
+  </function>
+
+  <function name="BlendFuncSeparatei" offset="assign">
+    <param name="buf" type="GLuint"/>
+    <param name="srcRGB" type="GLenum"/>
+    <param name="dstRGB" type="GLenum"/>
+    <param name="srcA" type="GLenum"/>
+    <param name="dstA" type="GLenum"/>
+  </function>
+
 </category>
 
 <category name="4.3">
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 8bbead7..4919cfc 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1220,7 +1220,7 @@ save_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB,
       n[5].e = dfactorA;
    }
    if (ctx->ExecuteFlag) {
-      CALL_BlendFuncSeparateiARB(ctx->Exec, (buf, sfactorRGB, dfactorRGB,
+      CALL_BlendFuncSeparatei(ctx->Exec, (buf, sfactorRGB, dfactorRGB,
                                              sfactorA, dfactorA));
    }
 }
@@ -1239,7 +1239,7 @@ save_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor)
       n[3].e = dfactor;
    }
    if (ctx->ExecuteFlag) {
-      CALL_BlendFunciARB(ctx->Exec, (buf, sfactor, dfactor));
+      CALL_BlendFunci(ctx->Exec, (buf, sfactor, dfactor));
    }
 }
 
@@ -1256,7 +1256,7 @@ save_BlendEquationi(GLuint buf, GLenum mode)
       n[2].e = mode;
    }
    if (ctx->ExecuteFlag) {
-      CALL_BlendEquationiARB(ctx->Exec, (buf, mode));
+      CALL_BlendEquationi(ctx->Exec, (buf, mode));
    }
 }
 
@@ -1274,7 +1274,7 @@ save_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA)
       n[3].e = modeA;
    }
    if (ctx->ExecuteFlag) {
-      CALL_BlendEquationSeparateiARB(ctx->Exec, (buf, modeRGB, modeA));
+      CALL_BlendEquationSeparatei(ctx->Exec, (buf, modeRGB, modeA));
    }
 }
 
@@ -7421,21 +7421,21 @@ execute_list(struct gl_context *ctx, GLuint list)
 
          case OPCODE_BLEND_FUNC_I:
             /* GL_ARB_draw_buffers_blend */
-            CALL_BlendFunciARB(ctx->Exec, (n[1].ui, n[2].e, n[3].e));
+            CALL_BlendFunci(ctx->Exec, (n[1].ui, n[2].e, n[3].e));
             break;
          case OPCODE_BLEND_FUNC_SEPARATE_I:
             /* GL_ARB_draw_buffers_blend */
-            CALL_BlendFuncSeparateiARB(ctx->Exec, (n[1].ui, n[2].e, n[3].e,
-                                                   n[4].e, n[5].e));
+            CALL_BlendFuncSeparatei(ctx->Exec, (n[1].ui, n[2].e, n[3].e,
+                                                n[4].e, n[5].e));
             break;
          case OPCODE_BLEND_EQUATION_I:
             /* GL_ARB_draw_buffers_blend */
-            CALL_BlendEquationiARB(ctx->Exec, (n[1].ui, n[2].e));
+            CALL_BlendEquationi(ctx->Exec, (n[1].ui, n[2].e));
             break;
          case OPCODE_BLEND_EQUATION_SEPARATE_I:
             /* GL_ARB_draw_buffers_blend */
-            CALL_BlendEquationSeparateiARB(ctx->Exec,
-                                           (n[1].ui, n[2].e, n[3].e));
+            CALL_BlendEquationSeparatei(ctx->Exec,
+                                        (n[1].ui, n[2].e, n[3].e));
             break;
 
          case OPCODE_CALL_LIST:
@@ -10206,10 +10206,10 @@ _mesa_create_save_table(const struct gl_context *ctx)
    SET_SamplerParameterIuiv(table, save_SamplerParameterIuiv);
 
    /* GL_ARB_draw_buffer_blend */
-   SET_BlendFunciARB(table, save_BlendFunci);
-   SET_BlendFuncSeparateiARB(table, save_BlendFuncSeparatei);
-   SET_BlendEquationiARB(table, save_BlendEquationi);
-   SET_BlendEquationSeparateiARB(table, save_BlendEquationSeparatei);
+   SET_BlendFunci(table, save_BlendFunci);
+   SET_BlendFuncSeparatei(table, save_BlendFuncSeparatei);
+   SET_BlendEquationi(table, save_BlendEquationi);
+   SET_BlendEquationSeparatei(table, save_BlendEquationSeparatei);
 
    /* GL_ARB_geometry_shader4 */
    SET_ProgramParameteri(table, save_ProgramParameteri);
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 62a0ce3..6b13b9c 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -540,10 +540,10 @@ const struct function gl_core_functions_possible[] = {
 
    /* GL 4.0 */
    { "glMinSampleShading", 40, -1 },
-// { "glBlendEquationi", 40, -1 },                      // XXX: Add to xml
-// { "glBlendEquationSeparatei", 40, -1 },              // XXX: Add to xml
-// { "glBlendFunci", 40, -1 },                          // XXX: Add to xml
-// { "glBlendFuncSeparatei", 40, -1 },                  // XXX: Add to xml
+   { "glBlendEquationi", 40, -1 },
+   { "glBlendEquationSeparatei", 40, -1 },
+   { "glBlendFunci", 40, -1 },
+   { "glBlendFuncSeparatei", 40, -1 },
 
    /* GL 4.3 */
    { "glIsRenderbuffer", 43, -1 },
-- 
1.7.9.5



More information about the mesa-dev mailing list