aco: don't affect isPrecise() after applying output modifiers
fossil-db (GFX10.3): Totals from 26679 (19.14% of 139391) affected shaders: SGPRs: 1757155 -> 1757059 (-0.01%); split: -0.05%, +0.04% VGPRs: 1175932 -> 1173556 (-0.20%); split: -0.21%, +0.01% CodeSize: 86203592 -> 85572480 (-0.73%); split: -0.73%, +0.00% MaxWaves: 315513 -> 315805 (+0.09%); split: +0.10%, -0.00% Instrs: 16297785 -> 16143745 (-0.95%); split: -0.95%, +0.00% Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8718>
This commit is contained in:
@@ -884,6 +884,10 @@ public:
|
||||
temp = t;
|
||||
}
|
||||
|
||||
void swapTemp(Definition& other) noexcept {
|
||||
std::swap(temp, other.temp);
|
||||
}
|
||||
|
||||
constexpr RegClass regClass() const noexcept
|
||||
{
|
||||
return temp.regClass();
|
||||
|
||||
@@ -2674,7 +2674,7 @@ bool apply_omod_clamp(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::swap(instr->definitions[0], def_info.instr->definitions[0]);
|
||||
instr->definitions[0].swapTemp(def_info.instr->definitions[0]);
|
||||
ctx.info[instr->definitions[0].tempId()].label &= label_clamp;
|
||||
ctx.uses[def_info.instr->definitions[0].tempId()]--;
|
||||
|
||||
@@ -2806,7 +2806,7 @@ void combine_vop3p(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
|
||||
VOP3P_instruction* candidate = &ctx.info[instr->operands[0].tempId()].instr->vop3p();
|
||||
candidate->clamp = true;
|
||||
propagate_swizzles(candidate, vop3p->opsel_lo, vop3p->opsel_hi);
|
||||
std::swap(instr->definitions[0], candidate->definitions[0]);
|
||||
instr->definitions[0].swapTemp(candidate->definitions[0]);
|
||||
ctx.info[candidate->definitions[0].tempId()].instr = candidate;
|
||||
ctx.uses[instr->definitions[0].tempId()]--;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user