Mesa (master): mesa: stop abstracting texture object hashtable locking

Timothy Arceri tarceri at kemper.freedesktop.org
Thu Apr 6 22:04:12 UTC 2017


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Thu Apr  6 14:43:32 2017 +1000

mesa: stop abstracting texture object hashtable locking

This doesn't do anything useful so just remove it.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

---

 src/mesa/main/shaderimage.c |  5 +++--
 src/mesa/main/texobj.c      | 17 ++---------------
 src/mesa/main/texobj.h      |  6 ------
 3 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index 5cce3acd15..45b72c9b4f 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -30,6 +30,7 @@
 #include "mtypes.h"
 #include "formats.h"
 #include "errors.h"
+#include "hash.h"
 #include "context.h"
 #include "texobj.h"
 #include "teximage.h"
@@ -673,7 +674,7 @@ _mesa_BindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
     *       their parameters are valid and no other error occurs."
     */
 
-   _mesa_begin_texture_lookups(ctx);
+   _mesa_HashLockMutex(ctx->Shared->TexObjects);
 
    for (i = 0; i < count; i++) {
       struct gl_image_unit *u = &ctx->ImageUnits[first + i];
@@ -761,5 +762,5 @@ _mesa_BindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
       }
    }
 
-   _mesa_end_texture_lookups(ctx);
+   _mesa_HashUnlockMutex(ctx->Shared->TexObjects);
 }
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index a5e64c3e57..ad644ca1ca 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -127,19 +127,6 @@ _mesa_lookup_texture_err(struct gl_context *ctx, GLuint id, const char* func)
    return texObj;
 }
 
-void
-_mesa_begin_texture_lookups(struct gl_context *ctx)
-{
-   _mesa_HashLockMutex(ctx->Shared->TexObjects);
-}
-
-
-void
-_mesa_end_texture_lookups(struct gl_context *ctx)
-{
-   _mesa_HashUnlockMutex(ctx->Shared->TexObjects);
-}
-
 
 struct gl_texture_object *
 _mesa_lookup_texture_locked(struct gl_context *ctx, GLuint id)
@@ -1833,7 +1820,7 @@ _mesa_BindTextures(GLuint first, GLsizei count, const GLuint *textures)
        *       their parameters are valid and no other error occurs."
        */
 
-      _mesa_begin_texture_lookups(ctx);
+      _mesa_HashLockMutex(ctx->Shared->TexObjects);
 
       for (i = 0; i < count; i++) {
          if (textures[i] != 0) {
@@ -1865,7 +1852,7 @@ _mesa_BindTextures(GLuint first, GLsizei count, const GLuint *textures)
          }
       }
 
-      _mesa_end_texture_lookups(ctx);
+      _mesa_HashUnlockMutex(ctx->Shared->TexObjects);
    } else {
       /* Unbind all textures in the range <first> through <first>+<count>-1 */
       for (i = 0; i < count; i++)
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
index 8776763868..a9db1675e0 100644
--- a/src/mesa/main/texobj.h
+++ b/src/mesa/main/texobj.h
@@ -54,12 +54,6 @@ _mesa_lookup_texture(struct gl_context *ctx, GLuint id);
 extern struct gl_texture_object *
 _mesa_lookup_texture_err(struct gl_context *ctx, GLuint id, const char* func);
 
-extern void
-_mesa_begin_texture_lookups(struct gl_context *ctx);
-
-extern void
-_mesa_end_texture_lookups(struct gl_context *ctx);
-
 extern struct gl_texture_object *
 _mesa_lookup_texture_locked(struct gl_context *ctx, GLuint id);
 




More information about the mesa-commit mailing list