From: Jason Ekstrand Date: Fri, 12 May 2017 19:03:47 +0000 (-0700) Subject: intel/blorp: Set additional brw_wm_prog_key fields on gen4-5 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23125b710278d357da98d0542bf76df6026e931a;p=mesa.git intel/blorp: Set additional brw_wm_prog_key fields on gen4-5 Reviewed-by: Topi Pohjolainen --- diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c index 1f29b93235b..7f1566f00a4 100644 --- a/src/intel/blorp/blorp.c +++ b/src/intel/blorp/blorp.c @@ -153,7 +153,7 @@ brw_blorp_init_wm_prog_key(struct brw_wm_prog_key *wm_key) const unsigned * blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, struct nir_shader *nir, - const struct brw_wm_prog_key *wm_key, + struct brw_wm_prog_key *wm_key, bool use_repclear, struct brw_wm_prog_data *wm_prog_data, unsigned *program_size) @@ -177,6 +177,13 @@ blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, nir_remove_dead_variables(nir, nir_var_shader_in); nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); + if (blorp->compiler->devinfo->gen < 6) { + if (nir->info.fs.uses_discard) + wm_key->iz_lookup |= BRW_WM_IZ_PS_KILL_ALPHATEST_BIT; + + wm_key->input_slots_valid = nir->info.inputs_read | VARYING_BIT_POS; + } + const unsigned *program = brw_compile_fs(compiler, blorp->driver_ctx, mem_ctx, wm_key, wm_prog_data, nir, NULL, -1, -1, false, use_repclear, diff --git a/src/intel/blorp/blorp_priv.h b/src/intel/blorp/blorp_priv.h index b3a5b2b6dec..99772308fe6 100644 --- a/src/intel/blorp/blorp_priv.h +++ b/src/intel/blorp/blorp_priv.h @@ -333,7 +333,7 @@ void brw_blorp_init_wm_prog_key(struct brw_wm_prog_key *wm_key); const unsigned * blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, struct nir_shader *nir, - const struct brw_wm_prog_key *wm_key, + struct brw_wm_prog_key *wm_key, bool use_repclear, struct brw_wm_prog_data *wm_prog_data, unsigned *program_size);