summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_blit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 651ea8529e8..4f9d7c92fa8 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -170,12 +170,14 @@ static uint32_t r300_hiz_clear_value(double depth)
{
uint32_t r = (uint32_t)(CLAMP(depth, 0, 1) * 255.5);
assert(r <= 255);
return r | (r << 8) | (r << 16) | (r << 24);
}
+DEBUG_GET_ONCE_BOOL_OPTION(hyperz, "RADEON_HYPERZ", FALSE)
+
/* Clear currently bound buffers. */
static void r300_clear(struct pipe_context* pipe,
unsigned buffers,
const union pipe_color_union *color,
double depth,
unsigned stencil)
@@ -243,13 +245,14 @@ static void r300_clear(struct pipe_context* pipe,
/* If we need Hyper-Z. */
if (zmask_clear || hiz_clear) {
r300->num_z_clears++;
/* Try to obtain the access to Hyper-Z buffers if we don't have one. */
- if (!r300->hyperz_enabled) {
+ if (!r300->hyperz_enabled &&
+ (r300->screen->caps.is_r500 || debug_get_option_hyperz())) {
r300->hyperz_enabled =
r300->rws->cs_request_feature(r300->cs,
RADEON_FID_R300_HYPERZ_ACCESS,
TRUE);
if (r300->hyperz_enabled) {
/* Need to emit HyperZ buffer regs for the first time. */