nak: Lower 64-bit shifts in NIR on Kepler A and earlier
SHF is introduced on Kepler B. Without it, there's nothing we can do that's more efficient than NIR's lowering. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
This commit is contained in:
committed by
Marge Bot
parent
9fbf63b584
commit
d249e7ddac
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user