From 408376b2031cf301f1a8e35e89ceefc72f2fdc94 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 26 Jan 2005 14:19:24 +0000 Subject: replace magic number with macro constant RADEON_ZBLOCK16 --- shared-core/radeon_cp.c | 3 ++- shared-core/radeon_drv.h | 1 + shared-core/radeon_state.c | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'shared-core') diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index 3b3604ba..fdba7c70 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -1336,7 +1336,8 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) */ dev_priv->depth_clear.rb3d_cntl = (RADEON_PLANE_MASK_ENABLE | (dev_priv->color_fmt << 10) | - (1 << 15)); + (dev_priv->microcode_version == UCODE_R100 ? + RADEON_ZBLOCK16 : 0)); dev_priv->depth_clear.rb3d_zstencilcntl = (dev_priv->depth_fmt | diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h index cd75bc17..30c3bcb6 100644 --- a/shared-core/radeon_drv.h +++ b/shared-core/radeon_drv.h @@ -468,6 +468,7 @@ extern void radeon_driver_free_filp_priv(drm_device_t * dev, # define RADEON_ROP_ENABLE (1 << 6) # define RADEON_STENCIL_ENABLE (1 << 7) # define RADEON_Z_ENABLE (1 << 8) +# define RADEON_ZBLOCK16 (1 << 15) #define RADEON_RB3D_DEPTHOFFSET 0x1c24 #define RADEON_RB3D_DEPTHCLEARVALUE 0x3230 #define RADEON_RB3D_DEPTHPITCH 0x1c28 diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c index e0d64a2a..86ed132c 100644 --- a/shared-core/radeon_state.c +++ b/shared-core/radeon_state.c @@ -999,7 +999,6 @@ static void radeon_cp_dispatch_clear(drm_device_t * dev, tempRE_CNTL = 0; tempRB3D_CNTL = depth_clear->rb3d_cntl; - tempRB3D_CNTL &= ~(1 << 15); /* unset radeon magic flag */ tempRB3D_ZSTENCILCNTL = depth_clear->rb3d_zstencilcntl; tempRB3D_STENCILREFMASK = 0x0; -- cgit v1.2.3