aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_debug.c32
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_debug.h9
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_math.h2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_video.h4
4 files changed, 46 insertions, 1 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_debug.c b/mesalib/src/gallium/auxiliary/util/u_debug.c
index dc840e856..d79f31ea9 100644
--- a/mesalib/src/gallium/auxiliary/util/u_debug.c
+++ b/mesalib/src/gallium/auxiliary/util/u_debug.c
@@ -46,6 +46,12 @@
#include <limits.h> /* CHAR_BIT */
#include <ctype.h> /* isalnum */
+#ifdef _WIN32
+#include <windows.h>
+#include <stdlib.h>
+#endif
+
+
void _debug_vprintf(const char *format, va_list ap)
{
static char buf[4096] = {'\0'};
@@ -64,6 +70,32 @@ void _debug_vprintf(const char *format, va_list ap)
}
+void
+debug_disable_error_message_boxes(void)
+{
+#ifdef _WIN32
+ /* When Windows' error message boxes are disabled for this process (as is
+ * typically the case when running tests in an automated fashion) we disable
+ * CRT message boxes too.
+ */
+ UINT uMode = SetErrorMode(0);
+ SetErrorMode(uMode);
+ if (uMode & SEM_FAILCRITICALERRORS) {
+ /* Disable assertion failure message box.
+ * http://msdn.microsoft.com/en-us/library/sas1dkb2.aspx
+ */
+ _set_error_mode(_OUT_TO_STDERR);
+#ifdef _MSC_VER
+ /* Disable abort message box.
+ * http://msdn.microsoft.com/en-us/library/e631wekh.aspx
+ */
+ _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
+#endif
+ }
+#endif /* _WIN32 */
+}
+
+
#ifdef DEBUG
void debug_print_blob( const char *name,
const void *blob,
diff --git a/mesalib/src/gallium/auxiliary/util/u_debug.h b/mesalib/src/gallium/auxiliary/util/u_debug.h
index 9c414211b..badd5e296 100644
--- a/mesalib/src/gallium/auxiliary/util/u_debug.h
+++ b/mesalib/src/gallium/auxiliary/util/u_debug.h
@@ -139,6 +139,15 @@ void debug_print_format(const char *msg, unsigned fmt );
/**
+ * Disable interactive error message boxes.
+ *
+ * Should be called as soon as possible for effectiveness.
+ */
+void
+debug_disable_error_message_boxes(void);
+
+
+/**
* Hard-coded breakpoint.
*/
#ifdef DEBUG
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h
index 2ade64af4..b9ed197d7 100644
--- a/mesalib/src/gallium/auxiliary/util/u_math.h
+++ b/mesalib/src/gallium/auxiliary/util/u_math.h
@@ -579,7 +579,7 @@ static INLINE unsigned util_last_bit(unsigned u)
*/
static INLINE unsigned util_last_bit_signed(int i)
{
-#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407)
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER)
return 31 - __builtin_clrsb(i);
#else
if (i >= 0)
diff --git a/mesalib/src/gallium/auxiliary/util/u_video.h b/mesalib/src/gallium/auxiliary/util/u_video.h
index da65a5861..d1ca7362b 100644
--- a/mesalib/src/gallium/auxiliary/util/u_video.h
+++ b/mesalib/src/gallium/auxiliary/util/u_video.h
@@ -60,7 +60,11 @@ u_reduce_video_profile(enum pipe_video_profile profile)
case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH422:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444:
return PIPE_VIDEO_FORMAT_MPEG4_AVC;
default: