summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_hyperz.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-08-07 01:59:31 +0200
committerMarek Olšák <maraeo@gmail.com>2010-08-07 02:00:21 +0200
commitab0a3f30b8070a0204c023f8ea5375f1d3f710fd (patch)
tree961d382dee6ac71b81654eb75f659001ca276b0a /src/gallium/drivers/r300/r300_hyperz.c
parenta838cee6bc3a2e144c00f0a5f0a7791cd97037ab (diff)
r300g: fix cbzb clears when hyperz is off
Diffstat (limited to 'src/gallium/drivers/r300/r300_hyperz.c')
-rw-r--r--src/gallium/drivers/r300/r300_hyperz.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c
index 10e440ce30..523d547ea9 100644
--- a/src/gallium/drivers/r300/r300_hyperz.c
+++ b/src/gallium/drivers/r300/r300_hyperz.c
@@ -21,12 +21,14 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#include "util/u_format.h"
-#include "util/u_mm.h"
#include "r300_context.h"
#include "r300_hyperz.h"
#include "r300_reg.h"
#include "r300_fs.h"
+#include "r300_winsys.h"
+
+#include "util/u_format.h"
+#include "util/u_mm.h"
/*
HiZ rules - taken from various docs
@@ -138,6 +140,9 @@ static void r300_update_hyperz(struct r300_context* r300)
return;
}
+ if (!r300->rws->get_value(r300->rws, R300_CAN_HYPERZ))
+ return;
+
/* Zbuffer compression. */
if (r300->z_compression) {
z->zb_bw_cntl |= R300_RD_COMP_ENABLE;