summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-05-12 12:03:47 -0700
committerJason Ekstrand <[email protected]>2017-05-26 07:58:01 -0700
commit23125b710278d357da98d0542bf76df6026e931a (patch)
treea758b396f6ff1a3efc00fbaa516869225e2bd046
parent79b486f73635df41334da79ce4593bab999895ab (diff)
intel/blorp: Set additional brw_wm_prog_key fields on gen4-5
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/intel/blorp/blorp.c9
-rw-r--r--src/intel/blorp/blorp_priv.h2
2 files changed, 9 insertions, 2 deletions
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);