summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_span.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-04-19 13:10:55 -0700
committerEric Anholt <eric@anholt.net>2013-04-30 10:40:44 -0700
commitadf958d9c2b4cbfbeef36c253b8889967d83c272 (patch)
tree0c8625f21f09461eb807f1afb59987d1a2675422 /src/mesa/drivers/dri/radeon/radeon_span.c
parentea05e259c9490657a5062480a06ff1cd1b924043 (diff)
downloadexternal_mesa3d-adf958d9c2b4cbfbeef36c253b8889967d83c272.zip
external_mesa3d-adf958d9c2b4cbfbeef36c253b8889967d83c272.tar.gz
external_mesa3d-adf958d9c2b4cbfbeef36c253b8889967d83c272.tar.bz2
swrast: Always use MapTextureImage for mapping textures for swrast.
Now that everything goes through ImageSlices[], we can rely on the driver's existing texture mapping function. A big block of code goes away on Radeon that looks like it was to deal with the validate that happened at SpanRenderStart, which no longer occurs since we don't need validation for the MapTextureImage hook. v2: Rewrite comment about ImageSlices, fix duplicated swImages, touch up unmap loop. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1) Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_span.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index 0617adc..6a7df73 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -119,18 +119,11 @@ radeon_unmap_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
static void radeonSpanRenderStart(struct gl_context * ctx)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
- int i;
radeon_firevertices(rmesa);
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
- if (ctx->Texture.Unit[i]._ReallyEnabled) {
- radeon_validate_texture_miptree(ctx, _mesa_get_samplerobj(ctx, i),
- ctx->Texture.Unit[i]._Current);
- radeon_swrast_map_texture_images(ctx, ctx->Texture.Unit[i]._Current);
- }
- }
-
+ _swrast_map_textures(ctx);
+
radeon_map_framebuffer(ctx, ctx->DrawBuffer);
if (ctx->ReadBuffer != ctx->DrawBuffer)
radeon_map_framebuffer(ctx, ctx->ReadBuffer);
@@ -138,13 +131,8 @@ static void radeonSpanRenderStart(struct gl_context * ctx)
static void radeonSpanRenderFinish(struct gl_context * ctx)
{
- int i;
-
_swrast_flush(ctx);
-
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++)
- if (ctx->Texture.Unit[i]._ReallyEnabled)
- radeon_swrast_unmap_texture_images(ctx, ctx->Texture.Unit[i]._Current);
+ _swrast_unmap_textures(ctx);
radeon_unmap_framebuffer(ctx, ctx->DrawBuffer);
if (ctx->ReadBuffer != ctx->DrawBuffer)