glthread: remove _mesa_post_marshal_hook, because it's not very useful
authorMarek Olšák <marek.olsak@amd.com>
Fri, 6 Mar 2020 19:20:05 +0000 (14:20 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 21 Mar 2020 03:01:13 +0000 (23:01 -0400)
and also remove the useless forward declaration of enum marshal_dispatch_cmd_id.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>

src/mesa/main/glthread.h
src/mesa/main/marshal.c

index 34af466..d8e9c3d 100644 (file)
@@ -48,7 +48,6 @@
 #include "util/u_queue.h"
 #include "GL/gl.h"
 
-enum marshal_dispatch_cmd_id;
 struct gl_context;
 struct _mesa_HashTable;
 
index ab6a7d6..cbcb7c5 100644 (file)
 #include "marshal.h"
 #include "dispatch.h"
 
-static inline void
-_mesa_post_marshal_hook(struct gl_context *ctx)
-{
-   /* This can be enabled for debugging whether a failure is a synchronization
-    * problem between the main thread and the worker thread, or a failure in
-    * how we actually marshal.
-    */
-   if (false)
-      _mesa_glthread_finish(ctx);
-}
-
-
 struct marshal_cmd_ShaderSource
 {
    struct marshal_cmd_base cmd_base;
@@ -126,7 +114,6 @@ _mesa_marshal_ShaderSource(GLuint shader, GLsizei count,
          memcpy(cmd_strings, string[i], cmd_length[i]);
          cmd_strings += cmd_length[i];
       }
-      _mesa_post_marshal_hook(ctx);
    } else {
       _mesa_glthread_finish(ctx);
       CALL_ShaderSource(ctx->CurrentServerDispatch,
@@ -279,7 +266,6 @@ _mesa_marshal_BufferData_merged(GLuint target_or_name, GLsizeiptr size,
       char *variable_data = (char *) (cmd + 1);
       memcpy(variable_data, data, size);
    }
-   _mesa_post_marshal_hook(ctx);
 }
 
 void GLAPIENTRY
@@ -387,7 +373,6 @@ _mesa_marshal_BufferSubData_merged(GLuint target_or_name, GLintptr offset,
 
    char *variable_data = (char *) (cmd + 1);
    memcpy(variable_data, data, size);
-   _mesa_post_marshal_hook(ctx);
 }
 
 void GLAPIENTRY