aboutsummaryrefslogtreecommitdiffstats
path: root/src/broadcom/cle/v3d_decoder.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-07-30 11:41:15 -0700
committerEric Anholt <[email protected]>2018-07-30 14:29:01 -0700
commit89ac6fa4036da815b5cf4985f438cec73df67480 (patch)
tree28f33d348e354b1e42c1b7fb77e9ee2e140cc5e8 /src/broadcom/cle/v3d_decoder.c
parente146e3a795ecd070679b8dfd1ad7f370e9ec5665 (diff)
v3d: Add pack header support for f187 values.
V3D only has one of these (the top 16 bits of a float32) left in its CLs, but VC4 had many more. This gets us proper pretty-printing of the values instead of a large uint.
Diffstat (limited to 'src/broadcom/cle/v3d_decoder.c')
-rw-r--r--src/broadcom/cle/v3d_decoder.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c
index 7eb963fcf18..22367ca6f76 100644
--- a/src/broadcom/cle/v3d_decoder.c
+++ b/src/broadcom/cle/v3d_decoder.c
@@ -316,6 +316,8 @@ string_to_type(struct parser_context *ctx, const char *s)
return (struct v3d_type) { .kind = V3D_TYPE_BOOL };
else if (strcmp(s, "float") == 0)
return (struct v3d_type) { .kind = V3D_TYPE_FLOAT };
+ else if (strcmp(s, "f187") == 0)
+ return (struct v3d_type) { .kind = V3D_TYPE_F187 };
else if (strcmp(s, "address") == 0)
return (struct v3d_type) { .kind = V3D_TYPE_ADDRESS };
else if (strcmp(s, "offset") == 0)
@@ -887,6 +889,11 @@ v3d_field_iterator_next(struct clif_dump *clif, struct v3d_field_iterator *iter)
__gen_unpack_float(iter->p, s, e));
break;
+ case V3D_TYPE_F187:
+ snprintf(iter->value, sizeof(iter->value), "%f",
+ __gen_unpack_f187(iter->p, s, e));
+ break;
+
case V3D_TYPE_ADDRESS: {
uint32_t addr =
__gen_unpack_uint(iter->p, s, e) << (31 - (e - s));