Kenneth Graunke <kenn...@whitecape.org> writes: > On 11/12/2012 10:53 AM, Eric Anholt wrote: >> - bool has_source_modifiers = inst->src[0].abs || inst->src[0].negate; >> + bool has_source_modifiers = (inst->src[0].abs || >> + inst->src[0].negate || >> + inst->src[0].file == UNIFORM); >> >> /* Found a move of a GRF to a GRF. Let's see if we can coalesce >> * them: check for no writes to either one until the exit of the >> @@ -1611,10 +1631,8 @@ fs_visitor::register_coalesce() >> * unusual register regions, so avoid coalescing those for >> * now. We should do something more specific. >> */ >> - if (intel->gen >= 6 && >> - scan_inst->is_math() && >> - (has_source_modifiers || inst->src[0].file == UNIFORM)) { >> - interfered = true; >> + if (has_source_modifiers && !can_do_source_mods(inst)) { >> + interfered = true; >> break; >> } > > This looks like it'll prevent MATH on uniforms for Gen6. As far as I > know, that's allowed, so I'd rather not lose that...
See this existing comment: /* Can't do hstride == 0 args to gen6 math, so expand it out. We * might be able to do better by doing execsize = 1 math and then * expanding that result out, but we would need to be careful with * masking. * * Gen 6 hardware ignores source modifiers (negate and abs) on math * instructions, so we also move to a temp to set those up. */ uniforms are hstride == 0. > Also, there's another subtle change here: >= 6 becomes == 6. In other > words, we begin allowing source modifiers on Gen7+. This is correct, > but I'd really love to see it in a separate 1-line patch for the sake of > bisectability. (Call me paranoid, but that's the sort of thing that can > lead to bizarre failures in obscure cases...) I'll split it out.
pgp3upifs5Rwj.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev