mesa: drop fence type parameter from NewSyncObject()

This is useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Samuel Pitoiset 2017-07-27 16:05:40 +02:00
parent 28c7fbbe0f
commit ca4d1def39
5 changed files with 9 additions and 15 deletions

View File

@ -160,7 +160,7 @@ intel_fence_server_wait(struct intel_context *intel, struct intel_fence *fence)
} }
static struct gl_sync_object * 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; struct intel_gl_sync_object *sync;

View File

@ -337,7 +337,7 @@ brw_fence_server_wait(struct brw_context *brw, struct brw_fence *fence)
} }
static struct gl_sync_object * 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; struct brw_gl_sync *sync;

View File

@ -872,7 +872,7 @@ struct dd_function_table {
* \name GL_ARB_sync interfaces * \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 *, void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
GLenum, GLbitfield); GLenum, GLbitfield);
void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);

View File

@ -69,11 +69,10 @@
#include "syncobj.h" #include "syncobj.h"
static struct gl_sync_object * 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); struct gl_sync_object *s = CALLOC_STRUCT(gl_sync_object);
(void) ctx; (void) ctx;
(void) type;
return s; return s;
} }
@ -263,7 +262,7 @@ fence_sync(struct gl_context *ctx, GLenum condition, GLbitfield flags)
{ {
struct gl_sync_object *syncObj; struct gl_sync_object *syncObj;
syncObj = ctx->Driver.NewSyncObject(ctx, GL_SYNC_FENCE); syncObj = ctx->Driver.NewSyncObject(ctx);
if (syncObj != NULL) { if (syncObj != NULL) {
syncObj->Type = GL_SYNC_FENCE; syncObj->Type = GL_SYNC_FENCE;
/* The name is not currently used, and it is never visible to /* The name is not currently used, and it is never visible to

View File

@ -45,17 +45,12 @@ struct st_sync_object {
}; };
static struct gl_sync_object * st_new_sync_object(struct gl_context *ctx, static struct gl_sync_object *st_new_sync_object(struct gl_context *ctx)
GLenum type)
{ {
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); mtx_init(&so->mutex, mtx_plain);
return &so->b; return &so->b;
} else {
return NULL;
}
} }
static void st_delete_sync_object(struct gl_context *ctx, static void st_delete_sync_object(struct gl_context *ctx,