Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
if (ins->src[src] != SSA_FIXED_REGISTER(REGISTER_CONSTANT))
continue;
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))
comp_mapping[src], bundle_constants, 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 */
}
/* If non-destructive, we're done */