nak/sm50: Add execution delays for more ops

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
This commit is contained in:
Faith Ekstrand
2024-07-26 19:19:18 -05:00
committed by Marge Bot
parent ce91e8875a
commit c2b5d7ca41
2 changed files with 30 additions and 25 deletions
+30 -18
View File
@@ -464,27 +464,39 @@ fn assign_barriers(f: &mut Function, sm: &dyn ShaderModel) {
}
fn exec_latency(sm: u8, op: &Op) -> u32 {
match op {
Op::Bar(_) | Op::MemBar(_) => {
if sm >= 80 {
6
} else {
5
if sm >= 70 {
match op {
Op::Bar(_) | Op::MemBar(_) => {
if sm >= 80 {
6
} else {
5
}
}
Op::CCtl(_op) => {
// CCTL.C needs 8, CCTL.I needs 11
11
}
// Op::DepBar(_) => 4,
_ => 1, // TODO: co-issue
}
Op::CCtl(_op) => {
// CCTL.C needs 8, CCTL.I needs 11
11
} else {
match op {
Op::CCtl(_)
| Op::MemBar(_)
| Op::Bra(_)
| Op::SSy(_)
| Op::Sync(_)
| Op::Brk(_)
| Op::PBk(_)
| Op::Cont(_)
| Op::PCnt(_)
| Op::Exit(_)
| Op::Bar(_)
| Op::Kill(_)
| Op::OutFinal(_) => 13,
_ => 1,
}
Op::Kill(_) if sm < 70 => {
13
}
_ if sm < 70 && (op.is_crs_push() || op.is_branch()) => {
// pre-Volta needs a delay for control-flow ops
13
}
// Op::DepBar(_) => 4,
_ => 1, // TODO: co-issue
}
}
-7
View File
@@ -6084,13 +6084,6 @@ pub enum Op {
impl_display_for_op!(Op);
impl Op {
pub fn is_crs_push(&self) -> bool {
match self {
Op::SSy(_) | Op::PBk(_) | Op::PCnt(_) => true,
_ => false,
}
}
pub fn is_branch(&self) -> bool {
match self {
Op::Bra(_)