diff --git a/src/compiler/spirv/spirv_info.h b/src/compiler/spirv/spirv_info.h index 8b8b68723fb..c9bfcda18d0 100644 --- a/src/compiler/spirv/spirv_info.h +++ b/src/compiler/spirv/spirv_info.h @@ -38,5 +38,6 @@ const char *spirv_imageoperands_to_string(SpvImageOperandsMask op); const char *spirv_memorymodel_to_string(SpvMemoryModel cap); const char *spirv_op_to_string(SpvOp op); const char *spirv_storageclass_to_string(SpvStorageClass sc); +const char *spirv_fproundingmode_to_string(SpvFPRoundingMode sc); #endif /* SPIRV_INFO_H */ diff --git a/src/compiler/spirv/spirv_info_c.py b/src/compiler/spirv/spirv_info_c.py index 29baec1fc30..f1a1e272083 100644 --- a/src/compiler/spirv/spirv_info_c.py +++ b/src/compiler/spirv/spirv_info_c.py @@ -124,6 +124,7 @@ if __name__ == "__main__": collect_data(spirv_info, "MemoryModel"), collect_data(spirv_info, "StorageClass"), collect_data(spirv_info, "ImageOperands"), + collect_data(spirv_info, "FPRoundingMode"), collect_opcodes(spirv_info), ] diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c index b403a25e51b..6d64dd752f3 100644 --- a/src/compiler/spirv/vtn_alu.c +++ b/src/compiler/spirv/vtn_alu.c @@ -388,7 +388,8 @@ handle_rounding_mode(struct vtn_builder *b, struct vtn_value *val, int member, *out_rounding_mode = nir_rounding_mode_rtz; break; default: - unreachable("Not supported rounding mode"); + vtn_fail("Unsupported rounding mode: %s", + spirv_fproundingmode_to_string(dec->operands[0])); break; } }