i965/blorp: Add support for setting fast clear operation

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Topi Pohjolainen 2016-04-01 21:42:21 +03:00
parent 7de72f728b
commit da5a477ce4
4 changed files with 5 additions and 0 deletions

View 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),

View 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;

View 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);

View 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));