projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
v3d: do not report alpha-test as supported
[mesa.git]
/
src
/
broadcom
/
cle
/
v3d_packet_helpers.h
diff --git
a/src/broadcom/cle/v3d_packet_helpers.h
b/src/broadcom/cle/v3d_packet_helpers.h
index bc1bf3eb76ec94aff16d8646ef1ae8f5dcb21c6b..841df89b32aee98630cb00cd5022fdf442352561 100644
(file)
--- a/
src/broadcom/cle/v3d_packet_helpers.h
+++ b/
src/broadcom/cle/v3d_packet_helpers.h
@@
-21,17
+21,23
@@
* IN THE SOFTWARE.
*/
* 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 <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
#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))
#define __gen_validate_value(x) VALGRIND_CHECK_MEM_IS_DEFINED(&(x), sizeof(x))
+#endif
#else
#define VG(x)
#endif
#else
#define VG(x)
#endif
@@
-203,3
+209,12
@@
__gen_unpack_float(const uint8_t *restrict cl, uint32_t start, uint32_t end)
return f->f;
}
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