blorp: Use FullSurfaceDepthandStencilClear for blorp_hiz_op
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Jun 2017 00:18:48 +0000 (17:18 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 7 Jun 2017 15:54:54 +0000 (08:54 -0700)
The blorp_hiz_op entrypoint always acts on a full subresource of a HiZ
buffer so we can just set the flag unconditionally.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/blorp/blorp.c
src/intel/blorp/blorp_genX_exec.h
src/intel/blorp/blorp_priv.h

index fe5dccdeb5904f4713bfb8364205d53f64567cfa..9c88658e8ac0dd846beb90db30ba2bca564fc775 100644 (file)
@@ -294,6 +294,7 @@ blorp_hiz_op(struct blorp_batch *batch, struct blorp_surf *surf,
    blorp_params_init(&params);
 
    params.hiz_op = op;
+   params.full_surface_hiz_op = true;
 
    for (uint32_t a = 0; a < num_layers; a++) {
       const uint32_t layer = start_layer + a;
index 7c8a9416c58768a78d164b12bae53af04b274f6c..1d77877db5397121ef09e1cba13c0630cf940c6f 100644 (file)
@@ -1470,11 +1470,14 @@ blorp_emit_gen8_hiz_op(struct blorp_batch *batch,
          hzp.StencilBufferClearEnable = params->stencil.enabled;
          hzp.DepthBufferClearEnable = params->depth.enabled;
          hzp.StencilClearValue = params->stencil_ref;
+         hzp.FullSurfaceDepthandStencilClear = params->full_surface_hiz_op;
          break;
       case BLORP_HIZ_OP_DEPTH_RESOLVE:
+         assert(params->full_surface_hiz_op);
          hzp.DepthBufferResolveEnable = true;
          break;
       case BLORP_HIZ_OP_HIZ_RESOLVE:
+         assert(params->full_surface_hiz_op);
          hzp.HierarchicalDepthBufferResolveEnable = true;
          break;
       case BLORP_HIZ_OP_NONE:
index 99772308fe603d22036f0e643b73cd44ba5bf5c2..b265362f9b1bc105420d17d3fd7fdb23db54b363 100644 (file)
@@ -185,6 +185,7 @@ struct blorp_params
    struct brw_blorp_surface_info src;
    struct brw_blorp_surface_info dst;
    enum blorp_hiz_op hiz_op;
+   bool full_surface_hiz_op;
    enum blorp_fast_clear_op fast_clear_op;
    bool color_write_disable[4];
    struct brw_blorp_wm_inputs wm_inputs;