summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915/i915_vtbl.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-06-09 16:12:43 -0700
committerEric Anholt <eric@anholt.net>2009-06-09 16:12:43 -0700
commitb30dc2c66aeaad6661eef515a08a3da89aa07cb2 (patch)
treedf79cf877c4c707967b8d4acc163a8d1205ee9d3 /src/mesa/drivers/dri/i915/i915_vtbl.c
parent38eddf04ed04966db09b67de4cdabef681dc2696 (diff)
i915: Add an option for testing the effect of early Z in classic mode.
The early Z stuff is supposed to be unsafe without some more work in the enable/disable path (in particular, how do we want to get it disabled on the way out to the X Server?), but at the moment is 6% in OA.
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_vtbl.c')
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 6ecbc4709b..2fca247af1 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -42,6 +42,7 @@
#include "intel_regions.h"
#include "intel_tris.h"
#include "intel_fbo.h"
+#include "intel_chipset.h"
#include "i915_reg.h"
#include "i915_context.h"
@@ -611,6 +612,14 @@ i915_state_draw_region(struct intel_context *intel,
}
}
+ /* This isn't quite safe, thus being hidden behind an option. When changing
+ * the value of this bit, the pipeline needs to be MI_FLUSHed. And it
+ * can only be set when a depth buffer is already defined.
+ */
+ if (IS_945(intel->intelScreen->deviceID) && intel->use_early_z &&
+ depth_region->tiling != I915_TILING_NONE)
+ value |= CLASSIC_EARLY_DEPTH;
+
if (depth_region && depth_region->cpp == 4) {
value |= DEPTH_FRMT_24_FIXED_8_OTHER;
}