nak: Add an a_has_pred parameter to waw_latency

This affects the HMMA units, among others.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
This commit is contained in:
Dave Airlie 2025-03-31 14:14:00 -05:00 committed by Marge Bot
parent 4914470327
commit 38d2212194
5 changed files with 11 additions and 2 deletions

View file

@ -380,6 +380,7 @@ fn calc_delays(f: &mut Function, sm: &dyn ShaderModel) -> u32 {
+ sm.waw_latency(
&instr.op,
i,
!instr.pred.pred_ref.is_none(),
&b.instrs[*w_ip].op,
*w_dst_idx,
);

View file

@ -7613,6 +7613,7 @@ pub trait ShaderModel {
&self,
a: &Op,
a_dst_idx: usize,
a_has_pred: bool,
b: &Op,
b_dst_idx: usize,
) -> u32;

View file

@ -71,8 +71,13 @@ fn generate_dep_graph(
uses.for_each_instr_dst_mut(instr, |i, u| {
if let Some((w_ip, w_dst_idx)) = u.write {
let latency =
sm.waw_latency(&instr.op, i, &instrs[w_ip].op, w_dst_idx);
let latency = sm.waw_latency(
&instr.op,
i,
!instr.pred.pred_ref.is_none(),
&instrs[w_ip].op,
w_dst_idx,
);
g.add_edge(ip, w_ip, EdgeLabel { latency });
}

View file

@ -138,6 +138,7 @@ impl ShaderModel for ShaderModel50 {
&self,
a: &Op,
a_dst_idx: usize,
_a_has_pred: bool,
_b: &Op,
_b_dst_idx: usize,
) -> u32 {

View file

@ -188,6 +188,7 @@ impl ShaderModel for ShaderModel70 {
&self,
a: &Op,
a_dst_idx: usize,
_a_has_pred: bool,
_b: &Op,
_b_dst_idx: usize,
) -> u32 {