summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-16 13:05:59 -0700
committerBrian Paul <[email protected]>2012-01-24 14:12:36 -0700
commit8b8a54afd9b748b7250993393864544ad6961edb (patch)
tree69aab3da7db66718a480cc04ce1a0bf90fb1a2be
parent4bbab2275f792553f8ed6bcebfe6acc4cb4179c2 (diff)
nouveau: stop calling ctx->Driver.Map/UnmapTexture()
And remove unused nouveau_texture_map/unmap()
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_span.c17
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c27
2 files changed, 4 insertions, 40 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.c b/src/mesa/drivers/dri/nouveau/nouveau_span.c
index 91a931161f0..f82a2e1e0d9 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_span.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_span.c
@@ -46,18 +46,6 @@ renderbuffer_map_unmap(struct gl_renderbuffer *rb, GLboolean map)
}
static void
-texture_unit_map_unmap(struct gl_context *ctx, struct gl_texture_unit *u, GLboolean map)
-{
- if (!u->_ReallyEnabled)
- return;
-
- if (map)
- ctx->Driver.MapTexture(ctx, u->_Current);
- else
- ctx->Driver.UnmapTexture(ctx, u->_Current);
-}
-
-static void
framebuffer_map_unmap(struct gl_framebuffer *fb, GLboolean map)
{
int i;
@@ -82,7 +70,10 @@ span_map_unmap(struct gl_context *ctx, GLboolean map)
framebuffer_map_unmap(ctx->ReadBuffer, map);
for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
- texture_unit_map_unmap(ctx, &ctx->Texture.Unit[i], map);
+ if (map)
+ _swrast_map_texture(ctx, ctx->Texture.Unit[i]._Current);
+ else
+ _swrast_unmap_texture(ctx, ctx->Texture.Unit[i]._Current);
}
static void
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index b364f78f445..66c3cb25188 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -680,31 +680,6 @@ nouveau_set_texbuffer(__DRIcontext *dri_ctx,
_mesa_unlock_texture(ctx, t);
}
-static void
-nouveau_texture_map(struct gl_context *ctx, struct gl_texture_object *t)
-{
- int i;
-
- for (i = t->BaseLevel; i < t->_MaxLevel; i++) {
- struct gl_texture_image *ti = t->Image[0][i];
-
- if (ti)
- nouveau_teximage_map(ctx, ti, GL_MAP_READ_BIT,
- 0, 0, ti->Width, ti->Height);
- }
-}
-
-static void
-nouveau_texture_unmap(struct gl_context *ctx, struct gl_texture_object *t)
-{
- int i;
-
- for (i = t->BaseLevel; i < t->_MaxLevel; i++) {
- if (t->Image[0][i])
- nouveau_teximage_unmap(ctx, t->Image[0][i]);
- }
-}
-
void
nouveau_texture_functions_init(struct dd_function_table *functions)
{
@@ -720,8 +695,6 @@ nouveau_texture_functions_init(struct dd_function_table *functions)
functions->TexSubImage2D = nouveau_texsubimage_2d;
functions->TexSubImage3D = nouveau_texsubimage_3d;
functions->BindTexture = nouveau_bind_texture;
- functions->MapTexture = nouveau_texture_map;
- functions->UnmapTexture = nouveau_texture_unmap;
functions->MapTextureImage = nouveau_map_texture_image;
functions->UnmapTextureImage = nouveau_unmap_texture_image;
}