pan/mdg: Apply abs/neg modifiers
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102>
This commit is contained in:
committed by
Marge Bot
parent
24e2e24dc0
commit
b124f5315c
@@ -603,6 +603,15 @@ static void
|
||||
mir_copy_src(midgard_instruction *ins, nir_alu_instr *instr, unsigned i, unsigned to, bool *abs, bool *neg, bool is_int, unsigned bcast_count)
|
||||
{
|
||||
nir_alu_src src = instr->src[i];
|
||||
|
||||
if (!is_int) {
|
||||
if (pan_has_source_mod(&src, nir_op_fneg))
|
||||
*neg = !(*neg);
|
||||
|
||||
if (pan_has_source_mod(&src, nir_op_fabs))
|
||||
*abs = true;
|
||||
}
|
||||
|
||||
unsigned bits = nir_src_bit_size(src.src);
|
||||
|
||||
ins->src[to] = nir_src_index(NULL, &src.src);
|
||||
|
||||
Reference in New Issue
Block a user