From ab0a3f30b8070a0204c023f8ea5375f1d3f710fd Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 7 Aug 2010 01:59:31 +0200 Subject: r300g: fix cbzb clears when hyperz is off --- src/gallium/drivers/r300/r300_hyperz.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/r300/r300_hyperz.c') 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; -- cgit v1.2.3