summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYounes Manton <younes.m@gmail.com>2009-01-21 16:55:35 -0500
committerYounes Manton <younes.m@gmail.com>2009-01-21 16:55:35 -0500
commit01cbd764962ff49bf104e5997914ced53360ef81 (patch)
tree049ea9becf52b1c79d1828a3bf05b5f7734f5058
parentbcb5ea097c11e3776070f30b00fcf6c5fac62df3 (diff)
nouveau: Map correct mip level when using the shadow (nv30, nv40).
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.c13
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c13
2 files changed, 14 insertions, 12 deletions
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index 29356e8c1e..1fac6d3df8 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -145,14 +145,15 @@ nv30_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
surface->texture->tex_usage = old_tex_usage;
assert(mt->shadow_tex->tex_usage & NOUVEAU_TEXTURE_USAGE_LINEAR);
- mt->shadow_surface = screen->get_tex_surface
- (
- screen, mt->shadow_tex,
- surface->face, surface->level, surface->zslice,
- surface->usage
- );
}
+ mt->shadow_surface = screen->get_tex_surface
+ (
+ screen, mt->shadow_tex,
+ surface->face, surface->level, surface->zslice,
+ surface->usage
+ );
+
surface_to_map = mt->shadow_surface;
}
else
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index 9657a19c50..ab128fecda 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -154,14 +154,15 @@ nv40_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
surface->texture->tex_usage = old_tex_usage;
assert(mt->shadow_tex->tex_usage & NOUVEAU_TEXTURE_USAGE_LINEAR);
- mt->shadow_surface = screen->get_tex_surface
- (
- screen, mt->shadow_tex,
- surface->face, surface->level, surface->zslice,
- surface->usage
- );
}
+ mt->shadow_surface = screen->get_tex_surface
+ (
+ screen, mt->shadow_tex,
+ surface->face, surface->level, surface->zslice,
+ surface->usage
+ );
+
surface_to_map = mt->shadow_surface;
}
else