gen7: Use logical, not physical, dims in 3DSTATE_DEPTH_BUFFER (v2)
authorChad Versace <chad.versace@linux.intel.com>
Thu, 3 Oct 2013 00:21:33 +0000 (17:21 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Mon, 7 Oct 2013 18:55:24 +0000 (11:55 -0700)
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 -x glean) on Ivybridge with Wayland.

v2: No Piglit regressions, for real this time.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/gen7_blorp.cpp
src/mesa/drivers/dri/i965/gen7_misc_state.c

index 9df3d929ffb5eb26a625d242a5c4b07f38441974..f64e5369abf61db30488bc544ae5c8c81c157006 100644 (file)
@@ -706,8 +706,8 @@ 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;
+      surfwidth = params->depth.mt->logical_width0;
+      surfheight = params->depth.mt->logical_height0;
    }
 
    /* 3DSTATE_DEPTH_BUFFER */
index eb942cfcafa0c2c838890371bcc3ad28b8b241a3..3f3833e98e60451ecdd8ac01ca8fa1f177d755d6 100644 (file)
@@ -93,8 +93,8 @@ 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;
+      width = mt->logical_width0;
+      height = mt->logical_height0;
    }
 
    /* _NEW_DEPTH, _NEW_STENCIL, _NEW_BUFFERS */