aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-07 08:26:06 +0100
committermarha <marha@users.sourceforge.net>2013-11-07 08:27:25 +0100
commitc97d11aec40d8fa07d6b456bf8694133a77d35f4 (patch)
tree9e14e6f970a86af9f7107053c5c709e2e440d032 /mesalib/src/mesa
parent51c3a4e7b08aa904ff2af52a9f6f7adc748b361f (diff)
parentf7050e0ff2d1dd147ff5ef45f8ff7d8d7833db48 (diff)
downloadvcxsrv-c97d11aec40d8fa07d6b456bf8694133a77d35f4.tar.gz
vcxsrv-c97d11aec40d8fa07d6b456bf8694133a77d35f4.tar.bz2
vcxsrv-c97d11aec40d8fa07d6b456bf8694133a77d35f4.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xextproto fontconfig libxcb mesa xserver git update 7 Nov 2013 Conflicts: xorg-server/include/servermd.h
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/Makefile.am39
-rw-r--r--mesalib/src/mesa/main/compiler.h66
-rw-r--r--mesalib/src/mesa/main/glheader.h16
-rw-r--r--mesalib/src/mesa/main/shaderapi.c2
-rw-r--r--mesalib/src/mesa/math/m_clip_tmp.h12
-rw-r--r--mesalib/src/mesa/math/m_debug_util.h2
-rw-r--r--mesalib/src/mesa/program/Makefile.am45
-rw-r--r--mesalib/src/mesa/x86/assyntax.h8
8 files changed, 49 insertions, 141 deletions
diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am
index f86caee35..a54b8ac1b 100644
--- a/mesalib/src/mesa/Makefile.am
+++ b/mesalib/src/mesa/Makefile.am
@@ -19,7 +19,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = program x86 x86-64 . main/tests
+SUBDIRS = x86 x86-64 . main/tests
if HAVE_X11_DRIVER
SUBDIRS += drivers/x11
@@ -59,11 +59,17 @@ main/git_sha1.h: main/git_sha1.h.tmp
GLAPI = $(top_srcdir)/src/mapi/glapi/gen
include $(GLAPI)/glapi_gen.mk
+BUILDDIR = $(builddir)/
+include Makefile.sources
+
BUILT_SOURCES = \
main/git_sha1.h \
- main/get_hash.h
+ main/get_hash.h \
+ $(BUILDDIR)program/program_parse.tab.c \
+ $(BUILDDIR)program/lex.yy.c
CLEANFILES = \
$(BUILT_SOURCES) \
+ $(BUILDDIR)program/program_parse.tab.h \
git_sha1.h.tmp
GET_HASH_GEN = main/get_hash_generator.py
@@ -85,10 +91,6 @@ if HAVE_GALLIUM
noinst_LTLIBRARIES += libmesagallium.la
endif
-SRCDIR = $(top_srcdir)/src/mesa/
-BUILDDIR = $(top_builddir)/src/mesa/
-include Makefile.sources
-
AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
@@ -97,45 +99,46 @@ MESA_ASM_FILES_FOR_ARCH =
if HAVE_X86_ASM
MESA_ASM_FILES_FOR_ARCH += $(X86_FILES)
-AM_CPPFLAGS += \
- -I$(top_builddir)/src/mesa/x86 \
- -I$(top_srcdir)/src/mesa/x86
+AM_CPPFLAGS += -I$(builddir)/x86 -I$(srcdir)/x86
endif
if HAVE_X86_64_ASM
MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES)
-AM_CPPFLAGS += \
- -I$(top_builddir)/src/mesa/x86-64 \
- -I$(top_srcdir)/src/mesa/x86-64
+AM_CPPFLAGS += -I$(builddir)/x86-64 -I$(srcdir)/x86-64
endif
if HAVE_SPARC_ASM
MESA_ASM_FILES_FOR_ARCH += $(SPARC_FILES)
-AM_CPPFLAGS += \
- -I$(top_builddir)/src/mesa/sparc \
- -I$(top_srcdir)/src/mesa/sparc
+AM_CPPFLAGS += -I$(builddir)/sparc -I$(srcdir)/sparc
endif
libmesa_la_SOURCES = \
$(MESA_FILES) \
+ $(PROGRAM_FILES) \
$(MESA_ASM_FILES_FOR_ARCH)
libmesa_la_LIBADD = \
$(top_builddir)/src/glsl/libglsl.la \
- $(top_builddir)/src/mesa/program/libprogram.la \
$()
-libmesa_la_LDFLAGS =
libmesagallium_la_SOURCES = \
$(MESA_GALLIUM_FILES) \
+ $(PROGRAM_FILES) \
$(MESA_ASM_FILES_FOR_ARCH)
libmesagallium_la_LIBADD = \
$(top_builddir)/src/glsl/libglsl.la \
- $(top_builddir)/src/mesa/program/libprogram.la \
$()
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gl.pc
+$(BUILDDIR)program/lex.yy.c: program/program_lexer.l
+ $(MKDIR_P) $(builddir)/program
+ $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
+
+$(BUILDDIR)program/program_parse.tab.c $(BUILDDIR)program/program_parse.tab.h: program/program_parse.y
+ $(MKDIR_P) $(builddir)/program
+ $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=$(BUILDDIR)program/program_parse.tab.c $<
+
# Emacs tags
tags:
etags `find . -name \*.[ch]` $(top_srcdir)/include/GL/*.h
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h
index d806d5b9d..97075f58e 100644
--- a/mesalib/src/mesa/main/compiler.h
+++ b/mesalib/src/mesa/main/compiler.h
@@ -36,11 +36,7 @@
#include <assert.h>
#include <ctype.h>
-#if defined(__alpha__) && defined(CCPML)
-#include <cpml.h> /* use Compaq's Fast Math Library on Alpha */
-#else
#include <math.h>
-#endif
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
@@ -84,15 +80,13 @@ extern "C" {
*/
#if defined(_MSC_VER)
# define finite _finite
-#elif defined(__WATCOMC__)
-# define finite _finite
#endif
/**
* Disable assorted warnings
*/
-#if !defined(OPENSTEP) && (defined(_WIN32) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
+#if defined(_WIN32) && !defined(__CYGWIN__)
# if !defined(__GNUC__) /* mingw environment */
# pragma warning( disable : 4068 ) /* unknown pragma */
# pragma warning( disable : 4710 ) /* function 'foo' not inlined */
@@ -107,9 +101,6 @@ extern "C" {
# endif
# endif
#endif
-#if defined(__WATCOMC__)
-# pragma disable_message(201) /* Disable unreachable code warnings */
-#endif
@@ -198,7 +189,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
-#if !defined(CAPI) && defined(_WIN32) && !defined(BUILD_FOR_SNAP)
+#if !defined(CAPI) && defined(_WIN32)
#define CAPI _cdecl
#endif
@@ -208,7 +199,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
* than GNU C
*/
#ifndef _ASMAPI
-#if defined(_WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/
+#if defined(_WIN32)
#define _ASMAPI __cdecl
#else
#define _ASMAPI
@@ -239,9 +230,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
* ASSERT macro
*/
#if !defined(_WIN32_WCE)
-#if defined(BUILD_FOR_SNAP) && defined(CHECKED)
-# define ASSERT(X) _CHECK(X)
-#elif defined(DEBUG)
+#if defined(DEBUG)
# define ASSERT(X) assert(X)
#else
# define ASSERT(X)
@@ -259,6 +248,21 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
(void) sizeof(char [1 - 2*!(COND)]); \
} while (0)
+/**
+ * Unreachable macro. Useful for suppressing "control reaches end of non-void
+ * function" warnings.
+ */
+#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 5
+#define unreachable() __builtin_unreachable()
+#elif (defined(__clang__) && defined(__has_builtin))
+# if __has_builtin(__builtin_unreachable)
+# define unreachable() __builtin_unreachable()
+# endif
+#endif
+
+#ifndef unreachable
+#define unreachable()
+#endif
#if (__GNUC__ >= 3)
#define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
@@ -322,7 +326,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
defined(ia64) || defined(__ia64__) || \
defined(__hppa__) || defined(hpux) || \
defined(__mips) || defined(_MIPS_ARCH) || \
- defined(__arm__) || \
+ defined(__arm__) || defined(__aarch64__) || \
defined(__sh__) || defined(__m32r__) || \
(defined(__sun) && defined(_IEEE_754)) || \
defined(__alpha__)
@@ -383,36 +387,6 @@ do { \
__asm__ ( "fnclex ; fldcw %0" : : "m" (*&(x)) ); \
} while (0)
-#elif defined(__WATCOMC__) && defined(__386__)
-#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */
-#define FAST_X86_FPU 0x003f /* See GCC comments above */
-void _watcom_start_fast_math(unsigned short *x,unsigned short *mask);
-#pragma aux _watcom_start_fast_math = \
- "fnstcw word ptr [eax]" \
- "fldcw word ptr [ecx]" \
- parm [eax] [ecx] \
- modify exact [];
-void _watcom_end_fast_math(unsigned short *x);
-#pragma aux _watcom_end_fast_math = \
- "fnclex" \
- "fldcw word ptr [eax]" \
- parm [eax] \
- modify exact [];
-#if defined(NO_FAST_MATH)
-#define START_FAST_MATH(x) \
-do { \
- static GLushort mask = DEFAULT_X86_FPU; \
- _watcom_start_fast_math(&x,&mask); \
-} while (0)
-#else
-#define START_FAST_MATH(x) \
-do { \
- static GLushort mask = FAST_X86_FPU; \
- _watcom_start_fast_math(&x,&mask); \
-} while (0)
-#endif
-#define END_FAST_MATH(x) _watcom_end_fast_math(&x)
-
#elif defined(_MSC_VER) && defined(_M_IX86)
#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */
#define FAST_X86_FPU 0x003f /* See GCC comments above */
diff --git a/mesalib/src/mesa/main/glheader.h b/mesalib/src/mesa/main/glheader.h
index 4ed51b317..7f7f9a39b 100644
--- a/mesalib/src/mesa/main/glheader.h
+++ b/mesalib/src/mesa/main/glheader.h
@@ -33,22 +33,6 @@
#define GLHEADER_H
-#ifdef WGLAPI
-#undef WGLAPI
-#endif
-
-
-#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
-# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
-# define WGLAPI __declspec(dllexport)
-# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
-# define WGLAPI __declspec(dllimport)
-# else /* for use with static link lib build of Win32 edition only */
-# define WGLAPI __declspec(dllimport)
-# endif /* _STATIC_MESA support */
-#endif /* WIN32 / CYGWIN bracket */
-
-
#define GL_GLEXT_PROTOTYPES
#include "GL/gl.h"
#include "GL/glext.h"
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index 7da860ddf..1d9aac39d 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -825,6 +825,8 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
fprintf(stderr, "GLSL source for %s shader %d:\n",
_mesa_glsl_shader_target_name(sh->Type), sh->Name);
fprintf(stderr, "%s\n", sh->Source);
+ fprintf(stderr, "Info Log:\n%s\n", sh->InfoLog);
+ fflush(stderr);
}
if (ctx->Shader.Flags & GLSL_REPORT_ERRORS) {
diff --git a/mesalib/src/mesa/math/m_clip_tmp.h b/mesalib/src/mesa/math/m_clip_tmp.h
index 5cfcf91dd..45dec47f0 100644
--- a/mesalib/src/mesa/math/m_clip_tmp.h
+++ b/mesalib/src/mesa/math/m_clip_tmp.h
@@ -60,7 +60,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
const GLfloat cy = from[1];
const GLfloat cz = from[2];
const GLfloat cw = from[3];
-#if defined(macintosh) || defined(__powerpc__)
+#if defined(__powerpc__)
/* on powerpc cliptest is 17% faster in this way. */
GLuint mask;
mask = (((cw < cx) << CLIP_RIGHT_SHIFT));
@@ -71,7 +71,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
mask |= (((cw < cz) << CLIP_FAR_SHIFT));
mask |= (((cw < -cz) << CLIP_NEAR_SHIFT));
}
-#else /* !defined(macintosh)) */
+#else
GLubyte mask = 0;
if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT;
if ( cx + cw < 0) mask |= CLIP_LEFT_BIT;
@@ -81,7 +81,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
if (-cz + cw < 0) mask |= CLIP_FAR_BIT;
if ( cz + cw < 0) mask |= CLIP_NEAR_BIT;
}
-#endif /* defined(macintosh) */
+#endif
clipMask[i] = mask;
if (mask) {
@@ -140,7 +140,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
const GLfloat cy = from[1];
const GLfloat cz = from[2];
const GLfloat cw = from[3];
-#if defined(macintosh) || defined(__powerpc__)
+#if defined(__powerpc__)
/* on powerpc cliptest is 17% faster in this way. */
GLuint mask;
mask = (((cw < cx) << CLIP_RIGHT_SHIFT));
@@ -151,7 +151,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
mask |= (((cw < cz) << CLIP_FAR_SHIFT));
mask |= (((cw < -cz) << CLIP_NEAR_SHIFT));
}
-#else /* !defined(macintosh)) */
+#else
GLubyte mask = 0;
if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT;
if ( cx + cw < 0) mask |= CLIP_LEFT_BIT;
@@ -161,7 +161,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
if (-cz + cw < 0) mask |= CLIP_FAR_BIT;
if ( cz + cw < 0) mask |= CLIP_NEAR_BIT;
}
-#endif /* defined(macintosh) */
+#endif
clipMask[i] = mask;
if (mask) {
diff --git a/mesalib/src/mesa/math/m_debug_util.h b/mesalib/src/mesa/math/m_debug_util.h
index d526e9656..d05da8994 100644
--- a/mesalib/src/mesa/math/m_debug_util.h
+++ b/mesalib/src/mesa/math/m_debug_util.h
@@ -305,8 +305,6 @@ enum { NIL = 0, ONE = 1, NEG = -1, VAR = 2 };
# define ALIGN16(type, array) type array __attribute__ ((aligned (16)))
#elif defined(_MSC_VER)
# define ALIGN16(type, array) type array __declspec(align(16)) /* GH: Does this work? */
-#elif defined(__WATCOMC__)
-# define ALIGN16(type, array) /* Watcom does not support this */
#elif defined(__xlC__)
# define ALIGN16(type, array) type __align (16) array
#else
diff --git a/mesalib/src/mesa/program/Makefile.am b/mesalib/src/mesa/program/Makefile.am
deleted file mode 100644
index 5e05782fb..000000000
--- a/mesalib/src/mesa/program/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright © 2012 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-include ../Makefile.sources
-
-AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
-AM_CFLAGS = $(VISIBILITY_CFLAGS)
-AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
-
-SRCDIR = $(top_srcdir)/src/mesa/
-BUILDDIR = $(top_builddir)/src/mesa/
-
-noinst_LTLIBRARIES = libprogram.la
-
-libprogram_la_SOURCES = $(PROGRAM_FILES)
-
-lex.yy.c: program_lexer.l
- $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
-
-program_parse.tab.c program_parse.tab.h: program_parse.y
- $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program_parse.tab.c $<
-
-BUILT_SOURCES = \
- program_parse.tab.c \
- program_parse.tab.h \
- lex.yy.c
-CLEANFILES = $(BUILT_SOURCES)
diff --git a/mesalib/src/mesa/x86/assyntax.h b/mesalib/src/mesa/x86/assyntax.h
index 4a41812f6..fa7d92ea5 100644
--- a/mesalib/src/mesa/x86/assyntax.h
+++ b/mesalib/src/mesa/x86/assyntax.h
@@ -920,17 +920,9 @@
#define D_BYTE db
/* #define SPACE */
/* #define COMM */
-#if defined(__WATCOMC__)
-SECTION _TEXT public align=16 class=CODE use32 flat
-SECTION _DATA public align=16 class=DATA use32 flat
-#define SEG_TEXT SECTION _TEXT
-#define SEG_DATA SECTION _DATA
-#define SEG_BSS SECTION .bss
-#else
#define SEG_DATA SECTION .data
#define SEG_TEXT SECTION .text
#define SEG_BSS SECTION .bss
-#endif
#define D_SPACE(n) db n REP 0