From ca4d1def392249209a5980fadb1678ffba95b381 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 27 Jul 2017 16:05:40 +0200 Subject: [PATCH] mesa: drop fence type parameter from NewSyncObject() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is useless. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- 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 0766a169d01..4839164ed97 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 edfb1881bc0..3926d95d25f 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 8e382e1e9a4..462829d755d 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 9c165314bf3..1b223e5a164 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; } @@ -263,7 +262,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 7a4ba71b3e9..637fbe3b73a 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.30.2