From 36d9d11882aeb13c890ce51eb23c3ee0f4b833c5 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 11 Oct 2024 11:17:13 -0500 Subject: [PATCH] nak: Remove annotations before calc_instr_deps() Otherwise the annotations might throw off latency information which needs exact instruction counts. Part-of: --- src/nouveau/compiler/nak/api.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nouveau/compiler/nak/api.rs b/src/nouveau/compiler/nak/api.rs index c146b83dd97..9ee2fd5d302 100644 --- a/src/nouveau/compiler/nak/api.rs +++ b/src/nouveau/compiler/nak/api.rs @@ -426,6 +426,9 @@ pub extern "C" fn nak_compile_shader( } else { pass!(s, opt_crs); } + + s.remove_annotations(); + pass!(s, calc_instr_deps); s.gather_info(); @@ -435,8 +438,6 @@ pub extern "C" fn nak_compile_shader( write!(asm, "{}", s).expect("Failed to dump assembly"); } - s.remove_annotations(); - let code = sm.encode_shader(&s); let bin = Box::new(ShaderBin::new(sm.as_ref(), &s.info, fs_key, code, &asm));