intel: Use a system value for gl_FragCoord

It's kind-of an anomaly that the Intel drivers are still treating
gl_FragCoord as an input.  It also makes zero sense because we have to
special-case it in the back-end.

Because ANV is the only user of nir_lower_wpos_center, we go ahead and
just update it to look for nir_intrinsic_load_frag_coord as part of this
patch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2019-07-18 09:59:44 -05:00
parent 44268b1c72
commit 4bb6e6817e
11 changed files with 19 additions and 52 deletions

View File

@@ -145,7 +145,7 @@ void fs_visitor::setup_fs_payload_gen4()
payload.subspan_coord_reg[0] = reg++;
prog_data->uses_src_depth =
(nir->info.inputs_read & (1 << VARYING_SLOT_POS)) != 0;
(nir->info.system_values_read & (1ull << SYSTEM_VALUE_FRAG_COORD)) != 0;
if (wm_iz_table[lookup].sd_present || prog_data->uses_src_depth ||
kill_stats_promoted_workaround) {
payload.source_depth_reg[0] = reg;