[Mesa-dev] [PATCH 1/2] mesa: drop fence type parameter from NewSyncObject()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Jul 27 14:05:40 UTC 2017
This is useless.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mesa/drivers/dri/i915/intel_syncobj.c | 2 +-
src/mesa/drivers/dri/i965/brw_sync.c | 2 +-
src/mesa/main/dd.h | 2 +-
src/mesa/main/syncobj.c | 5 ++---
src/mesa/state_tracker/st_cb_syncobj.c | 13 ++++---------
5 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c
index 0766a169d0..4839164ed9 100644
--- a/src/mesa/drivers/dri/i915/intel_syncobj.c
+++ b/src/mesa/drivers/dri/i915/intel_syncobj.c
@@ -160,7 +160,7 @@ intel_fence_server_wait(struct intel_context *intel, struct intel_fence *fence)
}
static struct gl_sync_object *
-intel_gl_new_sync_object(struct gl_context *ctx, GLuint id)
+intel_gl_new_sync_object(struct gl_context *ctx)
{
struct intel_gl_sync_object *sync;
diff --git a/src/mesa/drivers/dri/i965/brw_sync.c b/src/mesa/drivers/dri/i965/brw_sync.c
index edfb1881bc..3926d95d25 100644
--- a/src/mesa/drivers/dri/i965/brw_sync.c
+++ b/src/mesa/drivers/dri/i965/brw_sync.c
@@ -337,7 +337,7 @@ brw_fence_server_wait(struct brw_context *brw, struct brw_fence *fence)
}
static struct gl_sync_object *
-brw_gl_new_sync(struct gl_context *ctx, GLuint id)
+brw_gl_new_sync(struct gl_context *ctx)
{
struct brw_gl_sync *sync;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 8e382e1e9a..462829d755 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -872,7 +872,7 @@ struct dd_function_table {
* \name GL_ARB_sync interfaces
*/
/*@{*/
- struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
+ struct gl_sync_object * (*NewSyncObject)(struct gl_context *);
void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
GLenum, GLbitfield);
void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 22092ee5b5..981e5db470 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -69,11 +69,10 @@
#include "syncobj.h"
static struct gl_sync_object *
-_mesa_new_sync_object(struct gl_context *ctx, GLenum type)
+_mesa_new_sync_object(struct gl_context *ctx)
{
struct gl_sync_object *s = CALLOC_STRUCT(gl_sync_object);
(void) ctx;
- (void) type;
return s;
}
@@ -279,7 +278,7 @@ fence_sync(struct gl_context *ctx, GLenum condition, GLbitfield flags)
{
struct gl_sync_object *syncObj;
- syncObj = ctx->Driver.NewSyncObject(ctx, GL_SYNC_FENCE);
+ syncObj = ctx->Driver.NewSyncObject(ctx);
if (syncObj != NULL) {
syncObj->Type = GL_SYNC_FENCE;
/* The name is not currently used, and it is never visible to
diff --git a/src/mesa/state_tracker/st_cb_syncobj.c b/src/mesa/state_tracker/st_cb_syncobj.c
index 7a4ba71b3e..637fbe3b73 100644
--- a/src/mesa/state_tracker/st_cb_syncobj.c
+++ b/src/mesa/state_tracker/st_cb_syncobj.c
@@ -45,17 +45,12 @@ struct st_sync_object {
};
-static struct gl_sync_object * st_new_sync_object(struct gl_context *ctx,
- GLenum type)
+static struct gl_sync_object *st_new_sync_object(struct gl_context *ctx)
{
- if (type == GL_SYNC_FENCE) {
- struct st_sync_object *so = CALLOC_STRUCT(st_sync_object);
+ struct st_sync_object *so = CALLOC_STRUCT(st_sync_object);
- mtx_init(&so->mutex, mtx_plain);
- return &so->b;
- } else {
- return NULL;
- }
+ mtx_init(&so->mutex, mtx_plain);
+ return &so->b;
}
static void st_delete_sync_object(struct gl_context *ctx,
--
2.13.3
More information about the mesa-dev
mailing list