diff --git a/src/nouveau/compiler/nak/api.rs b/src/nouveau/compiler/nak/api.rs index 7e40cf4a4be..fe8ea3fb2ad 100644 --- a/src/nouveau/compiler/nak/api.rs +++ b/src/nouveau/compiler/nak/api.rs @@ -156,6 +156,9 @@ fn nir_options(dev: &nv_device_info) -> nir_shader_compiler_options { | nir_lower_shift64 | nir_lower_imul_2x32_64 | nir_lower_conv64); + if dev.sm < 32 { + op.lower_int64_options |= nir_lower_shift64; + } op.lower_ldexp = true; op.lower_fmod = true; op.lower_ffract = true; diff --git a/src/nouveau/compiler/nak/hw_tests.rs b/src/nouveau/compiler/nak/hw_tests.rs index 8481cd79384..8f2a8cba441 100644 --- a/src/nouveau/compiler/nak/hw_tests.rs +++ b/src/nouveau/compiler/nak/hw_tests.rs @@ -918,6 +918,9 @@ fn test_op_popc() { #[test] fn test_op_shf() { let sm = &RunSingleton::get().sm; + if sm.sm() < 32 { + return; + } let types = [IntType::U32, IntType::I32, IntType::U64, IntType::I64]; @@ -1249,6 +1252,10 @@ fn test_isetp64() { #[test] fn test_shl64() { let run = RunSingleton::get(); + if run.sm.sm() < 32 { + return; + } + let invocations = 100; let mut b = TestShaderBuilder::new(run.sm.as_ref()); @@ -1283,6 +1290,10 @@ fn test_shl64() { #[test] fn test_shr64() { let run = RunSingleton::get(); + if run.sm.sm() < 32 { + return; + } + let invocations = 100; let cases = [true, false];