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 ef8c5bd..2ef17a2 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;