[Mesa-dev] [PATCH 2/4] i965: Add WARN_ONCE for depthstencil workarounds we shouldn't be hitting.

Eric Anholt eric at anholt.net
Tue Feb 26 23:15:18 PST 2013


---
 src/mesa/drivers/dri/i965/gen6_blorp.cpp |    3 +++
 src/mesa/drivers/dri/i965/gen7_blorp.cpp |    3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index 3834ae2..2b6db82 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -855,6 +855,9 @@ gen6_blorp_emit_depth_stencil_config(struct brw_context *brw,
        * tile_x and tile_y to 0.  This is a temporary workaround until we come
        * up with a better solution.
        */
+      WARN_ONCE((tile_x & 7) || (tile_y & 7),
+                "Depth/stencil buffer needs alignment to 8-pixel boundaries.\n"
+                "Truncating offset, bad rendering may occur.\n");
       tile_x &= ~7;
       tile_y &= ~7;
 
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index 21caa0a..b6719b7 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -612,6 +612,9 @@ gen7_blorp_emit_depth_stencil_config(struct brw_context *brw,
        * tile_x and tile_y to 0.  This is a temporary workaround until we come
        * up with a better solution.
        */
+      WARN_ONCE((tile_x & 7) || (tile_y & 7),
+                "Depth/stencil buffer needs alignment to 8-pixel boundaries.\n"
+                "Truncating offset, bad rendering may occur.\n");
       tile_x &= ~7;
       tile_y &= ~7;
 
-- 
1.7.10.4



More information about the mesa-dev mailing list