summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-07-14 16:52:10 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-07-17 19:26:53 -0700
commit7ef7738a61ded5632105b8de6f8141307592e20a (patch)
tree0e8aa05531fc5b7bc2e432d110596dfa0af64b6f /src/mesa/drivers/dri/i965/brw_fs_nir.cpp
parenta03812c32188f6d29d386165ca02771fe0865352 (diff)
downloadexternal_mesa3d-7ef7738a61ded5632105b8de6f8141307592e20a.zip
external_mesa3d-7ef7738a61ded5632105b8de6f8141307592e20a.tar.gz
external_mesa3d-7ef7738a61ded5632105b8de6f8141307592e20a.tar.bz2
i965: Write gl_FragCoord directly to the destination.
This patch makes emit_general_interpolation take a destination register as an argument, and write directly to that. This is simpler than the old approach of ralloc'ing a register, writing to that temporary, and then making the caller emit per-component MOVs to copy it to the actual destination. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_nir.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index ccf0d09..898f23a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -62,9 +62,7 @@ fs_visitor::nir_setup_inputs()
fs_reg reg;
if (var->data.location == VARYING_SLOT_POS) {
- reg = *emit_fragcoord_interpolation();
- emit_percomp(bld, fs_inst(BRW_OPCODE_MOV, bld.dispatch_width(),
- input, reg), 0xF);
+ emit_fragcoord_interpolation(input);
} else if (var->data.location == VARYING_SLOT_LAYER) {
struct brw_reg reg = suboffset(interp_reg(VARYING_SLOT_LAYER, 1), 3);
reg.type = BRW_REGISTER_TYPE_D;