r600: add missing ZPASS setup bits for r7xx+
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 9 Nov 2009 16:34:13 +0000 (11:34 -0500)
committerAlex Deucher <alexdeucher@gmail.com>
Mon, 9 Nov 2009 17:16:55 +0000 (12:16 -0500)
src/mesa/drivers/dri/r600/r600_reg_r7xx.h
src/mesa/drivers/dri/r600/r700_state.c

index e5c01c861aa129e6e843aef23a296ce999cd56b6..eb169bd885d605b50b915bd8612a7d256a89981e 100644 (file)
@@ -143,6 +143,8 @@ enum {
 //  SQ_TEX_SAMPLER_MISC_0                                 = 0x0003d03c,
        R7xx_TRUNCATE_COORD_bit                           = 1 << 9,
        R7xx_DISABLE_CUBE_WRAP_bit                        = 1 << 10,
+//  DB_RENDER_CONTROL                                     = 0x00028d0c,
+       PERFECT_ZPASS_COUNTS_bit                          = 1 << 15,
 
 } ;
 
index b2788872666e0bb10ea4bbb9e195f22fe3c2d785..b95fc87d309eda3588308a8c1789397b97e2e06a 100644 (file)
@@ -1686,6 +1686,10 @@ void r700InitState(GLcontext * ctx) //-------------------
     SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIS_ENABLE0_shift, FORCE_HIS_ENABLE0_mask);
     SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIS_ENABLE1_shift, FORCE_HIS_ENABLE1_mask);
     SETbit(r700->DB_RENDER_OVERRIDE.u32All, NOOP_CULL_DISABLE_bit);
+    if (context->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV770)
+    {
+           CLEARbit(r700->DB_RENDER_CONTROL.u32All, PERFECT_ZPASS_COUNTS_bit);
+    }
 
     r700->DB_ALPHA_TO_MASK.u32All = 0;
     SETfield(r700->DB_ALPHA_TO_MASK.u32All, 2, ALPHA_TO_MASK_OFFSET0_shift, ALPHA_TO_MASK_OFFSET0_mask);