Mesa (master): i965/blorp: Set the dynamic state upper bound.

Paul Berry stereotype441 at kemper.freedesktop.org
Fri May 25 15:45:32 UTC 2012


Module: Mesa
Branch: master
Commit: de9752a4e59e869e905cb898c4a0dbe539c43c8d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=de9752a4e59e869e905cb898c4a0dbe539c43c8d

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue May 22 16:16:43 2012 -0700

i965/blorp: Set the dynamic state upper bound.

We know from previous bug fixes (commits
c25e5300cba7628b58df93ead14ebc3cc32f338c and
b2ace06cbbbb1021e2d7ace12a985c6406821939) that texture border color
doesn't work if the dynamic state upper bound is set to 0.  Although
the blorp engine doesn't make use of texture borders, it seems like we
ought to err on the safe side and set this value properly.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/gen6_blorp.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index 4e21ddf..601bc9b 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -136,7 +136,12 @@ gen6_blorp_emit_state_base_address(struct brw_context *brw,
       OUT_BATCH(1); /* InstructionBaseAddress */
    }
    OUT_BATCH(1); /* GeneralStateUpperBound */
-   OUT_BATCH(1); /* DynamicStateUpperBound */
+   /* Dynamic state upper bound.  Although the documentation says that
+    * programming it to zero will cause it to be ignored, that is a lie.
+    * If this isn't programmed to a real bound, the sampler border color
+    * pointer is rejected, causing border color to mysteriously fail.
+    */
+   OUT_BATCH(0xfffff001);
    OUT_BATCH(1); /* IndirectObjectUpperBound*/
    OUT_BATCH(1); /* InstructionAccessUpperBound */
    ADVANCE_BATCH();




More information about the mesa-commit mailing list