[Mesa-dev] [PATCH 36/43] intel/blorp: Set additional brw_wm_prog_key fields on gen4-5
Pohjolainen, Topi
topi.pohjolainen at gmail.com
Thu May 18 06:25:34 UTC 2017
On Tue, May 16, 2017 at 03:45:30PM -0700, Jason Ekstrand wrote:
> ---
> src/intel/blorp/blorp.c | 9 ++++++++-
> src/intel/blorp/blorp_priv.h | 2 +-
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
> index 1f29b93..7f1566f 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;
I just realized that if you passed the wm key built here to
blorp_ensure_sf_program() you wouldn't need to recalculate valid slots using
wm_prog_data->num_varying_inputs, right?
> + }
> +
> 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 b3a5b2b..9977230 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);
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list