pan/mdg: Separately pack constants to the upper half

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
This commit is contained in:
Alyssa Rosenzweig 2020-05-11 16:05:48 -04:00 committed by Marge Bot
parent d475d19f09
commit 4e4c9f5f5a
1 changed files with 11 additions and 2 deletions

View File

@ -456,9 +456,18 @@ mir_adjust_constants(midgard_instruction *ins,
if (ins->src[src] != SSA_FIXED_REGISTER(REGISTER_CONSTANT))
continue;
if (!mir_adjust_constant(ins, src, &bundle_constant_mask,
/* First, try lower half (or whole for !16) */
if (mir_adjust_constant(ins, src, &bundle_constant_mask,
comp_mapping[src], bundle_constants, false))
return false;
continue;
/* Next, try upper half */
if (mir_adjust_constant(ins, src, &bundle_constant_mask,
comp_mapping[src], bundle_constants, true))
continue;
/* Otherwise bail */
return false;
}
/* If non-destructive, we're done */