i965: Drop redundant check for non-tiled depth buffer
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 7 Jun 2017 08:00:43 +0000 (11:00 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 20 Jul 2017 08:32:21 +0000 (11:32 +0300)
Depth buffers are always Y-tiled. In brw_miptree_choose_tiling()
driver opts to use linear buffers for small and 1D but this does
not apply for depth - GL_DEPTH_COMPONENT and GL_DEPTH_STENCIL_EXT
are considered first.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/gen6_depth_state.c

index 0c43d2b4b2be60c15c6a4343c7d0d9e5af4daa73..1e3be784c5b9d58af6f757e6291c38cedff3278a 100644 (file)
@@ -383,8 +383,7 @@ brw_emit_depth_stencil_hiz(struct brw_context *brw,
    OUT_BATCH((depth_mt ? depth_mt->surf.row_pitch - 1 : 0) |
              (depthbuffer_format << 18) |
              (BRW_TILEWALK_YMAJOR << 26) |
-             ((depth_mt ? depth_mt->surf.tiling != ISL_TILING_LINEAR : 1)
-              << 27) |
+             (1 << 27) |
              (depth_surface_type << 29));
 
    if (depth_mt) {
index 8f05b4cc1a85d57338033205ae467849756752cc..3e3d2c629bf599e53cc0101d362a62b661dbe2ea 100644 (file)
@@ -121,8 +121,7 @@ gen6_emit_depth_stencil_hiz(struct brw_context *brw,
              ((enable_hiz_ss ? 1 : 0) << 21) | /* separate stencil enable */
              ((enable_hiz_ss ? 1 : 0) << 22) | /* hiz enable */
              (BRW_TILEWALK_YMAJOR << 26) |
-             ((depth_mt ? depth_mt->surf.tiling != ISL_TILING_LINEAR : 1)
-              << 27) |
+             (1 << 27) |
              (surftype << 29));
 
    /* 3DSTATE_DEPTH_BUFFER dw2 */