main: Moved _mesa_lock_texture and _mesa_unlock_texture to texobj.h from teximage.h.
authorLaura Ekstrand <laura@jlekstrand.net>
Thu, 4 Dec 2014 18:44:25 +0000 (10:44 -0800)
committerLaura Ekstrand <laura@jlekstrand.net>
Thu, 8 Jan 2015 19:37:28 +0000 (11:37 -0800)
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/intel_tex_copy.c
src/mesa/drivers/dri/swrast/swrast.c
src/mesa/main/texgetimage.c
src/mesa/main/teximage.h
src/mesa/main/texobj.h

index d55539a2578e3641b2f56246c77671b56ef43dee..fc3103174d5ea748dc41940d960030705fc5a8d9 100644 (file)
@@ -29,6 +29,7 @@
 #include "main/enums.h"
 #include "main/image.h"
 #include "main/teximage.h"
+#include "main/texobj.h"
 #include "main/texstate.h"
 #include "main/fbobject.h"
 
index d62fed30cc540de35800d424990342ed11a0955c..8005f7d696480bffb94de23185c39f6ef8214863 100644 (file)
@@ -54,6 +54,7 @@
 
 #include "main/teximage.h"
 #include "main/texformat.h"
+#include "main/texobj.h"
 #include "main/texstate.h"
 
 #include "swrast_priv.h"
index 4338d09e48f8c0307a33af88e4cd36f496524b75..bb4941f4502e8176fe4f107a22633c544d8dcfc8 100644 (file)
 #include "texcompress.h"
 #include "texgetimage.h"
 #include "teximage.h"
+#include "texobj.h"
 #include "texstore.h"
 
 
-
 /**
  * Can the given type represent negative values?
  */
index 045605046271fb68927d98f20eebd8597c316566..c3ecfe71029eb043f88d78012ae6a809ccff7bf6 100644 (file)
@@ -169,24 +169,6 @@ _mesa_legal_texture_base_format_for_target(struct gl_context *ctx,
                                            unsigned dimensions,
                                            const char *caller);
 
-/**
- * Lock a texture for updating.  See also _mesa_lock_context_textures().
- */
-static inline void
-_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
-{
-   mtx_lock(&ctx->Shared->TexMutex);
-   ctx->Shared->TextureStateStamp++;
-   (void) texObj;
-}
-
-static inline void
-_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
-{
-   (void) texObj;
-   mtx_unlock(&ctx->Shared->TexMutex);
-}
-
 /*@}*/
 
 
index 109264e8901fabccbeec9db948600a4b473b7227..51bdbbdc5ead2171a81c6db0f43126f976d233bb 100644 (file)
@@ -98,6 +98,24 @@ _mesa_reference_texobj(struct gl_texture_object **ptr,
       _mesa_reference_texobj_(ptr, tex);
 }
 
+/**
+ * Lock a texture for updating.  See also _mesa_lock_context_textures().
+ */
+static inline void
+_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
+{
+   mtx_lock(&ctx->Shared->TexMutex);
+   ctx->Shared->TextureStateStamp++;
+   (void) texObj;
+}
+
+static inline void
+_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
+{
+   (void) texObj;
+   mtx_unlock(&ctx->Shared->TexMutex);
+}
+
 
 /**
  * Return number of faces for a texture target.  This will be 6 for