[Mesa-dev] [PATCH] gen7: Use logical, not physical, dims in 3DSTATE_DEPTH_BUFFER

Chad Versace chad.versace at linux.intel.com
Tue Oct 1 14:43:50 PDT 2013


In 3DSTATE_DEPTH_BUFFER, we set Width and Height to the miptree slice's
physical dimensions. (Logical and physical dimensions may differ for
multisample surfaces).

However, in SURFACE_STATE, we always set Width and Height to the slice's
logical dimensions. We should do the same for 3DSTATE_DEPTH_BUFFER,
because the hw docs say so.

No Piglit regressions (-x glx) on Ivybridge with Wayland.

CC: Paul Berry <stereotype441 at gmail.com>
CC: Jordan Justen <jordan.l.justen at intel.com>
CC: Ben Widawsky <ben at bwidawsk.net>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 src/mesa/drivers/dri/i965/gen7_blorp.cpp    | 3 ---
 src/mesa/drivers/dri/i965/gen7_misc_state.c | 5 -----
 2 files changed, 8 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index 9df3d92..158f801 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -705,9 +705,6 @@ gen7_blorp_emit_depth_stencil_config(struct brw_context *brw,
        */
       surfwidth = params->depth.width;
       surfheight = params->depth.height;
-   } else {
-      surfwidth = params->depth.mt->physical_width0;
-      surfheight = params->depth.mt->physical_height0;
    }
 
    /* 3DSTATE_DEPTH_BUFFER */
diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c
index eb942cf..6a08e23 100644
--- a/src/mesa/drivers/dri/i965/gen7_misc_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c
@@ -92,11 +92,6 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
 
    lod = irb ? irb->mt_level - irb->mt->first_level : 0;
 
-   if (mt) {
-      width = mt->physical_width0;
-      height = mt->physical_height0;
-   }
-
    /* _NEW_DEPTH, _NEW_STENCIL, _NEW_BUFFERS */
    BEGIN_BATCH(7);
    /* 3DSTATE_DEPTH_BUFFER dw0 */
-- 
1.8.3.1



More information about the mesa-dev mailing list