softpipe: fix texture view crashes
[mesa.git] / src / gallium / drivers / softpipe / sp_quad_depth_test_tmp.h
index e7b70f7ea6531e00627d0449cf164de4eb86bb80..7128bf8486b5449b7d4346d462080abbc3d10bb4 100644 (file)
@@ -71,7 +71,7 @@ NAME(struct quad_stage *qs,
 
    depth_step = (ushort)(dzdx * scale);
 
-   tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, ix, iy, 0);
+   tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, ix, iy, quads[0]->input.layer);
 
    for (i = 0; i < nr; i++) {
       const unsigned outmask = quads[i]->inout.mask;