Mesa (8.0): i965: Fix Gen6+ dynamic state upper bound on older kernels.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Mar 21 06:30:54 UTC 2012


Module: Mesa
Branch: 8.0
Commit: 3d036f3f0aa7360c58d76b3f5114e1cf8c32260c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d036f3f0aa7360c58d76b3f5114e1cf8c32260c

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Feb 29 12:32:41 2012 -0800

i965: Fix Gen6+ dynamic state upper bound on older kernels.

Kernels prior to 271d81b84171d84723357ae6d172ec16b0d8139c (March 2011)
don't support relocations outside of the target buffer object.  Rather
than guarding this with a I915_PARAM_HAS_RELAXED_DELTA check, just
smash the bound to 0xfffff001 like we do on Ironlake.

This effectively gives us no upper bound check, just like we did prior
to commit 271d81b84171d84723357ae6d172ec16b0d8139c.

Daniel Vetter would also like to mention that this relies on the guard
page at the end of the GTT.

Fixes a regression since 271d81b84171d84723357ae6d172ec16b0d8139c.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46766
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
(cherry picked from commit b2ace06cbbbb1021e2d7ace12a985c6406821939)

---

 src/mesa/drivers/dri/i965/brw_misc_state.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 0343ae1..07462d3 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -774,8 +774,7 @@ static void upload_state_base_address( struct brw_context *brw )
 	* If this isn't programmed to a real bound, the sampler border color
 	* pointer is rejected, causing border color to mysteriously fail.
 	*/
-       OUT_RELOC(intel->batch.bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-		 intel->batch.bo->size | 1);
+       OUT_BATCH(0xfffff001);
        OUT_BATCH(1); /* Indirect object upper bound */
        OUT_BATCH(1); /* Instruction access upper bound */
        ADVANCE_BATCH();




More information about the mesa-commit mailing list