i965/blorp: Add support for setting fast clear operation
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 1 Apr 2016 18:42:21 +0000 (21:42 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 21 Apr 2016 07:20:02 +0000 (10:20 +0300)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_blorp.cpp
src/mesa/drivers/dri/i965/brw_blorp.h
src/mesa/drivers/dri/i965/gen7_blorp.cpp
src/mesa/drivers/dri/i965/gen8_blorp.cpp

index 8c69f6f3147ffb6dbfd35f606b5536f108cb789d..18296237efdac588f39e1c73ecb529273174fc77 100644 (file)
@@ -164,6 +164,7 @@ brw_blorp_params::brw_blorp_params(unsigned num_varyings,
      y1(0),
      depth_format(0),
      hiz_op(GEN6_HIZ_OP_NONE),
+     fast_clear_op(0),
      use_wm_prog(false),
      num_varyings(num_varyings),
      num_draw_buffers(num_draw_buffers),
index a1aaa2096f23cf669725c494b675ed6884992809..a291aff4525e396828012c47438c75b288780116 100644 (file)
@@ -241,6 +241,7 @@ public:
    brw_blorp_surface_info src;
    brw_blorp_surface_info dst;
    enum gen6_hiz_op hiz_op;
+   unsigned fast_clear_op;
    bool use_wm_prog;
    brw_blorp_wm_push_constants wm_push_consts;
    const unsigned num_varyings;
index 630128cdc8d25976f3200d57f214bae675c4896d..11d075ae903b3738d29d8f4cf41872b83189c5a1 100644 (file)
@@ -532,6 +532,8 @@ gen7_blorp_emit_ps_config(struct brw_context *brw,
       dw5 |= prog_data->first_curbe_grf << GEN7_PS_DISPATCH_START_GRF_SHIFT_0;
    }
 
+   dw4 |= params->fast_clear_op;
+
    BEGIN_BATCH(8);
    OUT_BATCH(_3DSTATE_PS << 16 | (8 - 2));
    OUT_BATCH(params->use_wm_prog ? prog_offset : 0);
index d362dbe90534d26222ad875762622b9454e7474f..65ebf5ba44cf4cf39e9347ae76a9d8292404935b 100644 (file)
@@ -386,6 +386,7 @@ gen8_blorp_emit_ps_config(struct brw_context *brw,
       dw6 |= (64 - 2) << HSW_PS_MAX_THREADS_SHIFT;
 
    dw6 |= GEN7_PS_POSOFFSET_NONE;
+   dw6 |= params->fast_clear_op;
 
    BEGIN_BATCH(12);
    OUT_BATCH(_3DSTATE_PS << 16 | (12 - 2));