mesa: stop abstracting texture object hashtable locking
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 6 Apr 2017 04:43:32 +0000 (14:43 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 6 Apr 2017 22:03:02 +0000 (08:03 +1000)
This doesn't do anything useful so just remove it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/main/shaderimage.c
src/mesa/main/texobj.c
src/mesa/main/texobj.h

index 5cce3ac..45b72c9 100644 (file)
@@ -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);
 }
index a5e64c3..ad644ca 100644 (file)
@@ -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++)
index 8776763..a9db167 100644 (file)
@@ -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);