summaryrefslogtreecommitdiffstats
path: root/src/broadcom/cle/v3d_packet_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/broadcom/cle/v3d_packet_helpers.h')
-rw-r--r--src/broadcom/cle/v3d_packet_helpers.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/broadcom/cle/v3d_packet_helpers.h b/src/broadcom/cle/v3d_packet_helpers.h
index 4720f643328..f340b790697 100644
--- a/src/broadcom/cle/v3d_packet_helpers.h
+++ b/src/broadcom/cle/v3d_packet_helpers.h
@@ -26,6 +26,7 @@
#include <stdbool.h>
#include <assert.h>
#include <math.h>
+#include <gallium/auxiliary/util/u_math.h>
#ifdef HAVE_VALGRIND
#include <valgrind.h>
@@ -205,3 +206,11 @@ __gen_unpack_float(const uint8_t *restrict cl, uint32_t start, uint32_t end)
return f->f;
}
+static inline float
+__gen_unpack_f187(const uint8_t *restrict cl, uint32_t start, uint32_t end)
+{
+ assert(end - start == 15);
+ uint32_t bits = __gen_unpack_uint(cl, start, end);
+ return uif(bits << 16);
+}
+