[Mesa-dev] [PATCH 5/6] swrast: use _mesa_get_current_tex_object() in swrastSetTexBuffer2()

Brian Paul brian.e.paul at gmail.com
Mon Jan 27 12:09:39 PST 2014


From: Brian Paul <brianp at vmware.com>

---
 src/mesa/drivers/dri/swrast/swrast.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 30e6805..a25013a 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);
 
-- 
1.8.3.2



More information about the mesa-dev mailing list