}
+/**
+ * Return pointer to texture object for given target on current texture unit.
+ */
+struct gl_texture_object *
+_mesa_get_current_tex_object(GLcontext *ctx, GLenum target)
+{
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ return _mesa_select_tex_object(ctx, texUnit, target);
+}
+
+
/**
* Get a texture image pointer from a texture object, given a texture
* target and mipmap level. The target and level parameters should
}
-/**
- * Return pointer to texture object for given target on current texture unit.
- */
-static struct gl_texture_object *
-get_current_tex_object(GLcontext *ctx, GLenum target)
-{
- struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
- return _mesa_select_tex_object(ctx, texUnit, target);
-}
-
-
-
/**
* This is the fallback for Driver.TestProxyTexImage(). Test the texture
* level, width, height and depth against the ctx->Const limits for textures.
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
{
GLsizei postConvWidth = width;
struct gl_texture_object *texObj;
- struct gl_texture_image *texImage = NULL;
+ struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
assert(texObj);
_mesa_lock_texture(ctx, texObj);
return; /* error was detected */
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
return; /* error was detected */
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
postConvWidth, 1, border))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
postConvWidth, postConvHeight, border))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
if (copytexsubimage_error_check1(ctx, 1, target, level))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
if (copytexsubimage_error_check1(ctx, 2, target, level))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
if (copytexsubimage_error_check1(ctx, 3, target, level))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{