From: Younes Manton Date: Wed, 21 Jan 2009 21:55:35 +0000 (-0500) Subject: nouveau: Map correct mip level when using the shadow (nv30, nv40). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01cbd764962ff49bf104e5997914ced53360ef81;p=mesa.git nouveau: Map correct mip level when using the shadow (nv30, nv40). --- diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c index 29356e8c1e5..1fac6d3df83 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 9657a19c50f..ab128fecda7 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