llvmpipe: pass face+slice to llvmpipe_unswizzle_cbuf_tile()
authorBrian Paul <brianp@vmware.com>
Tue, 27 Jul 2010 23:40:00 +0000 (17:40 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 27 Jul 2010 23:42:27 +0000 (17:42 -0600)
Cube map faces and 3D texture slices are treated the same in llvmpipe
textures.  Need to pass the sum of these fields to
llvmpipe_unswizzle_cbuf_tile() as we do elsewhere.

Fixes piglit fbo-3d test (fd.o bug 29135).

src/gallium/drivers/llvmpipe/lp_rast.c

index 654f4ea48ebeb965e448d2d25f68379d6f89995c..ba7b48328b04b4b8dfbdbde10ebf3a4988949daf 100644 (file)
@@ -368,14 +368,15 @@ lp_rast_store_linear_color( struct lp_rasterizer_task *task,
 
    for (buf = 0; buf < rast->state.nr_cbufs; buf++) {
       struct pipe_surface *cbuf = scene->fb.cbufs[buf];
-      const unsigned face = cbuf->face, level = cbuf->level;
+      const unsigned face_slice = cbuf->face + cbuf->zslice;
+      const unsigned level = cbuf->level;
       struct llvmpipe_resource *lpt = llvmpipe_resource(cbuf->texture);
 
       if (!task->color_tiles[buf])
          continue;
 
       llvmpipe_unswizzle_cbuf_tile(lpt,
-                                   face,
+                                   face_slice,
                                    level,
                                    task->x, task->y,
                                    task->color_tiles[buf]);