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,
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,
if (enable) {
if (value) {
*owner = applier;
- fprintf(stderr, "radeon: Acquired Hyper-Z.\n");
+ if (request == RADEON_INFO_WANT_HYPERZ) {
+ printf("radeon: Acquired Hyper-Z.\n");
+ }
pipe_mutex_unlock(*mutex);
return TRUE;
}
} else {
*owner = NULL;
- fprintf(stderr, "radeon: Released Hyper-Z.\n");
+ if (request == RADEON_INFO_WANT_HYPERZ) {
+ printf("radeon: Released Hyper-Z.\n");
+ }
}
pipe_mutex_unlock(*mutex);
switch (fid) {
case RADEON_FID_R300_HYPERZ_ACCESS:
- if (debug_get_bool_option("RADEON_HYPERZ", FALSE)) {
- return radeon_set_fd_access(cs, &cs->ws->hyperz_owner,
- &cs->ws->hyperz_owner_mutex,
- RADEON_INFO_WANT_HYPERZ, enable);
- } else {
- return FALSE;
- }
+ return radeon_set_fd_access(cs, &cs->ws->hyperz_owner,
+ &cs->ws->hyperz_owner_mutex,
+ RADEON_INFO_WANT_HYPERZ, enable);
case RADEON_FID_R300_CMASK_ACCESS:
if (debug_get_bool_option("RADEON_CMASK", FALSE)) {