From: Eric Anholt Date: Wed, 27 Jun 2018 22:16:05 +0000 (-0700) Subject: v3d: Print CLIF fixed-point values as just their decimal value. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6237c6404941e81ce5bde4dd350fad64564ba67b;p=mesa.git v3d: Print CLIF fixed-point values as just their decimal value. The parser doesn't handle float input, so we have to dump the raw value. --- diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c index 084fc64d365..c1e9e50a247 100644 --- a/src/broadcom/cle/v3d_decoder.c +++ b/src/broadcom/cle/v3d_decoder.c @@ -925,14 +925,24 @@ v3d_field_iterator_next(struct clif_dump *clif, struct v3d_field_iterator *iter) iter->field->type.v3d_struct->name); break; case V3D_TYPE_SFIXED: - snprintf(iter->value, sizeof(iter->value), "%f", - __gen_unpack_sfixed(iter->p, s, e, - iter->field->type.f)); + if (clif->pretty) { + snprintf(iter->value, sizeof(iter->value), "%f", + __gen_unpack_sfixed(iter->p, s, e, + iter->field->type.f)); + } else { + snprintf(iter->value, sizeof(iter->value), "%u", + (unsigned)__gen_unpack_uint(iter->p, s, e)); + } break; case V3D_TYPE_UFIXED: - snprintf(iter->value, sizeof(iter->value), "%f", - __gen_unpack_ufixed(iter->p, s, e, - iter->field->type.f)); + if (clif->pretty) { + snprintf(iter->value, sizeof(iter->value), "%f", + __gen_unpack_ufixed(iter->p, s, e, + iter->field->type.f)); + } else { + snprintf(iter->value, sizeof(iter->value), "%u", + (unsigned)__gen_unpack_uint(iter->p, s, e)); + } break; case V3D_TYPE_MBO: break;