mesa: expose ARB_indirect_parameters in the compatibility profile
authorMarek Olšák <marek.olsak@amd.com>
Tue, 17 Jul 2018 03:16:31 +0000 (23:16 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 19 Jul 2018 05:10:18 +0000 (01:10 -0400)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (v1)
v2: fix dispatch_sanity

src/mesa/main/extensions_table.h
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/vbo/vbo_exec_array.c

index 3758a95f05f299365e005f7dd94c5292b46c2aba..f4f7f01d6e4cacf4aeb79277e7a7ad779681a6be 100644 (file)
@@ -80,7 +80,7 @@ EXT(ARB_gpu_shader_fp64                     , ARB_gpu_shader_fp64
 EXT(ARB_gpu_shader_int64                    , ARB_gpu_shader_int64                   ,  x , GLC,  x ,  x , 2015)
 EXT(ARB_half_float_pixel                    , dummy_true                             , GLL, GLC,  x ,  x , 2003)
 EXT(ARB_half_float_vertex                   , ARB_half_float_vertex                  , GLL, GLC,  x ,  x , 2008)
-EXT(ARB_indirect_parameters                 , ARB_indirect_parameters                ,  x , GLC,  x ,  x , 2013)
+EXT(ARB_indirect_parameters                 , ARB_indirect_parameters                , GLL, GLC,  x ,  x , 2013)
 EXT(ARB_instanced_arrays                    , ARB_instanced_arrays                   , GLL, GLC,  x ,  x , 2008)
 EXT(ARB_internalformat_query                , ARB_internalformat_query               , GLL, GLC,  x ,  x , 2011)
 EXT(ARB_internalformat_query2               , ARB_internalformat_query2              , GLL, GLC,  x ,  x , 2013)
index ec4f9dd08f57702cab16b18ce53d0b920e988565..d1d063636a80f04b3e3fee939566987937a493c8 100644 (file)
@@ -1188,6 +1188,10 @@ const struct function common_desktop_functions_possible[] = {
    { "glNamedFramebufferSampleLocationsfvARB", 30, -1 },
    { "glEvaluateDepthValuesARB", 30, -1 },
 
+   /* GL_ARB_indirect_parameters */
+   { "glMultiDrawArraysIndirectCountARB", 11, -1 },
+   { "glMultiDrawElementsIndirectCountARB", 11, -1 },
+
    { NULL, 0, -1 }
 };
 
@@ -1938,10 +1942,6 @@ const struct function gl_core_functions_possible[] = {
 /* GL 4.5 */
    { "glMemoryBarrierByRegion", 45, -1 },
 
-   /* GL_ARB_indirect_parameters */
-   { "glMultiDrawArraysIndirectCountARB", 31, -1 },
-   { "glMultiDrawElementsIndirectCountARB", 31, -1 },
-
    /* GL_ARB_ES3_2_compatibility */
    { "glPrimitiveBoundingBoxARB", 45, -1 },
 
index 9d3e894c16435f4e952bba0104e39e34694da6fb..51c000e7bd99889499642d9125b8c188f078b3e3 100644 (file)
@@ -2080,13 +2080,6 @@ vbo_initialize_exec_dispatch(const struct gl_context *ctx,
       SET_DrawElementsIndirect(exec, vbo_exec_DrawElementsIndirect);
    }
 
-   if (ctx->API == API_OPENGL_CORE) {
-      SET_MultiDrawArraysIndirectCountARB(exec,
-                                          vbo_exec_MultiDrawArraysIndirectCount);
-      SET_MultiDrawElementsIndirectCountARB(exec,
-                                            vbo_exec_MultiDrawElementsIndirectCount);
-   }
-
    if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
       SET_DrawArraysInstancedARB(exec, vbo_exec_DrawArraysInstanced);
       SET_DrawElementsInstancedARB(exec, vbo_exec_DrawElementsInstanced);
@@ -2102,6 +2095,10 @@ vbo_initialize_exec_dispatch(const struct gl_context *ctx,
                                                vbo_exec_DrawTransformFeedbackStreamInstanced);
       SET_MultiDrawArraysIndirect(exec, vbo_exec_MultiDrawArraysIndirect);
       SET_MultiDrawElementsIndirect(exec, vbo_exec_MultiDrawElementsIndirect);
+      SET_MultiDrawArraysIndirectCountARB(exec,
+                                          vbo_exec_MultiDrawArraysIndirectCount);
+      SET_MultiDrawElementsIndirectCountARB(exec,
+                                            vbo_exec_MultiDrawElementsIndirectCount);
    }
 }