aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_manager.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c
index 8158450dc..215b27634 100644
--- a/mesalib/src/mesa/state_tracker/st_manager.c
+++ b/mesalib/src/mesa/state_tracker/st_manager.c
@@ -469,7 +469,6 @@ st_context_teximage(struct st_context_iface *stctxi,
{
struct st_context *st = (struct st_context *) stctxi;
struct gl_context *ctx = st->ctx;
- struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
struct st_texture_object *stObj;
@@ -495,7 +494,8 @@ st_context_teximage(struct st_context_iface *stctxi,
return FALSE;
}
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
_mesa_lock_texture(ctx, texObj);
stObj = st_texture_object(texObj);
@@ -508,7 +508,7 @@ st_context_teximage(struct st_context_iface *stctxi,
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
stImage = st_texture_image(texImage);
if (tex) {
- gl_format texFormat = st_pipe_format_to_mesa_format(pipe_format);
+ mesa_format texFormat = st_pipe_format_to_mesa_format(pipe_format);
if (util_format_has_alpha(tex->format))
internalFormat = GL_RGBA;