diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-01-08 05:41:41 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-01-08 05:41:41 +0000 |
commit | 28b1530fee42a3fea77d7918f5f612e2e052f659 (patch) | |
tree | 08a228d317d8f1d7fe500b868d3334e371cf3102 /lib/mesa/src/util/u_vector.h | |
parent | e0bf2746b74787c4c07df1bb7b1585d70397b9cb (diff) |
Revert to Mesa 13.0.6 again.
Corruption has again been reported on Intel hardware running Xorg with
the modesetting driver (which uses OpenGL based acceleration instead of
SNA acceleration the intel driver defaults to).
Reported in various forms on Sandy Bridge (X220), Ivy Bridge (X230) and
Haswell (X240). Confirmed to not occur with the intel driver but the
xserver was changed to default to the modesetting driver on >= gen4
hardware (except Ironlake).
One means of triggering this is to open a large pdf with xpdf on an
idle machine and highlight a section of the document.
There have been reports of gpu hangs on gen4 intel hardware
(T500 with GM45, X61 with 965GM) when starting Xorg as well.
Diffstat (limited to 'lib/mesa/src/util/u_vector.h')
-rw-r--r-- | lib/mesa/src/util/u_vector.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mesa/src/util/u_vector.h b/lib/mesa/src/util/u_vector.h index cd8a95dcb..8fa4ec483 100644 --- a/lib/mesa/src/util/u_vector.h +++ b/lib/mesa/src/util/u_vector.h @@ -31,13 +31,14 @@ #include <stdint.h> #include <stdlib.h> +#include "util/u_math.h" #include "util/macros.h" /* TODO - move to u_math.h - name it better etc */ static inline uint32_t u_align_u32(uint32_t v, uint32_t a) { - assert(a != 0 && a == (a & -((int32_t) a))); + assert(a != 0 && a == (a & -a)); return (v + a - 1) & ~(a - 1); } @@ -81,9 +82,9 @@ u_vector_finish(struct u_vector *queue) } #define u_vector_foreach(elem, queue) \ - STATIC_ASSERT(__builtin_types_compatible_p(__typeof__(queue), struct u_vector *)); \ + static_assert(__builtin_types_compatible_p(__typeof__(queue), struct u_vector *), ""); \ for (uint32_t __u_vector_offset = (queue)->tail; \ - elem = (void *)((char *)(queue)->data + (__u_vector_offset & ((queue)->size - 1))), __u_vector_offset < (queue)->head; \ + elem = (queue)->data + (__u_vector_offset & ((queue)->size - 1)), __u_vector_offset < (queue)->head; \ __u_vector_offset += (queue)->element_size) |