summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-04-25 15:08:54 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-04-25 15:08:54 +0200
commit77349562d0c3ee131b98b3c4f9fc2e6d7d21f01e (patch)
tree1efceb8933ffed955730ebfc038db6eb278d2505
parent1f8de43ffb9b2fb7011af639e79c2cf46d9e910f (diff)
parent7b676192e92eb532c8e4347fa3bdba8bfff4064c (diff)
Merge branch 'mesa_7_0_branch' into i915tex_branchi915tex_branch
-rw-r--r--Makefile13
-rwxr-xr-xbin/mklib9
-rw-r--r--configs/dragonfly38
-rw-r--r--configs/dragonfly-dri56
-rw-r--r--configs/dragonfly-dri-amd6410
-rw-r--r--configs/dragonfly-dri-x8613
-rw-r--r--configs/freebsd-static27
-rw-r--r--docs/news.html7
-rw-r--r--docs/relnotes-7.0.3.html12
-rw-r--r--docs/relnotes-7.0.4.html58
-rw-r--r--docs/relnotes.html1
-rw-r--r--src/glu/sgi/libutil/mipmap.c4
-rw-r--r--src/glut/glx/Makefile2
-rw-r--r--src/glw/Makefile2
-rw-r--r--src/mesa/drivers/dri/common/xmlconfig.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_util.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c16
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c2
-rw-r--r--src/mesa/drivers/fbdev/glfbdev.c5
-rw-r--r--src/mesa/main/imports.c2
-rw-r--r--src/mesa/main/state.c2
-rw-r--r--src/mesa/main/version.h2
-rw-r--r--src/mesa/shader/arbprogram.c4
-rw-r--r--src/mesa/shader/arbprogram.syn6
-rw-r--r--src/mesa/shader/arbprogram_syn.h6
-rw-r--r--src/mesa/shader/prog_execute.c3
-rw-r--r--src/mesa/shader/prog_parameter.c3
-rw-r--r--src/mesa/shader/program.c1
-rw-r--r--src/mesa/shader/shader_api.c12
-rw-r--r--src/mesa/shader/slang/slang_preprocess.c4
-rw-r--r--src/mesa/x86/common_x86.c4
32 files changed, 296 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index 025f223c148..a010e42ed65 100644
--- a/Makefile
+++ b/Makefile
@@ -75,10 +75,15 @@ darwin-fat-32bit \
darwin-fat-all \
darwin-static \
darwin-static-x86ppc \
+dragonfly \
+dragonfly-dri \
+dragonfly-dri-amd64 \
+dragonfly-dri-x86 \
freebsd \
freebsd-dri \
freebsd-dri-amd64 \
freebsd-dri-x86 \
+freebsd-static \
hpux10 \
hpux10-gcc \
hpux10-static \
@@ -167,10 +172,10 @@ ultrix-gcc:
# Rules for making release tarballs
-DIRECTORY = Mesa-7.0.3-rc2
-LIB_NAME = MesaLib-7.0.3-rc2
-DEMO_NAME = MesaDemos-7.0.3-rc2
-GLUT_NAME = MesaGLUT-7.0.3-rc2
+DIRECTORY = Mesa-7.0.3
+LIB_NAME = MesaLib-7.0.3
+DEMO_NAME = MesaDemos-7.0.3
+GLUT_NAME = MesaGLUT-7.0.3
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
diff --git a/bin/mklib b/bin/mklib
index 90bf834b435..93eeb441509 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -111,6 +111,13 @@ do
# this is a special case (see bugzilla 10876)
DEPS="$DEPS $1"
;;
+ -Wl*)
+ # Another special case for DragonFly
+ DEPS="$DEPS $1"
+ ;;
+ -Wl*)
+ DEPS="$DEPS $1"
+ ;;
'-pthread')
DEPS="$DEPS -pthread"
;;
@@ -198,7 +205,7 @@ fi
#
case $ARCH in
- 'Linux' | 'OpenBSD' | 'GNU' | GNU/*)
+ 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
# we assume gcc
if [ "x$LINK" = "x" ] ; then
diff --git a/configs/dragonfly b/configs/dragonfly
new file mode 100644
index 00000000000..97c10e3c90e
--- /dev/null
+++ b/configs/dragonfly
@@ -0,0 +1,38 @@
+# Configuration for DragonFly
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = DragonFly
+
+# Compiler and flags
+CC = cc
+CXX = c++
+MAKE = gmake
+
+OPT_FLAGS = -O2
+PIC_FLAGS = -fPIC
+
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
+ -DHZ=100
+
+X11_INCLUDES = -I/usr/pkg/include
+
+CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) \
+ -ffast-math -pedantic
+
+CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES)
+
+GLUT_CFLAGS = -fexceptions
+
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
+EXTRA_LIB_PATH = -L/usr/pkg/lib
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) \
+ -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
+
+# Installation directories (for make install)
+INSTALL_DIR = /usr/pkg
+DRI_DRIVER_INSTALL_DIR = /usr/pkg/lib/modules/dri/
+
diff --git a/configs/dragonfly-dri b/configs/dragonfly-dri
new file mode 100644
index 00000000000..cb969718042
--- /dev/null
+++ b/configs/dragonfly-dri
@@ -0,0 +1,56 @@
+# -*-makefile-*-
+# Configuration for dragonfly-dri: DragonFly DRI hardware drivers
+
+include $(TOP)/configs/dragonfly
+
+CONFIG_NAME = dragonfly-dri
+
+# Compiler and flags
+CC = gcc
+CXX = g++
+WARN_FLAGS = -Wall
+OPT_FLAGS = -O -g
+
+EXPAT_INCLUDES = -I/usr/pkg/include
+X11_INCLUDES = -I/usr/pkg/include
+DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
+ -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
+ -DHAVE_ALIAS
+
+CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes \
+ -std=c99 -Wundef -ffast-math $(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
+
+CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi \
+ -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
+
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
+ASM_SOURCES =
+
+# Library/program dependencies
+LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
+LIBDRM_LIB = `pkg-config --libs libdrm`
+DRI_LIB_DEPS = -L/usr/pkg/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
+GL_LIB_DEPS = -L/usr/pkg/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
+ -lm -lpthread $(LIBDRM_LIB)
+
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/pkg/lib -lGLU -lGL -lX11 -lXmu \
+ -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/pkg/lib -lGL -lXt -lX11
+
+
+# Directories
+SRC_DIRS = glx/x11 mesa glu glut/glx glw
+DRIVER_DIRS = dri
+PROGRAM_DIRS =
+WINDOW_SYSTEM = dri
+
+DRM_SOURCE_PATH = $(TOP)/../drm
+
+# ffb and gamma are missing because they have not been converted to use the new
+# interface.
+DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
+ unichrome savage sis
+
diff --git a/configs/dragonfly-dri-amd64 b/configs/dragonfly-dri-amd64
new file mode 100644
index 00000000000..6c812da794d
--- /dev/null
+++ b/configs/dragonfly-dri-amd64
@@ -0,0 +1,10 @@
+# -*-makefile-*-
+# Configuration for dragonfly-dri-amd64: DragonFly DRI hardware drivers
+
+include $(TOP)/configs/dragonfly-dri
+
+CONFIG_NAME = dragonfly-dri-x86-64
+
+ASM_FLAGS = -DUSE_X86_64_ASM
+ASM_SOURCES = $(X86-64_SOURCES)
+ASM_API = $(X86-64_API)
diff --git a/configs/dragonfly-dri-x86 b/configs/dragonfly-dri-x86
new file mode 100644
index 00000000000..1fefa80428c
--- /dev/null
+++ b/configs/dragonfly-dri-x86
@@ -0,0 +1,13 @@
+# -*-makefile-*-
+# Configuration for dragonfly-dri-x86: DragonFly DRI hardware drivers
+
+include $(TOP)/configs/dragonfly-dri
+
+CONFIG_NAME = dragonfly-dri-x86
+
+# Unnecessary on x86, generally.
+PIC_FLAGS =
+
+ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
+ASM_SOURCES = $(X86_SOURCES)
+ASM_API = $(X86_API)
diff --git a/configs/freebsd-static b/configs/freebsd-static
new file mode 100644
index 00000000000..f87b1b8e420
--- /dev/null
+++ b/configs/freebsd-static
@@ -0,0 +1,27 @@
+# Configuration for generic FreeBSD, making static libs
+# Written by cy on 2008-04-23.
+
+include $(TOP)/configs/freebsd
+
+CONFIG_NAME = freebsd-static
+
+MKLIB_OPTIONS = -static
+PIC_FLAGS =
+
+# Library names (actual file names)
+GL_LIB_NAME = libGL.a
+GLU_LIB_NAME = libGLU.a
+GLUT_LIB_NAME = libglut.a
+GLW_LIB_NAME = libGLw.a
+OSMESA_LIB_NAME = libOSMesa.a
+
+# Library/program dependencies (static libs don't have dependencies)
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
+
+# Need to specify all libraries we may need
+APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
+ -lstdc++ -lm
diff --git a/docs/news.html b/docs/news.html
index 13e43f1abec..c68f1866f7a 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -11,6 +11,13 @@
<H1>News</H1>
+<h2>April 4, 2008</h2>
+<p>
+<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
+This is a bug-fix release.
+</p>
+
+
<h2>November 13, 2007</h2>
<p>
diff --git a/docs/relnotes-7.0.3.html b/docs/relnotes-7.0.3.html
index 212467d6ffe..5c8efc79d7c 100644
--- a/docs/relnotes-7.0.3.html
+++ b/docs/relnotes-7.0.3.html
@@ -8,7 +8,7 @@
<body bgcolor="#eeeeee">
-<H1>Mesa 7.0.3 Release Notes / March TBD, 2008</H1>
+<H1>Mesa 7.0.3 Release Notes / April 4, 2008</H1>
<p>
Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
@@ -17,6 +17,15 @@ Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
<h2>MD5 checksums</h2>
<pre>
+3fd1cb76531b2515ef7db92d9a93dbf8 MesaLib-7.0.3.tar.gz
+e6e6379d7793af40a6bc3ce1bace572e MesaLib-7.0.3.tar.bz2
+97882bac195229ee0b78cab82e0e3be1 MesaLib-7.0.3.zip
+8abf6bbcb1661e7dd4ce73b3fbb85898 MesaDemos-7.0.3.tar.gz
+47fd6863621d3c9c7dbb870ab7f0c303 MesaDemos-7.0.3.tar.bz2
+99e442e14da1928f76a7297bb421a3af MesaDemos-7.0.3.zip
+2b50fe9fadc4709b57c52adef09fce3c MesaGLUT-7.0.3.tar.gz
+0ff23c4e91b238abae63a5fc9fa003e7 MesaGLUT-7.0.3.tar.bz2
+70e83554a4462dad28e0d6e20f79aada MesaGLUT-7.0.3.zip
</pre>
@@ -42,6 +51,7 @@ Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
<li>state.texenv.color state var didn't work in GL_ARB_fragment_program (bug 14931)
<li>glBitmap from a PBO didn't always work
<li>glGetTexImage into a PBO didn't always work
+<li>Comments at the end of ARB vertex/fragment programs crashed the parser
</ul>
<h2>Changes</h2>
diff --git a/docs/relnotes-7.0.4.html b/docs/relnotes-7.0.4.html
new file mode 100644
index 00000000000..bcd30cc5a50
--- /dev/null
+++ b/docs/relnotes-7.0.4.html
@@ -0,0 +1,58 @@
+<HTML>
+
+<TITLE>Mesa Release Notes</TITLE>
+
+<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.0.4 Release Notes / (TBD 2008)</H1>
+
+<p>
+Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+</pre>
+
+
+<h2>Bug fixes</h2>
+<ul>
+<li>define #extension GL_ARB_texture_rectangle in shading language
+<li>fixed WIN32 compile problem in libGLU
+</ul>
+
+<h2>Changes</h2>
+<ul>
+<li>Added support for DragonFly OS
+<li>Added a build config for FreeBSD static libs (Anatolij Shkodin)
+</ul>
+
+
+
+
+<h2>Driver Status</h2>
+
+<pre>
+Driver Status
+---------------------- ----------------------
+DRI drivers varies with the driver
+XMesa/GLX (on Xlib) implements OpenGL 2.1
+OSMesa (off-screen) implements OpenGL 2.1
+Windows/Win32 implements OpenGL 2.1
+Glide (3dfx Voodoo1/2) implements OpenGL 1.3
+SVGA unsupported
+Wind River UGL unsupported
+DJGPP unsupported
+GGI unsupported
+BeOS unsupported
+Allegro unsupported
+D3D unsupported
+</pre>
+
+</body>
+</html>
diff --git a/docs/relnotes.html b/docs/relnotes.html
index 8469c7f6709..79e7118e2c8 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -20,6 +20,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
+<LI><A HREF="relnotes-7.0.4.html">7.0.4 release notes</A>
<LI><A HREF="relnotes-7.0.3.html">7.0.3 release notes</A>
<LI><A HREF="relnotes-7.0.2.html">7.0.2 release notes</A>
<LI><A HREF="relnotes-7.0.1.html">7.0.1 release notes</A>
diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c
index 44f519a4e21..d65b7f689f5 100644
--- a/src/glu/sgi/libutil/mipmap.c
+++ b/src/glu/sgi/libutil/mipmap.c
@@ -6627,7 +6627,7 @@ typedef void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
static TexImage3Dproc pTexImage3D = 0;
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(__WIN32__)
# include <dlfcn.h>
# include <sys/types.h>
#else
@@ -6642,7 +6642,7 @@ static void gluTexImage3D( GLenum target, GLint level,
const GLvoid *pixels )
{
if (!pTexImage3D) {
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__WIN32__)
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3D");
if (!pTexImage3D)
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3DEXT");
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 9f995667b40..46185cebbc0 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -126,6 +126,6 @@ depend: $(SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
@ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \
- > /dev/null
+ $(X11_INCLUDES) > /dev/null
include depend
diff --git a/src/glw/Makefile b/src/glw/Makefile
index 727c5838be5..8370e3bb6cd 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -61,7 +61,7 @@ $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
depend: $(GLW_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) \
- > /dev/null
+ $(X11_INCLUDES) > /dev/null
include depend
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index b635894fe53..9f6f3277daf 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -63,6 +63,9 @@ extern char *program_invocation_name, *program_invocation_short_name;
#elif defined(__NetBSD__) && defined(__NetBSD_Version) && (__NetBSD_Version >= 106000100)
# include <stdlib.h>
# define GET_PROGRAM_NAME() getprogname()
+#elif defined(__DragonFly__)
+# include <stdlib.h>
+# define GET_PROGRAM_NAME() getprogname()
#endif
#if !defined(GET_PROGRAM_NAME)
diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c
index fc484a73936..41d9b75e91c 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_util.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_util.c
@@ -343,7 +343,7 @@ void brw_clip_init_clipmask( struct brw_clip_compile *c )
release_tmp(c, tmp);
}
- if (BRW_IS_IGD(p->brw)) {
+ if (!BRW_IS_IGD(p->brw)) {
/* Test for -ve rhw workaround
*/
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 786a298cc3b..8eaa6fe9406 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -70,6 +70,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_ATI_fragment_shader
#define need_GL_EXT_blend_minmax
#define need_GL_EXT_fog_coord
+#define need_GL_EXT_multi_draw_arrays
#define need_GL_EXT_secondary_color
#define need_GL_EXT_blend_equation_separate
#define need_GL_EXT_blend_func_separate
@@ -133,6 +134,7 @@ const struct dri_extension card_extensions[] =
{ "GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions },
{ "GL_EXT_blend_subtract", NULL },
{ "GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
+ { "GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions },
{ "GL_EXT_secondary_color", GL_EXT_secondary_color_functions },
{ "GL_EXT_stencil_wrap", NULL },
{ "GL_EXT_texture_edge_clamp", NULL },
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c
index 6089d617c6b..70881fd7572 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.c
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.c
@@ -744,9 +744,16 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte
goto next;
case OPCODE_MAD:
+ /* only 2 read ports into temp memory thus may need the macro op MAD_2
+ instead (requiring 2 clocks) if all inputs are in temp memory
+ (and, only if they actually reference 3 distinct temps) */
hw_op=(src[0].File == PROGRAM_TEMPORARY &&
src[1].File == PROGRAM_TEMPORARY &&
- src[2].File == PROGRAM_TEMPORARY) ? R200_VPI_OUT_OP_MAD_2 : R200_VPI_OUT_OP_MAD;
+ src[2].File == PROGRAM_TEMPORARY &&
+ (((src[0].RelAddr << 8) | src[0].Index) != ((src[1].RelAddr << 8) | src[1].Index)) &&
+ (((src[0].RelAddr << 8) | src[0].Index) != ((src[2].RelAddr << 8) | src[2].Index)) &&
+ (((src[1].RelAddr << 8) | src[1].Index) != ((src[2].RelAddr << 8) | src[2].Index))) ?
+ R200_VPI_OUT_OP_MAD_2 : R200_VPI_OUT_OP_MAD;
o_inst->op = MAKE_VSF_OP(hw_op, t_dst(&dst),
t_dst_mask(dst.WriteMask));
@@ -874,8 +881,11 @@ else {
case OPCODE_XPD:
/* mul r0, r1.yzxw, r2.zxyw
mad r0, -r2.yzxw, r1.zxyw, r0
- NOTE: might need MAD_2
*/
+ hw_op=(src[0].File == PROGRAM_TEMPORARY &&
+ src[1].File == PROGRAM_TEMPORARY &&
+ (((src[0].RelAddr << 8) | src[0].Index) != ((src[1].RelAddr << 8) | src[1].Index))) ?
+ R200_VPI_OUT_OP_MAD_2 : R200_VPI_OUT_OP_MAD;
o_inst->op = MAKE_VSF_OP(R200_VPI_OUT_OP_MUL,
(u_temp_i << R200_VPI_OUT_REG_INDEX_SHIFT) | R200_VSF_OUT_CLASS_TMP,
@@ -901,7 +911,7 @@ else {
o_inst++;
u_temp_i--;
- o_inst->op = MAKE_VSF_OP(R200_VPI_OUT_OP_MAD, t_dst(&dst),
+ o_inst->op = MAKE_VSF_OP(hw_op, t_dst(&dst),
t_dst_mask(dst.WriteMask));
o_inst->src0 = MAKE_VSF_SOURCE(t_src_index(vp, &src[1]),
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 9ea14ab4c78..4ad947b0884 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -83,6 +83,7 @@ int hw_tcl_on = 1;
#define need_GL_ARB_vertex_program
#define need_GL_EXT_blend_minmax
//#define need_GL_EXT_fog_coord
+#define need_GL_EXT_multi_draw_arrays
#define need_GL_EXT_secondary_color
#define need_GL_EXT_blend_equation_separate
#define need_GL_EXT_blend_func_separate
@@ -110,6 +111,7 @@ const struct dri_extension card_extensions[] = {
{"GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions},
{"GL_EXT_blend_subtract", NULL},
// {"GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
+ {"GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions},
{"GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions},
{"GL_EXT_secondary_color", GL_EXT_secondary_color_functions},
{"GL_EXT_stencil_two_side", GL_EXT_stencil_two_side_functions},
diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c
index 6c6511b7e53..994319ab430 100644
--- a/src/mesa/drivers/fbdev/glfbdev.c
+++ b/src/mesa/drivers/fbdev/glfbdev.c
@@ -795,6 +795,11 @@ glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share )
}
_mesa_enable_sw_extensions(glctx);
+ _mesa_enable_1_3_extensions(glctx);
+ _mesa_enable_1_4_extensions(glctx);
+ _mesa_enable_1_5_extensions(glctx);
+ _mesa_enable_2_0_extensions(glctx);
+ _mesa_enable_2_1_extensions(glctx);
return ctx;
}
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 2ecfbdc0264..54fdcb779c0 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -258,7 +258,7 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n )
void
_mesa_bzero( void *dst, size_t n )
{
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
bzero( dst, n );
#else
memset( dst, 0, n );
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 99b3f48b453..8266e4506fd 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -960,7 +960,7 @@ update_program(GLcontext *ctx)
ctx->FragmentProgram._Enabled = ctx->FragmentProgram.Enabled
&& ctx->FragmentProgram.Current->Base.Instructions;
ctx->ATIFragmentShader._Enabled = ctx->ATIFragmentShader.Enabled
- && ctx->ATIFragmentShader.Current->Instructions;
+ && ctx->ATIFragmentShader.Current->Instructions[0];
/*
* Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 12ca5832ec3..0bf7557e904 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -31,7 +31,7 @@
#define MESA_MAJOR 7
#define MESA_MINOR 0
#define MESA_PATCH 3
-#define MESA_VERSION_STRING "7.0.3-rc2"
+#define MESA_VERSION_STRING "7.0.3"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index 4b5f63ef920..ee75be315ea 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -229,7 +229,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
struct gl_vertex_program *prog = ctx->VertexProgram.Current;
_mesa_parse_arb_vertex_program(ctx, target, string, len, prog);
- if (ctx->Driver.ProgramStringNotify)
+ if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
}
else if (target == GL_FRAGMENT_PROGRAM_ARB
@@ -237,7 +237,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
struct gl_fragment_program *prog = ctx->FragmentProgram.Current;
_mesa_parse_arb_fragment_program(ctx, target, string, len, prog);
- if (ctx->Driver.ProgramStringNotify)
+ if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
}
else {
diff --git a/src/mesa/shader/arbprogram.syn b/src/mesa/shader/arbprogram.syn
index 2aa5551cf77..ccf047d4083 100644
--- a/src/mesa/shader/arbprogram.syn
+++ b/src/mesa/shader/arbprogram.syn
@@ -2605,14 +2605,14 @@ white_char
' ' .or '\t' .or '\n' .or '\r';
comment_block
- '#' .and .loop comment_char .and new_line;
+ '#' .and .loop comment_char .and optional_new_line;
/* All ASCII characters except '\r', '\n' and '\0' */
comment_char
'\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-new_line
- '\n' .or crlf .or '\0';
+optional_new_line
+ '\n' .or crlf .or .true;
crlf
'\r' .and '\n';
diff --git a/src/mesa/shader/arbprogram_syn.h b/src/mesa/shader/arbprogram_syn.h
index 3904870a09e..106fa5b009e 100644
--- a/src/mesa/shader/arbprogram_syn.h
+++ b/src/mesa/shader/arbprogram_syn.h
@@ -1223,11 +1223,11 @@
"white_char\n"
" ' ' .or '\\t' .or '\\n' .or '\\r';\n"
"comment_block\n"
-" '#' .and .loop comment_char .and new_line;\n"
+" '#' .and .loop comment_char .and optional_new_line;\n"
"comment_char\n"
" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"new_line\n"
-" '\\n' .or crlf .or '\\0';\n"
+"optional_new_line\n"
+" '\\n' .or crlf .or .true;\n"
"crlf\n"
" '\\r' .and '\\n';\n"
"semicolon\n"
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index f4a12af3e4e..4a89d8951ef 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -1519,8 +1519,9 @@ _mesa_execute_program(GLcontext * ctx,
case OPCODE_END:
return GL_TRUE;
default:
- _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program",
+ _mesa_problem(ctx, "Bad opcode %d in _mesa_execute_program",
inst->Opcode);
+ assert(0);
return GL_TRUE; /* return value doesn't matter */
}
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index 46d30872e4f..3ad7215755d 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -40,8 +40,7 @@
struct gl_program_parameter_list *
_mesa_new_parameter_list(void)
{
- return (struct gl_program_parameter_list *)
- _mesa_calloc(sizeof(struct gl_program_parameter_list));
+ return CALLOC_STRUCT(gl_program_parameter_list);
}
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 95cabe73234..a8983703fa2 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -187,7 +187,6 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog,
{
(void) ctx;
if (prog) {
- _mesa_bzero(prog, sizeof(*prog));
prog->Id = id;
prog->Target = target;
prog->Resident = GL_TRUE;
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 5f9e2b84a4e..218c7cd309d 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -128,10 +128,17 @@ _mesa_free_shader_program_data(GLcontext *ctx,
for (i = 0; i < shProg->NumShaders; i++) {
_mesa_reference_shader(ctx, &shProg->Shaders[i], NULL);
}
+ shProg->NumShaders = 0;
+
if (shProg->Shaders) {
_mesa_free(shProg->Shaders);
shProg->Shaders = NULL;
}
+
+ if (shProg->InfoLog) {
+ _mesa_free(shProg->InfoLog);
+ shProg->InfoLog = NULL;
+ }
}
@@ -142,10 +149,7 @@ void
_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
{
_mesa_free_shader_program_data(ctx, shProg);
- if (shProg->Shaders) {
- _mesa_free(shProg->Shaders);
- shProg->Shaders = NULL;
- }
+
_mesa_free(shProg);
}
diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index 72281eda57d..a986db153ee 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -483,6 +483,7 @@ pp_cond_stack_reevaluate (pp_cond_stack *self)
typedef struct
{
GLboolean MESA_shader_debug; /* GL_MESA_shader_debug enable */
+ GLboolean ARB_texture_rectangle; /* GL_ARB_texture_rectangle enable */
} pp_ext;
/*
@@ -498,6 +499,7 @@ static GLvoid
pp_ext_init (pp_ext *self)
{
pp_ext_disable_all (self);
+ self->ARB_texture_rectangle = GL_TRUE;
/* Other initialization code goes here. */
}
@@ -506,6 +508,8 @@ pp_ext_set (pp_ext *self, const char *name, GLboolean enable)
{
if (_mesa_strcmp (name, "MESA_shader_debug") == 0)
self->MESA_shader_debug = enable;
+ else if (_mesa_strcmp (name, "GL_ARB_texture_rectangle") == 0)
+ self->ARB_texture_rectangle = enable;
/* Next extension name tests go here. */
else
return GL_FALSE;
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index 0b2af0a3706..bbdebe046f0 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -38,7 +38,7 @@
#if defined(USE_SSE_ASM) && defined(__linux__)
#include <linux/version.h>
#endif
-#if defined(USE_SSE_ASM) && defined(__FreeBSD__)
+#if defined(USE_SSE_ASM) && (defined(__FreeBSD__) || defined(__DragonFly__))
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
@@ -104,7 +104,7 @@ static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS exp)
static void check_os_sse_support( void )
{
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
{
int ret, enabled;
unsigned int len;