gallium: in softpipe_get_tex_surface() use the pitch specified in the softpipe_textur...
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 23 Jun 2008 17:27:44 +0000 (11:27 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 23 Jun 2008 17:28:38 +0000 (11:28 -0600)
Fixes a pitch/width mix-up.

src/gallium/drivers/softpipe/sp_texture.c

index ef8c5bd6b0c0ef0a7567e0e87f404bc336b2f1eb..2ef17a220b455c68ed1b135837a0cf65f6eb3fba 100644 (file)
@@ -198,7 +198,7 @@ softpipe_get_tex_surface(struct pipe_screen *screen,
       ps->cpp = pt->cpp;
       ps->width = pt->width[level];
       ps->height = pt->height[level];
-      ps->pitch = ps->width;
+      ps->pitch = spt->pitch[level];
       ps->offset = spt->level_offset[level];
       ps->usage = usage;