* IN THE SOFTWARE.
*/
+#ifndef MESA_V3D_PACKET_HELPERS_H
+#define MESA_V3D_PACKET_HELPERS_H
+
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#include <math.h>
+#include "util/u_math.h"
#ifdef HAVE_VALGRIND
#include <valgrind.h>
#include <memcheck.h>
#define VG(x) x
+#ifndef NDEBUG
#define __gen_validate_value(x) VALGRIND_CHECK_MEM_IS_DEFINED(&(x), sizeof(x))
+#endif
#else
-#define VG(x)
+#define VG(x) ((void)0)
#endif
#ifndef __gen_validate_value
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);
+}
+
+#endif