#include "mtypes.h"
#include "formats.h"
#include "errors.h"
+#include "hash.h"
#include "context.h"
#include "texobj.h"
#include "teximage.h"
* 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];
}
}
- _mesa_end_texture_lookups(ctx);
+ _mesa_HashUnlockMutex(ctx->Shared->TexObjects);
}
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)
* 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) {
}
}
- _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++)
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);