summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-01-27 12:07:05 -0700
committerBrian Paul <[email protected]>2014-02-02 06:47:32 -0700
commitd5df28381efe758ceebe6a6bb226763e5d527ec3 (patch)
tree89f57b13ab5207c658b2e3ee99901c48705229ae
parented7211589161c3ec3157b669120b5bf49dd54d54 (diff)
swrast: use _mesa_get_current_tex_object() in swrastSetTexBuffer2()
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 48b07bd1169..071192c6fc4 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -71,7 +71,6 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
struct dri_context *dri_ctx;
int x, y, w, h;
__DRIscreen *sPriv = dPriv->driScreenPriv;
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
struct swrast_texture_image *swImage;
@@ -82,8 +81,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4);
- texUnit = _mesa_get_current_tex_unit(&dri_ctx->Base);
- texObj = _mesa_select_tex_object(&dri_ctx->Base, texUnit, target);
+ texObj = _mesa_get_current_tex_object(&dri_ctx->Base, target);
texImage = _mesa_get_tex_image(&dri_ctx->Base, texObj, target, 0);
swImage = swrast_texture_image(texImage);