mesa/glthread: enable immediate mode
authorMarek Olšák <marek.olsak@amd.com>
Sat, 10 Nov 2018 06:18:30 +0000 (01:18 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 21 Nov 2018 02:17:41 +0000 (21:17 -0500)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/gl_API.xml
src/mesa/vbo/vbo_exec_api.c

index aae9a5835db1dfd4493cf211cc32a27b8ef10ce6..929e5f6b0240cf58bf950625caa909650b49b933 100644 (file)
         <glx rop="3"/>
     </function>
 
-    <function name="Begin" deprecated="3.1" exec="dynamic" marshal_fail="true">
+    <function name="Begin" deprecated="3.1" exec="dynamic">
         <param name="mode" type="GLenum"/>
         <glx rop="4"/>
     </function>
index 24bd1f0ba14a5ef5c1e233ecc5ac8a76d94748a8..e46922ef859fda23b9433d79e290feb5c2822432 100644 (file)
@@ -803,11 +803,14 @@ vbo_exec_Begin(GLenum mode)
    ctx->Driver.CurrentExecPrimitive = mode;
 
    ctx->Exec = ctx->BeginEnd;
+
    /* We may have been called from a display list, in which case we should
     * leave dlist.c's dispatch table in place.
     */
-   if (ctx->CurrentClientDispatch == ctx->OutsideBeginEnd) {
-      ctx->CurrentClientDispatch = ctx->BeginEnd;
+   if (ctx->CurrentClientDispatch == ctx->MarshalExec) {
+      ctx->CurrentServerDispatch = ctx->Exec;
+   } else if (ctx->CurrentClientDispatch == ctx->OutsideBeginEnd) {
+      ctx->CurrentClientDispatch = ctx->Exec;
       _glapi_set_dispatch(ctx->CurrentClientDispatch);
    } else {
       assert(ctx->CurrentClientDispatch == ctx->Save);
@@ -858,8 +861,11 @@ vbo_exec_End(void)
    }
 
    ctx->Exec = ctx->OutsideBeginEnd;
-   if (ctx->CurrentClientDispatch == ctx->BeginEnd) {
-      ctx->CurrentClientDispatch = ctx->OutsideBeginEnd;
+
+   if (ctx->CurrentClientDispatch == ctx->MarshalExec) {
+      ctx->CurrentServerDispatch = ctx->Exec;
+   } else if (ctx->CurrentClientDispatch == ctx->BeginEnd) {
+      ctx->CurrentClientDispatch = ctx->Exec;
       _glapi_set_dispatch(ctx->CurrentClientDispatch);
    }