mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
aco: avoid unnecessary copies in emit_wqm()
No fossil-db changes. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15347>
This commit is contained in:
parent
4bccee123f
commit
f12eb5c213
1 changed files with 5 additions and 8 deletions
|
|
@ -169,19 +169,16 @@ emit_mbcnt(isel_context* ctx, Temp dst, Operand mask = Operand(), Operand base =
|
|||
Temp
|
||||
emit_wqm(Builder& bld, Temp src, Temp dst = Temp(0, s1), bool program_needs_wqm = false)
|
||||
{
|
||||
if (!dst.id())
|
||||
dst = bld.tmp(src.regClass());
|
||||
|
||||
assert(src.size() == dst.size());
|
||||
|
||||
if (bld.program->stage != fragment_fs) {
|
||||
if (!dst.id())
|
||||
return src;
|
||||
|
||||
bld.copy(Definition(dst), src);
|
||||
return dst;
|
||||
else
|
||||
return bld.copy(Definition(dst), src);
|
||||
} else if (!dst.id()) {
|
||||
dst = bld.tmp(src.regClass());
|
||||
}
|
||||
|
||||
assert(src.size() == dst.size());
|
||||
bld.pseudo(aco_opcode::p_wqm, Definition(dst), src);
|
||||
bld.program->needs_wqm |= program_needs_wqm;
|
||||
return dst;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue