i965: Change signature of brw_get_depthstencil_tile_masks()
authorChad Versace <chad.versace@linux.intel.com>
Fri, 5 Apr 2013 21:29:53 +0000 (14:29 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Wed, 10 Apr 2013 17:55:10 +0000 (10:55 -0700)
Add new parameters `depth_level` and `depth_layer`, which specify depth
miptree's slice of interest.  A following patch will pass the new
parameters through to intel_miptree_slice_has_hiz().

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/gen6_blorp.cpp
src/mesa/drivers/dri/i965/gen7_blorp.cpp

index afcba461f76e3c4b5c86d871e38c1003283fa6d0..541288dd378a7101002eee56cd7a55a58686e804 100644 (file)
@@ -1127,6 +1127,8 @@ bool brwCreateContext(int api,
  * brw_misc_state.c
  */
 void brw_get_depthstencil_tile_masks(struct intel_mipmap_tree *depth_mt,
+                                     uint32_t depth_level,
+                                     uint32_t depth_layer,
                                      struct intel_mipmap_tree *stencil_mt,
                                      uint32_t *out_tile_mask_x,
                                      uint32_t *out_tile_mask_y);
index 25672ebe186a6f16aa9c7f911e48e333b782774f..187803869ade9f471ebc45c35017a51a80cfe5e9 100644 (file)
@@ -271,6 +271,8 @@ brw_depthbuffer_format(struct brw_context *brw)
  */
 void
 brw_get_depthstencil_tile_masks(struct intel_mipmap_tree *depth_mt,
+                                uint32_t depth_level,
+                                uint32_t depth_layer,
                                 struct intel_mipmap_tree *stencil_mt,
                                 uint32_t *out_tile_mask_x,
                                 uint32_t *out_tile_mask_y)
@@ -367,7 +369,10 @@ brw_workaround_depthstencil_alignment(struct brw_context *brw,
    }
 
    uint32_t tile_mask_x, tile_mask_y;
-   brw_get_depthstencil_tile_masks(depth_mt, stencil_mt,
+   brw_get_depthstencil_tile_masks(depth_mt,
+                                   depth_mt ? depth_irb->mt_level : 0,
+                                   depth_mt ? depth_irb->mt_layer : 0,
+                                   stencil_mt,
                                    &tile_mask_x, &tile_mask_y);
 
    if (depth_irb) {
index e6b8485c3ed711b0c0c3f1987b500ee1d0c8355e..b6fbd44d3b6cc1a11848514dbf39374a43ec42db 100644 (file)
@@ -829,7 +829,10 @@ gen6_blorp_emit_depth_stencil_config(struct brw_context *brw,
    uint32_t draw_y = params->depth.y_offset;
    uint32_t tile_mask_x, tile_mask_y;
 
-   brw_get_depthstencil_tile_masks(params->depth.mt, NULL,
+   brw_get_depthstencil_tile_masks(params->depth.mt,
+                                   params->depth.level,
+                                   params->depth.layer,
+                                   NULL,
                                    &tile_mask_x, &tile_mask_y);
 
    /* 3DSTATE_DEPTH_BUFFER */
index bfd2cbd279ec343e3181e2527371a66e30e5c80d..423dd3c8295dc13e3695a75699b50e3c4446b3ac 100644 (file)
@@ -585,7 +585,10 @@ gen7_blorp_emit_depth_stencil_config(struct brw_context *brw,
    uint32_t tile_mask_x, tile_mask_y;
 
    if (params->depth.mt) {
-      brw_get_depthstencil_tile_masks(params->depth.mt, NULL,
+      brw_get_depthstencil_tile_masks(params->depth.mt,
+                                      params->depth.level,
+                                      params->depth.layer,
+                                      NULL,
                                       &tile_mask_x, &tile_mask_y);
    }