mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
ir3: add is_war_hazard_producer helper
Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
This commit is contained in:
parent
ce5c0c21c4
commit
bb13f30db2
2 changed files with 10 additions and 1 deletions
|
|
@ -2154,6 +2154,15 @@ soft_sy_delay(struct ir3_instruction *instr, struct ir3 *shader)
|
|||
}
|
||||
}
|
||||
|
||||
/* Some instructions don't immediately consume their sources so may introduce a
|
||||
* WAR hazard.
|
||||
*/
|
||||
static inline bool
|
||||
is_war_hazard_producer(struct ir3_instruction *instr)
|
||||
{
|
||||
return is_tex(instr) || is_mem(instr) || is_ss_producer(instr);
|
||||
}
|
||||
|
||||
bool ir3_cleanup_rpt(struct ir3 *ir, struct ir3_shader_variant *v);
|
||||
bool ir3_merge_rpt(struct ir3 *ir, struct ir3_shader_variant *v);
|
||||
bool ir3_opt_predicates(struct ir3 *ir, struct ir3_shader_variant *v);
|
||||
|
|
|
|||
|
|
@ -649,7 +649,7 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block)
|
|||
/* both tex/sfu appear to not always immediately consume
|
||||
* their src register(s):
|
||||
*/
|
||||
if (is_tex(n) || is_mem(n) || is_ss_producer(n)) {
|
||||
if (is_war_hazard_producer(n)) {
|
||||
/* These WAR hazards can always be resolved with (ss). However, when
|
||||
* the reader is a sy-producer, they can also be resolved using (sy)
|
||||
* because once we have synced the reader's results using (sy), its
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue