mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 16:50:10 +01:00
ir3/legalize: handle scalar ALU WAR hazards for a0.x
It turns out that mova executes on the normal pipeline, which means that
users of a0.x on the scalar pipeline might cause a WAR hazard with mova.
Fixes: 876c5396a7 ("ir3: Add support for "scalar ALU"")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
This commit is contained in:
parent
dead168200
commit
72bb4d79dc
2 changed files with 7 additions and 1 deletions
|
|
@ -1416,6 +1416,12 @@ is_reg_gpr(const struct ir3_register *reg)
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_reg_a0(const struct ir3_register *reg)
|
||||
{
|
||||
return reg->num == regid(REG_A0, 0);
|
||||
}
|
||||
|
||||
/* is dst a normal temp register: */
|
||||
static inline bool
|
||||
is_dest_gpr(const struct ir3_register *dst)
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block)
|
|||
* need to wait for previous ones.
|
||||
*/
|
||||
foreach_src (reg, n) {
|
||||
if (reg->flags & IR3_REG_SHARED) {
|
||||
if ((reg->flags & IR3_REG_SHARED) || is_reg_a0(reg)) {
|
||||
regmask_set(&state->needs_ss_scalar_war, reg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue