Mesa (master): blorp: Use FullSurfaceDepthandStencilClear for blorp_hiz_op
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Wed Jun 7 15:55:45 UTC 2017
Module: Mesa
Branch: master
Commit: bacae7221bf9b82520175fd7c8d1f5089096159d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bacae7221bf9b82520175fd7c8d1f5089096159d
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Mon Jun 5 17:18:48 2017 -0700
blorp: Use FullSurfaceDepthandStencilClear for blorp_hiz_op
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 at intel.com>
---
src/intel/blorp/blorp.c | 1 +
src/intel/blorp/blorp_genX_exec.h | 3 +++
src/intel/blorp/blorp_priv.h | 1 +
3 files changed, 5 insertions(+)
diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
index fe5dccdeb5..9c88658e8a 100644
--- a/src/intel/blorp/blorp.c
+++ b/src/intel/blorp/blorp.c
@@ -294,6 +294,7 @@ blorp_hiz_op(struct blorp_batch *batch, struct blorp_surf *surf,
blorp_params_init(¶ms);
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;
diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index 7c8a9416c5..1d77877db5 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -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:
diff --git a/src/intel/blorp/blorp_priv.h b/src/intel/blorp/blorp_priv.h
index 99772308fe..b265362f9b 100644
--- a/src/intel/blorp/blorp_priv.h
+++ b/src/intel/blorp/blorp_priv.h
@@ -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;
More information about the mesa-commit
mailing list