Add gen_matypes stuff from pkgsrc, but it's not enabled yet: need

to figure out why it doesn't work.
Bump rev.
add patch-al from pkgsrc, some other stuff I might have forgot.
This commit is contained in:
Blair Sadewitz 2008-01-13 10:59:01 +00:00 committed by Thomas Klausner
parent 5d5ad93f4b
commit e57caf281b
11 changed files with 988 additions and 17 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.18 2007/11/24 08:42:38 bsadewitz Exp $
# $NetBSD: Makefile,v 1.19 2008/01/13 10:59:01 bsadewitz Exp $
DISTNAME= MesaLib-${MESA_VERSION}
PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
EXTRACT_SUFX= .tar.bz2
@ -12,7 +13,7 @@ COMMENT= OpenGL library that renders using GLX or DRI
MESA_VERSION= 7.0.2
NO_CONFIGURE= yes
USE_TOOLS+= makedepend gmake
USE_TOOLS+= makedepend gmake pkg-config
USE_LIBTOOL+= yes
PKG_DESTDIR_SUPPORT=user-destdir
@ -31,7 +32,7 @@ GL_HEADERS+= osmesa.h xmesa.h xmesa_x.h xmesa_xf86.h
WRKSRC= ${WRKDIR}/Mesa-${MESA_VERSION}
DRI_CFLAGS+= -DPTHREADS -DUSE_XSHM
CFLAGS.NetBSD+=-D_REENTRANT -DHZ=${MESA_HZ:Q}
CFLAGS.NetBSD+=-D_REENTRANT -DHZ=${MESA_HZ:Q} -DHAVE_POSIX_MEMALIGN
PKGSRC_PICFLAGS=-fPIC -DPIC
.include "subst.mk"
@ -54,6 +55,9 @@ post-extract:
${CP} ${WRKSRC}/configs/freebsd ${WRKSRC}/configs/netbsd
${CP} ${WRKSRC}/configs/freebsd-dri-x86 ${WRKSRC}/configs/netbsd-dri-x86
${CP} ${WRKSRC}/configs/freebsd-dri-amd64 ${WRKSRC}/configs/netbsd-dri-amd64
${CP} ${FILESDIR}/gen_matypes.awk ${WRKSRC}/src/mesa/x86
${CP} ${FILESDIR}/gen_matypes.sh ${WRKSRC}/src/mesa/x86
${CHMOD} a+x ${WRKSRC}/src/mesa/x86/gen_matypes.sh
do-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.2 2007/08/07 03:07:09 bsadewitz Exp $
@comment $NetBSD: PLIST,v 1.3 2008/01/13 10:59:01 bsadewitz Exp $
include/GL/gl.h
include/GL/gl_mangle.h
include/GL/glext.h
@ -16,6 +16,7 @@ ${dri-i915}${DRI_MODULE_DIR}/i915_dri.so
${dri-i965}${DRI_MODULE_DIR}/i965_dri.so
${dri-mach64}${DRI_MODULE_DIR}/mach64_dri.so
${dri-mga}${DRI_MODULE_DIR}/mga_dri.so
${dri-nouveau}${DRI_MODULE_DIR}/dri_nouveau.so
${dri-r128}${DRI_MODULE_DIR}/r128_dri.so
${dri-r200}${DRI_MODULE_DIR}/r200_dri.so
${dri-r300}${DRI_MODULE_DIR}/r300_dri.so

View file

@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.4 2007/08/05 04:56:17 bsadewitz Exp $
# $NetBSD: buildlink3.mk,v 1.5 2008/01/13 10:59:01 bsadewitz Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
MESALIB_BUILDLINK3_MK:= ${MESALIB_BUILDLINK3_MK}+
@ -12,7 +12,9 @@ BUILDLINK_PACKAGES+= MesaLib
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}MesaLib
.if ${MESALIB_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=7.0.1
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=3.4.2
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=6.4.1nb1
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=7.0.2
BUILDLINK_PKGSRCDIR.MesaLib?= ../../graphics/MesaLib
BUILDLINK_TRANSFORM+= l:MesaGL:GL
BUILDLINK_TRANSFORM+= l:GL:GL:Xxf86vm:Xfixes:Xdamage:drm

View file

@ -1,15 +1,16 @@
$NetBSD: distinfo,v 1.16 2007/11/24 08:42:38 bsadewitz Exp $
$NetBSD: distinfo,v 1.17 2008/01/13 10:59:01 bsadewitz Exp $
SHA1 (MesaLib-7.0.2.tar.bz2) = d16eaeb1d9d95d11d3b6d289b1ba87108b88da90
RMD160 (MesaLib-7.0.2.tar.bz2) = 3d471062b60889baef48a1a4596de6e32e1530cf
Size (MesaLib-7.0.2.tar.bz2) = 3353217 bytes
SHA1 (patch-aa) = 6db543357cfe41fe1ab1fc16d823ff61d3e8646b
SHA1 (patch-aa) = 98041325f5228e20f1f734a44757e5b5faa98240
SHA1 (patch-ab) = 8ca601f930227d0e6bfc494e9520016ff91e0919
SHA1 (patch-ac) = 26969bb899448ec09b5b197ffdd3ebced5d43594
SHA1 (patch-ad) = c3bca38bb32fa2a3300d4a4773add343e1c4052c
SHA1 (patch-ae) = 8dd2536d34dc8c118c87d78a28604e106277ce4c
SHA1 (patch-af) = a26e09131830bdc37383a8a25e3213dbf6563de3
SHA1 (patch-ag) = 553f827712116de88fe38f74ab6a252bff3c964a
SHA1 (patch-ag) = d5086862fb820c2f79966a41712ce056fdc25f44
SHA1 (patch-ai) = 393a64722f27d90ba3f0d7dd58dd789e386a0a80
SHA1 (patch-al) = be55e752fb12c10593d4adb75e11593081ee13fd
SHA1 (patch-am) = 87896f14ad0fa932bdbd2f803a74a64535d7e53f
SHA1 (patch-ao) = 2b95e3d6bbb7527baab10ef828e38797c59bfc4d

View file

@ -0,0 +1,31 @@
# $NetBSD: gen_matypes.awk,v 1.1 2008/01/13 10:59:01 bsadewitz Exp $
BEGIN {
while (getline) {
if (/int main/) break;
}
}
/printf/ {
printf("printf %s\n", substr($0, 12, length($0) - 14))
}
/OFFSET\(/ {
split(substr($0,12, length($0) - 14), offsets, ",");
printf("offset %s \"%s\" \"%s\"\n", offsets[1], offsets[2], offsets[3]);
}
/OFFSET_HEADER/ {
printf("offset_header %s\n", substr($0,19, length($0) - 21))
}
/DEFINE\(/ {
split(substr($0,12, length($0) - 14), offsets, ",");
printf("define %s \"%s\"\n", offsets[1], offsets[2]);
}
/DEFINE_HEADER/ {
printf("define_header %s\n", substr($0,19, length($0) - 21))
}
/SIZEOF\(/ {
split(substr($0,12, length($0) - 14), offsets, ",");
printf("sizeof %s \"%s\"\n", offsets[1], offsets[2]);
}

View file

@ -0,0 +1,98 @@
#!/bin/sh
#
# $NetBSD: gen_matypes.sh,v 1.1 2008/01/13 10:59:01 bsadewitz Exp $
test_condition() {
cat > gen_matypes_cross.c << EOF
#include "main/glheader.h"
#include "main/mtypes.h"
#include "tnl/t_context.h"
#undef offsetof
#define offsetof( type, member ) ((size_t) &((type *)0)->member)
int test_variable[($1) ? 1 : -1];
EOF
${CC} -c -o /dev/null ${CFLAGS} gen_matypes_cross.c > /dev/null 2>&1
}
compute_powers(){
local cur
local i
cur=1
i=1
while [ ${i} -le 16 ]; do
power_of_two="${cur} ${power_of_two}"
cur=`expr ${cur} + ${cur}`
i=`expr ${i} + 1`
done
}
compute_powers
offset() {
local got_mismatch
local bits
local o
o=0
got_mismatch=0
for bits in ${power_of_two}; do
if test_condition "offsetof($2, $3) >= $o + $bits"; then
o=`expr $o + $bits`
else
got_mismatch=1
fi
done
[ "$got_mismatch" = 0 ] && exit 1
printf "#define %s\t%d\n" "$1" $o
}
offset_header() {
printf "\n"
printf "\n"
printf "/* =============================================================\n"
printf " * Offsets for %s\n" "$1"
printf " */\n"
printf "\n"
}
define_header() {
printf "\n"
printf "/*\n"
printf " * Flags for %s\n" "$1"
printf " */\n"
printf "\n"
}
define() {
local bits
local v
v=0
for bits in ${power_of_two}; do
if test_condition "$2 >= $v + $bits"; then
v=`expr $v + $bits`
fi
done
printf "#define %s\t0x%x\n" "$1" $v
}
sizeof() {
local got_mismatch
local bits
local v
v=0
got_mismatch=0
for bits in ${power_of_two}; do
if test_condition "sizeof($2) >= $v + $bits"; then
v=`expr $v + $bits`
else
got_mismatch=1
fi
done
[ "$got_mismatch" = 0 ] && exit 1
printf "#define %s\t0x%x\n" "$1" $v
}
awk -f gen_matypes.awk < gen_matypes.c > gen_matypes_tmp.sh
. ./gen_matypes_tmp.sh
rm gen_matypes_tmp.sh

View file

@ -1,5 +1,5 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib
PKG_OPTIONS_SET.driver= dri-i810 dri-i915 dri-i965 dri-mach64 dri-mga
PKG_OPTIONS_SET.driver= dri-i810 dri-i915 dri-i965 dri-mach64 dri-mga dri-nouveau
PKG_OPTIONS_SET.driver+=dri-r128 dri-r200 dri-r300 dri-radeon dri-tdfx dri-unichrome
PKG_OPTIONS_SET.driver+=dri-savage dri-sis
PKG_OPTIONS_NONEMPTY_SETS= driver

View file

@ -1,6 +1,6 @@
$NetBSD: patch-aa,v 1.2 2007/07/04 06:03:37 bsadewitz Exp $
$NetBSD: patch-aa,v 1.3 2008/01/13 10:59:01 bsadewitz Exp $
--- src/mesa/x86/assyntax.h.orig 2007-06-21 18:10:55.000000000 -0400
--- src/mesa/x86/assyntax.h.orig 2008-01-10 02:06:56.000000000 -0500
+++ src/mesa/x86/assyntax.h
@@ -985,7 +985,8 @@ SECTION _DATA public align=16 class=DATA

View file

@ -1,5 +1,5 @@
--- src/mesa/x86/common_x86.c.orig 2007-08-06 17:19:43.000000000 -0400
+++ src/mesa/x86/common_x86.c 2007-08-06 17:40:31.000000000 -0400
$NetBSD: patch-ag,v 1.9 2008/01/13 10:59:01 bsadewitz Exp $
--- src/mesa/x86/common_x86.c.orig 2007-07-12 16:49:55.000000000 -0400
+++ src/mesa/x86/common_x86.c
@@ -38,7 +38,7 @@

View file

@ -0,0 +1,836 @@
$NetBSD: patch-al,v 1.9 2008/01/13 10:59:01 bsadewitz Exp $
--- src/mesa/drivers/x11/xm_tri.c.orig 2007-06-22 00:10:54.000000000 +0200
+++ src/mesa/drivers/x11/xm_tri.c
@@ -66,7 +66,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLint x = span.x, y = YFLIP(xrb, span.y); \
GLuint i; \
for (i = 0; i < span.end; i++, x++) { \
@@ -82,7 +82,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -102,7 +102,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -117,7 +117,7 @@
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -137,7 +137,7 @@
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -152,7 +152,7 @@
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -171,7 +171,7 @@
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -184,7 +184,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -202,7 +202,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -217,7 +217,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -232,7 +232,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -248,7 +248,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -265,7 +265,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -278,7 +278,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -296,7 +296,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -310,7 +310,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -327,7 +327,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -342,7 +342,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -357,7 +357,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -373,7 +373,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -390,7 +390,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
LOOKUP_SETUP; \
for (i = 0; i < span.end; i++) { \
@@ -404,7 +404,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -422,7 +422,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -436,7 +436,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -453,7 +453,7 @@
XMesaImage *img = xrb->ximage; \
unsigned long pixel; \
PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -463,7 +463,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -481,7 +481,7 @@
GET_XRB(xrb); \
GLuint p = PACK_8A8B8G8R( v2->color[0], v2->color[1],\
v2->color[2], v2->color[3]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -490,7 +490,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -508,7 +508,7 @@
GET_XRB(xrb); \
GLuint p = PACK_8A8R8G8B(v2->color[0], v2->color[1], \
v2->color[2], v2->color[3]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -517,7 +517,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -534,7 +534,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
GLuint p = PACK_8R8G8B( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -543,7 +543,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -561,7 +561,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -573,7 +573,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -588,7 +588,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -601,7 +601,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -618,7 +618,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
GLushort p = PACK_5R6G5B( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -627,7 +627,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -645,7 +645,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -656,7 +656,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -673,7 +673,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(YFLIP(xrb, y)); \
@@ -684,7 +684,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -699,7 +699,7 @@
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage; \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(y); \
@@ -711,7 +711,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -731,7 +731,7 @@
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2];
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -741,7 +741,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -762,7 +762,7 @@
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2]; \
GLubyte p = LOOKUP(r,g,b);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -771,7 +771,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -785,7 +785,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -796,7 +796,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -812,7 +812,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = PACK_8A8B8G8R(FixedToInt(span.red), \
@@ -822,7 +822,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -838,7 +838,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = PACK_8A8R8G8B(FixedToInt(span.red), \
@@ -848,7 +848,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -863,7 +863,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = PACK_8R8G8B(FixedToInt(span.red), \
@@ -871,7 +871,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -886,7 +886,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
PIXEL_TYPE *pixel = pRow; \
for (i = 0; i < span.end; i++, pixel++) { \
@@ -896,7 +896,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -910,7 +910,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -921,7 +921,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -936,7 +936,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) PACK_5R6G5B(FixedToInt(span.red), \
@@ -944,7 +944,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -960,7 +960,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -969,7 +969,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -984,7 +984,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -994,7 +994,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1007,7 +1007,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -1018,7 +1018,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1033,7 +1033,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
LOOKUP_SETUP; \
for (i = 0; i < span.end; i++) { \
@@ -1042,7 +1042,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1058,7 +1058,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -1067,7 +1067,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1082,12 +1082,12 @@
XMesaImage *img = xrb->ximage; \
unsigned long pixel; \
PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
XMesaPutPixel(img, x, y, pixel); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1103,11 +1103,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_8B8G8R( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1123,11 +1123,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_8R8G8B( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1143,11 +1143,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_8R8G8B( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1162,14 +1162,14 @@
#define SETUP_CODE \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
PIXEL_TYPE *pixel = pRow; \
for (i = 0; i < span.end; i++, pixel++) { \
pixel->r = color[RCOMP]; \
pixel->g = color[GCOMP]; \
pixel->b = color[BCOMP]; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1182,7 +1182,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -1190,7 +1190,7 @@
PACK_TRUEDITHER(p, x, y, v2->color[0], \
v2->color[1], v2->color[2] ); \
XMesaPutPixel(img, x, y, p); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1206,11 +1206,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_5R6G5B( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1226,13 +1226,13 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
PACK_TRUEDITHER(pRow[i], x, y, color[RCOMP], \
color[GCOMP], color[BCOMP]); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1247,13 +1247,13 @@
#define SETUP_CODE \
GET_XRB(xrb); \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(YFLIP(xrb, y)); \
for (i = 0; i < span.end; i++, x++) { \
pRow[i] = (PIXEL_TYPE) FLAT_DITHER(x); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1266,14 +1266,14 @@
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage; \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(y); \
for (i = 0; i < span.end; i++, x++) { \
unsigned long p = FLAT_DITHER(x); \
XMesaPutPixel(img, x, y, p ); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1291,12 +1291,12 @@
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2];
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
pRow[i] = (PIXEL_TYPE) DITHER_HPCR(x, y, r, g, b); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1315,11 +1315,11 @@
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2]; \
GLubyte p = LOOKUP(r,g,b);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"

View file

@ -1,3 +1,4 @@
# $NetBSD: subst.mk,v 1.12 2008/01/13 10:59:01 bsadewitz Exp $
SUBST_CLASSES+= fix-conf
SUBST_STAGE.fix-conf= pre-patch
@ -18,15 +19,12 @@ SUBST_SED.fix-conf+= -e 's,g++,${CXX},g'
SUBST_SED.fix-conf+= -e 's,OPT_FLAGS = .*,OPT_FLAGS = ${CFLAGS},g'
SUBST_SED.fix-conf+= -e 's,SRC_DIRS = .*,SRC_DIRS = glx/x11 mesa glw,g'
SUBST_SED.fix-conf+= -e 's,^\(MKDEP_OPTIONS.*\),\1 -- -I${PREFIX}/include --,'
#SUBST_SED.fix-conf+= -e 's,-ffast-math,,g'
SUBST_SED.fix-conf+= -e 's,^\(DRI_DIRS.*\\\),,g'
SUBST_SED.fix-conf+= -e 's,\(unichrome.*\),,g'
SUBST_SED.fix-conf+= -e 's,-l$$(GL_LIB),-lGL,g'
#SUBST_SED.fix-conf+= -e 's,-L,-R,g'
SUBST_SED.fix-conf+= -e 's,-fPIC,,g'
SUBST_SED.fix-conf+= -e 's,-DPIC,,g'
SUBST_SED.fix-conf+= -e 's|^DRI_DRIVER_INSTALL_DIR.*|DRI_DRIVER_INSTALL_DIR = ${PREFIX}/${DRI_MODULE_DIR}|'
#SUBST_SED.fix-conf+= -e 's,ASM_FLAGS =.*,,g'
SUBST_CLASSES+= fix-pthread
SUBST_STAGE.fix-pthread= pre-patch