Module: Mesa Branch: master Commit: b8e077daee4d6369d774efaa99879a9871c68194 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8e077daee4d6369d774efaa99879a9871c68194
Author: Brian Paul <[email protected]> Date: Fri Mar 29 10:45:44 2019 -0600 util: no-op __builtin_types_compatible_p() for non-GCC compilers __builtin_types_compatible_p() is GCC-specific and breaks the MSVC build. This intrinsic has been in u_vector_foreach() for a long time, but that macro has only recently been used in code (nir/nir_opt_comparison_pre.c) that's built with MSVC. Fixes: 2cf59861a ("nir: Add partial redundancy elimination for compares") Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Ian Romanick <[email protected]> --- src/util/u_vector.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/u_vector.h b/src/util/u_vector.h index cd8a95dcbe3..6807748e3b1 100644 --- a/src/util/u_vector.h +++ b/src/util/u_vector.h @@ -80,6 +80,10 @@ u_vector_finish(struct u_vector *queue) free(queue->data); } +#ifndef __GNUC__ +#define __builtin_types_compatible_p(x) 1 +#endif + #define u_vector_foreach(elem, queue) \ STATIC_ASSERT(__builtin_types_compatible_p(__typeof__(queue), struct u_vector *)); \ for (uint32_t __u_vector_offset = (queue)->tail; \ _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
