Mesa (master): mesa: remove gl_sync_object::Type field

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Fri Jul 28 09:28:46 UTC 2017


Module: Mesa
Branch: master
Commit: e0e79f0b08410a64e0b0f0f0f95317e473e4db86
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0e79f0b08410a64e0b0f0f0f95317e473e4db86

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Jul 27 16:05:41 2017 +0200

mesa: remove gl_sync_object::Type field

This is useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/mesa/main/mtypes.h  | 1 -
 src/mesa/main/syncobj.c | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 0d0536c775..404d586ff7 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3188,7 +3188,6 @@ struct gl_query_state
 /** Sync object state */
 struct gl_sync_object
 {
-   GLenum Type;               /**< GL_SYNC_FENCE */
    GLuint Name;               /**< Fence name */
    GLchar *Label;             /**< GL_KHR_debug */
    GLint RefCount;            /**< Reference count */
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 1b223e5a16..cb6f8868bd 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -164,7 +164,6 @@ _mesa_free_sync_data(struct gl_context *ctx)
  * Check if the given sync object is:
  *  - non-null
  *  - not in sync objects hash table
- *  - type is GL_SYNC_FENCE
  *  - not marked as deleted
  *
  * Returns the internal gl_sync_object pointer if the sync object is valid
@@ -181,7 +180,6 @@ _mesa_get_and_ref_sync(struct gl_context *ctx, GLsync sync, bool incRefCount)
    mtx_lock(&ctx->Shared->Mutex);
    if (syncObj != NULL
       && _mesa_set_search(ctx->Shared->SyncObjects, syncObj) != NULL
-      && (syncObj->Type == GL_SYNC_FENCE)
       && !syncObj->DeletePending) {
      if (incRefCount) {
        syncObj->RefCount++;
@@ -264,7 +262,6 @@ fence_sync(struct gl_context *ctx, GLenum condition, GLbitfield flags)
 
    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
        * applications.  If sync support is extended to provide support for
        * NV_fence, this field will be used.  We'll also need to add an object
@@ -429,7 +426,7 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length,
 
    switch (pname) {
    case GL_OBJECT_TYPE:
-      v[0] = syncObj->Type;
+      v[0] = GL_SYNC_FENCE;
       size = 1;
       break;
 




More information about the mesa-commit mailing list