ir3/legalize: resolve WAR hazards for stc
Just like scalar ALU, stc writes to the local buffer and needs (ss) to resolve WAR hazards on its sources. Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31257>
This commit is contained in:
@@ -2160,7 +2160,8 @@ soft_sy_delay(struct ir3_instruction *instr, struct ir3 *shader)
|
||||
static inline bool
|
||||
is_war_hazard_producer(struct ir3_instruction *instr)
|
||||
{
|
||||
return is_tex(instr) || is_mem(instr) || is_ss_producer(instr);
|
||||
return is_tex(instr) || is_mem(instr) || is_ss_producer(instr) ||
|
||||
instr->opc == OPC_STC;
|
||||
}
|
||||
|
||||
bool ir3_cleanup_rpt(struct ir3 *ir, struct ir3_shader_variant *v);
|
||||
|
@@ -662,7 +662,7 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block)
|
||||
* (sy)... ; sam synced so consumed its sources
|
||||
* (ss)write rs ; (ss) unnecessary since rs has been consumed already
|
||||
*/
|
||||
bool needs_ss = is_ss_producer(n) || is_store(n);
|
||||
bool needs_ss = is_ss_producer(n) || is_store(n) || n->opc == OPC_STC;
|
||||
|
||||
if (n_is_scalar_alu) {
|
||||
/* Scalar ALU also does not immediately read its source because it
|
||||
|
Reference in New Issue
Block a user