ir3: Use ldc.u in preamble
r63.u isn't a shared reg, so we weren't setting the .u bit on ldc. But in a preamble, we should be. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
This commit is contained in:
@@ -748,11 +748,11 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block)
|
||||
last_input_needs_ss = false;
|
||||
}
|
||||
|
||||
/* I'm not exactly what this is for, but it seems we need this on every
|
||||
* mova1 in early preambles.
|
||||
*/
|
||||
if (writes_addr1(n) && block->in_early_preamble)
|
||||
n->srcs[0]->flags |= IR3_REG_R;
|
||||
/* In earlypreamble we need to use mova.u/ldc.u: */
|
||||
if (block->in_early_preamble) {
|
||||
if (writes_addr1(n) || (n->opc == OPC_LDC))
|
||||
n->flags |= IR3_INSTR_U;
|
||||
}
|
||||
|
||||
if ((n->opc == OPC_SHPE) && (ctx->compiler->gen >= 8) &&
|
||||
regmask_get_any_gpr(&state->needs_sy)) {
|
||||
|
||||
@@ -504,8 +504,10 @@ validate_instr(struct ir3_validate_ctx *ctx, struct ir3_instruction *instr)
|
||||
case OPC_LDC:
|
||||
validate_assert(ctx, !(instr->srcs[0]->flags & IR3_REG_HALF));
|
||||
validate_assert(ctx, !(instr->srcs[1]->flags & IR3_REG_HALF));
|
||||
validate_assert(ctx, !!(instr->dsts[0]->flags & IR3_REG_SHARED) ==
|
||||
!!(instr->flags & IR3_INSTR_U));
|
||||
if (instr->dsts[0]->num != INVALID_REG) {
|
||||
validate_assert(ctx, !!(instr->dsts[0]->flags & IR3_REG_SHARED) ==
|
||||
!!(instr->flags & IR3_INSTR_U));
|
||||
}
|
||||
break;
|
||||
case OPC_LDC_K:
|
||||
validate_assert(ctx, !(instr->srcs[0]->flags & IR3_REG_HALF));
|
||||
|
||||
Reference in New Issue
Block a user