tnl: remove ctx->Driver.Map/UnmapTexture() calls
authorBrian Paul <brianp@vmware.com>
Mon, 16 Jan 2012 20:05:55 +0000 (13:05 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 24 Jan 2012 21:12:36 +0000 (14:12 -0700)
ctx->Driver.MapTexture() always points to _swrast_map_texture().
We're already reaching into swrast from t_vb_program.c anyway.
This will let us remove the ctx->Driver.Map/UnmapTexture() functions.

src/mesa/tnl/t_vb_program.c

index 8b060ff93e41d759daf2648bafc1bee0bf3f5121..7687ae0b3cf39ed7980e3f2c4caf2df1dbe32171 100644 (file)
@@ -272,15 +272,12 @@ map_textures(struct gl_context *ctx, const struct gl_vertex_program *vp)
 {
    GLuint u;
 
-   if (!ctx->Driver.MapTexture)
-      return;
-
    for (u = 0; u < ctx->Const.MaxVertexTextureImageUnits; u++) {
       if (vp->Base.TexturesUsed[u]) {
          /* Note: _Current *should* correspond to the target indicated
           * in TexturesUsed[u].
           */
-         ctx->Driver.MapTexture(ctx, ctx->Texture.Unit[u]._Current);
+         _swrast_map_texture(ctx, ctx->Texture.Unit[u]._Current);
       }
    }
 }
@@ -294,15 +291,12 @@ unmap_textures(struct gl_context *ctx, const struct gl_vertex_program *vp)
 {
    GLuint u;
 
-   if (!ctx->Driver.MapTexture)
-      return;
-
    for (u = 0; u < ctx->Const.MaxVertexTextureImageUnits; u++) {
       if (vp->Base.TexturesUsed[u]) {
          /* Note: _Current *should* correspond to the target indicated
           * in TexturesUsed[u].
           */
-         ctx->Driver.UnmapTexture(ctx, ctx->Texture.Unit[u]._Current);
+         _swrast_unmap_texture(ctx, ctx->Texture.Unit[u]._Current);
       }
    }
 }