lima/ir: print names of unsupported intrinsics
authorErico Nunes <nunes.erico@gmail.com>
Sun, 5 May 2019 08:51:43 +0000 (10:51 +0200)
committerErico Nunes <nunes.erico@gmail.com>
Mon, 6 May 2019 15:15:06 +0000 (17:15 +0200)
While lima still doesn't support some kinds of intrinsics, it is more
helpful to display the name of the unsupported instr->intrinsic to make
debugging easier.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
src/gallium/drivers/lima/ir/gp/nir.c
src/gallium/drivers/lima/ir/pp/nir.c

index 8cd8d2f67e053de9c50f7fcfa09c68e5c735d8a2..f95957e8892ff3166047f81ca2e7365c3393c8b5 100644 (file)
@@ -201,7 +201,8 @@ static bool gpir_emit_intrinsic(gpir_block *block, nir_instr *ni)
       return true;
    }
    default:
-      gpir_error("unsupported nir_intrinsic_instr %d\n", instr->intrinsic);
+      gpir_error("unsupported nir_intrinsic_instr %s\n",
+                 nir_intrinsic_infos[instr->intrinsic].name);
       return false;
    }
 }
index bdf54b227c6edf7737f1bd3bcb2b1a27b0bfd324..6cb90701fd32c493a6914b785828329be14c0857 100644 (file)
@@ -266,7 +266,8 @@ static ppir_node *ppir_emit_intrinsic(ppir_block *block, nir_instr *ni)
       return &snode->node;
 
    default:
-      ppir_error("unsupported nir_intrinsic_instr %d\n", instr->intrinsic);
+      ppir_error("unsupported nir_intrinsic_instr %s\n",
+                 nir_intrinsic_infos[instr->intrinsic].name);
       return NULL;
    }
 }