llvmpipe: fix the worst of the depth regressions since switch to 4x4
authorKeith Whitwell <keithw@vmware.com>
Thu, 22 Oct 2009 16:21:37 +0000 (17:21 +0100)
committerKeith Whitwell <keithw@vmware.com>
Thu, 22 Oct 2009 16:21:37 +0000 (17:21 +0100)
src/gallium/drivers/llvmpipe/lp_rast.c

index 6e94e22e5b23dc78a2333c8a30c40f35885b1500..32cd5e09f54d7dc075ae93f32debe73838d94be7 100644 (file)
@@ -265,7 +265,7 @@ void lp_rast_shade_quads( struct lp_rasterizer *rast,
    /* depth buffer */
    assert((x % 2) == 0);
    assert((y % 2) == 0);
-   depth = tile->depth + iy*TILE_SIZE + 2*ix;
+   depth = tile->depth + (iy/4)*(16*16) + (ix/4)*16;
 
    /* XXX: This will most likely fail on 32bit x86 without -mstackrealign */
    assert(lp_check_alignment(masks, 16));