cell: Fix bus error when there is no depth buffer
authorIan Romanick <idr@us.ibm.com>
Fri, 21 Mar 2008 00:36:05 +0000 (17:36 -0700)
committerIan Romanick <idr@us.ibm.com>
Fri, 21 Mar 2008 00:37:26 +0000 (17:37 -0700)
src/gallium/drivers/cell/spu/spu_tri.c

index c9f8cad..c4272d6 100644 (file)
@@ -261,6 +261,9 @@ do_depth_test(int x, int y, mask_t quadmask)
    float4 zvals;
    mask_t mask;
 
+   if (spu.fb.depth_format == PIPE_FORMAT_NONE)
+      return quadmask;
+
    zvals.v = eval_z((float) x, (float) y);
 
    mask = (mask_t) spu_do_depth_stencil(x - setup.cliprect_minx,