gallivm: fix debug prints for halfs
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 4 Mar 2022 15:42:59 +0000 (10:42 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sun, 6 Mar 2022 02:44:17 +0000 (02:44 +0000)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15246>

src/gallium/auxiliary/gallivm/lp_bld_printf.c

index aa52e03..4db2c09 100644 (file)
@@ -100,7 +100,7 @@ lp_build_print_value(struct gallivm_state *gallivm,
       length = 1;
    }
 
-   if (type_kind == LLVMFloatTypeKind || type_kind == LLVMDoubleTypeKind) {
+   if (type_kind == LLVMFloatTypeKind || type_kind == LLVMDoubleTypeKind || type_kind == LLVMHalfTypeKind) {
       type_fmt[2] = '.';
       type_fmt[3] = '9';
       type_fmt[4] = 'g';