diff options
author | Matt Turner <[email protected]> | 2017-06-14 14:47:19 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2018-02-28 11:15:47 -0800 |
commit | b1afdf9fc121df7e2e757fb9cf0d2c1f37a408ba (patch) | |
tree | 020dcaf713a2dca68a9d54eee0de8f58d6907077 /src | |
parent | 2cff3242109078999c57d5e6772418c09e835826 (diff) |
intel/compiler/fs: Fix application of cmod and saturate to LINE/MAC pair
This isn't technically broken, but the next patch will make this
function report whether it generated multiple instructions, and that
information will be used to disable the application of conditional mod
by the generic code.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/compiler/brw_fs_generator.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp index cd5be054f69..bba917d7551 100644 --- a/src/intel/compiler/brw_fs_generator.cpp +++ b/src/intel/compiler/brw_fs_generator.cpp @@ -673,13 +673,22 @@ fs_generator::generate_linterp(fs_inst *inst, struct brw_reg delta_x = src[0]; struct brw_reg delta_y = offset(src[0], inst->exec_size / 8); struct brw_reg interp = src[1]; + brw_inst *i[2]; if (devinfo->has_pln && (devinfo->gen >= 7 || (delta_x.nr & 1) == 0)) { brw_PLN(p, dst, interp, delta_x); } else { - brw_LINE(p, brw_null_reg(), interp, delta_x); - brw_MAC(p, dst, suboffset(interp, 1), delta_y); + i[0] = brw_LINE(p, brw_null_reg(), interp, delta_x); + i[1] = brw_MAC(p, dst, suboffset(interp, 1), delta_y); + + brw_inst_set_cond_modifier(p->devinfo, i[1], inst->conditional_mod); + + /* brw_set_default_saturate() is called before emitting instructions, so + * the saturate bit is set in each instruction, so we need to unset it on + * the first instruction. + */ + brw_inst_set_saturate(p->devinfo, i[0], false); } } |