Compare commits
247 Commits
mesa-7.0.2
...
mesa-7.0.3
Author | SHA1 | Date | |
---|---|---|---|
|
85d882983f | ||
|
0206e20240 | ||
|
83a4719056 | ||
|
6cfe871c75 | ||
|
07c1fcc604 | ||
|
7959b95efa | ||
|
e325b76444 | ||
|
34eedc6a98 | ||
|
8c21c2e07e | ||
|
27425708f5 | ||
|
fc07b6cda0 | ||
|
562ed27eb5 | ||
|
0a0e09078d | ||
|
50bc5a75a7 | ||
|
6661f53eb3 | ||
|
b8782affc8 | ||
|
9a9e839b9b | ||
|
b04ccc9a03 | ||
|
aa522e14ee | ||
|
2c9e332bce | ||
|
e89deed74d | ||
|
5cb6f5515f | ||
|
c5024d4a5c | ||
|
62626467b4 | ||
|
c55a72ef48 | ||
|
8a353c4020 | ||
|
8261c40bb9 | ||
|
9fa552eb0f | ||
|
5f8ad807be | ||
|
b6e165d661 | ||
|
afbb645906 | ||
|
2b831e73f5 | ||
|
6ec170290c | ||
|
7c8ea0899a | ||
|
f81070dbd5 | ||
|
955c2ef48f | ||
|
2ac4919d24 | ||
|
3ed89025f3 | ||
|
5b42bbce70 | ||
|
d2e0a11aab | ||
|
5033e5b36d | ||
|
6a6a9c1c5a | ||
|
3d6aa2e06f | ||
|
03970183fc | ||
|
47d046c93f | ||
|
718724deeb | ||
|
85c325c36c | ||
|
7e6d99f5ec | ||
|
6ce6dc961b | ||
|
186883611e | ||
|
48b3c59cb9 | ||
|
04b9d5bc23 | ||
|
91707e9020 | ||
|
82a0e82232 | ||
|
fe4264bf45 | ||
|
2fa795a213 | ||
|
e32aaf5da8 | ||
|
03447de338 | ||
|
ee5f4a4caf | ||
|
c04f3933ab | ||
|
8f328c45e5 | ||
|
9676f0cffc | ||
|
2d0ca23319 | ||
|
6f4c8b5b50 | ||
|
f8bd9cc30f | ||
|
d9f9b1cd0b | ||
|
eca283976b | ||
|
2176259ca6 | ||
|
8fe6fcb900 | ||
|
76d6edcc38 | ||
|
98d6c671f5 | ||
|
f652811df4 | ||
|
e279f4601d | ||
|
87a30337a1 | ||
|
9c2047b275 | ||
|
1dcb0433a3 | ||
|
5ff27e02b3 | ||
|
4beee58e57 | ||
|
1f9de20719 | ||
|
d05a8d9750 | ||
|
db5f206c00 | ||
|
9dface8347 | ||
|
32f4940883 | ||
|
a7969a9b93 | ||
|
ad88130df5 | ||
|
d1e71bc08b | ||
|
fa58fe247c | ||
|
4b71478326 | ||
|
0989471fdb | ||
|
696140bd1d | ||
|
380d15b7fe | ||
|
41261d64b2 | ||
|
ce7a9efb09 | ||
|
8a38ebe328 | ||
|
dcc6671b85 | ||
|
b53b7581e4 | ||
|
64a4a03c2a | ||
|
b878c3f518 | ||
|
6164163ca8 | ||
|
e92a53cd92 | ||
|
2467af98b1 | ||
|
6f851d8875 | ||
|
9b99bf89c4 | ||
|
7346fca083 | ||
|
7facbb69c6 | ||
|
f59267d650 | ||
|
71cb014195 | ||
|
6c0f8db9c2 | ||
|
49f1e2fc4c | ||
|
2d26e19535 | ||
|
5b0c6cd49a | ||
|
c3ee8e46cc | ||
|
46aac24261 | ||
|
e1032ce718 | ||
|
ce636f36f2 | ||
|
93f2eec6b3 | ||
|
46ef09d787 | ||
|
7487ec0ff0 | ||
|
a25549866f | ||
|
558cc6e38f | ||
|
feb1fa1e83 | ||
|
f32462343d | ||
|
08ef1b379a | ||
|
1e79831b56 | ||
|
7a29164f70 | ||
|
f2533e787e | ||
|
b2ccd5c1ae | ||
|
6f63543dd7 | ||
|
c966f1629b | ||
|
709f24adbb | ||
|
52fe7ea3d1 | ||
|
44f6a6f9c4 | ||
|
ac88b3dd16 | ||
|
27b6fa5615 | ||
|
68eb76dfb7 | ||
|
392760ee0c | ||
|
063b60a51f | ||
|
7b676192e9 | ||
|
138e0010eb | ||
|
36bad2b478 | ||
|
f6d6fc603e | ||
|
5545b46571 | ||
|
06b0a7acce | ||
|
534f30064d | ||
|
6c9e1b2337 | ||
|
62c67576e0 | ||
|
91d59e4cb9 | ||
|
8de268bb3c | ||
|
4fd7f6047c | ||
|
ff3033e190 | ||
|
18404076e3 | ||
|
59c9c40c01 | ||
|
666e0635da | ||
|
f9968a0346 | ||
|
39dca05d1d | ||
|
f51b76b670 | ||
|
40ee989db5 | ||
|
ef76dfc7a0 | ||
|
02ddc08353 | ||
|
4b24d5261a | ||
|
4b96a39c48 | ||
|
48616e71d2 | ||
|
70d227ac62 | ||
|
7f2c4f96f5 | ||
|
667f0f60fc | ||
|
7592b8cc10 | ||
|
f55b831859 | ||
|
217f7f7e5d | ||
|
2e5a63f365 | ||
|
7c614b4666 | ||
|
b23d908829 | ||
|
5379b84e63 | ||
|
32c913308e | ||
|
1e83d70b6d | ||
|
767dfa5b9c | ||
|
7ff5b38126 | ||
|
e209f5300d | ||
|
3c4b50c352 | ||
|
4e7c2fcf18 | ||
|
22534f94f5 | ||
|
1a6928fdbe | ||
|
325dbbac47 | ||
|
39ac6b0481 | ||
|
46cc4854e9 | ||
|
f93882512e | ||
|
0dee2a4f6f | ||
|
3cebc35669 | ||
|
e75a204fb9 | ||
|
ac06a5c16a | ||
|
ed758fee0c | ||
|
a21c61ee8b | ||
|
24697da20e | ||
|
7120c0089d | ||
|
88a436a8f7 | ||
|
2fdb5a245d | ||
|
8441b53538 | ||
|
d336df8b73 | ||
|
8aaf805b8a | ||
|
8161fd2785 | ||
|
2f23025dfe | ||
|
1867eac230 | ||
|
096e35d05f | ||
|
8998f52b97 | ||
|
0fd38dcc83 | ||
|
d89cf0649e | ||
|
31e9d9d4f8 | ||
|
ea9c6d3d9e | ||
|
ff63cf8068 | ||
|
eaac94c35a | ||
|
9291506af0 | ||
|
4716670de9 | ||
|
33c5b38034 | ||
|
5737d6c565 | ||
|
08a7f56c6a | ||
|
7916f2b4aa | ||
|
193d303ac7 | ||
|
e70609b7b8 | ||
|
da476ff02d | ||
|
77e3b5d28b | ||
|
bf97ca448c | ||
|
c5f8ff8b32 | ||
|
50465766d1 | ||
|
7d8df58a63 | ||
|
762c074012 | ||
|
51f2ee3bfb | ||
|
b5cd34aa21 | ||
|
ae5c6dcd42 | ||
|
97196d0c8c | ||
|
f6de56b88a | ||
|
d64ea43b76 | ||
|
2deaf93d24 | ||
|
a107ec8300 | ||
|
120a1f9508 | ||
|
bb84007a57 | ||
|
86234e55a6 | ||
|
61972077cd | ||
|
5a7feb8ea2 | ||
|
4b4c131cd0 | ||
|
67617c8f89 | ||
|
0fd23f01c6 | ||
|
557b0d9df7 | ||
|
888f4380cf | ||
|
3266c5e95a | ||
|
834decdaae | ||
|
18b2d83173 | ||
|
30c65c3c62 | ||
|
04fcc4cf1e |
17
Makefile
17
Makefile
@@ -71,13 +71,19 @@ bluegene-osmesa \
|
||||
bluegene-xlc-osmesa \
|
||||
catamount-osmesa-pgi \
|
||||
darwin \
|
||||
darwin-fat-32bit \
|
||||
darwin-fat-all \
|
||||
darwin-static \
|
||||
darwin-static-x86ppc \
|
||||
darwin-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 \
|
||||
@@ -166,10 +172,10 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-7.0.3
|
||||
LIB_NAME = MesaLib-7.0.3
|
||||
DEMO_NAME = MesaDemos-7.0.3
|
||||
GLUT_NAME = MesaGLUT-7.0.3
|
||||
DIRECTORY = Mesa-7.0.4
|
||||
LIB_NAME = MesaLib-7.0.4
|
||||
DEMO_NAME = MesaDemos-7.0.4
|
||||
GLUT_NAME = MesaGLUT-7.0.4
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
@@ -415,6 +421,7 @@ GLUT_FILES = \
|
||||
$(DIRECTORY)/src/glut/fbdev/Makefile \
|
||||
$(DIRECTORY)/src/glut/fbdev/*[ch] \
|
||||
$(DIRECTORY)/src/glut/mini/*[ch] \
|
||||
$(DIRECTORY)/src/glut/mini/glut.pc.in \
|
||||
$(DIRECTORY)/src/glut/directfb/Makefile \
|
||||
$(DIRECTORY)/src/glut/directfb/NOTES \
|
||||
$(DIRECTORY)/src/glut/directfb/*[ch] \
|
||||
|
100
bin/mklib
100
bin/mklib
@@ -71,6 +71,7 @@ do
|
||||
echo ' -install DIR put resulting library file(s) in DIR'
|
||||
echo ' -arch ARCH override using `uname` to determine host system'
|
||||
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
||||
echo ' -altopts OPTS alternate options to override all others'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -h, --help display this information and exit'
|
||||
@@ -110,8 +111,14 @@ 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')
|
||||
# for FreeBSD
|
||||
DEPS="$DEPS -pthread"
|
||||
;;
|
||||
'-cplusplus')
|
||||
@@ -135,6 +142,10 @@ do
|
||||
shift 1;
|
||||
ARCHOPT=$1
|
||||
;;
|
||||
'-altopts')
|
||||
shift 1;
|
||||
ALTOPTS=$1
|
||||
;;
|
||||
'-noprefix')
|
||||
NOPREFIX=1
|
||||
;;
|
||||
@@ -194,7 +205,7 @@ fi
|
||||
#
|
||||
case $ARCH in
|
||||
|
||||
'Linux' | 'OpenBSD' | 'GNU' | GNU/*)
|
||||
'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
|
||||
# we assume gcc
|
||||
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
@@ -225,6 +236,10 @@ case $ARCH in
|
||||
OPTS="-m32 ${OPTS}"
|
||||
fi
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
rm -f ${LIBNAME}
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
@@ -235,6 +250,9 @@ case $ARCH in
|
||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
|
||||
LINK="ar"
|
||||
OPTS="-ru"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
rm -f ${LIBNAME}
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
@@ -270,6 +288,9 @@ case $ARCH in
|
||||
if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
|
||||
OPTS="-m32 ${OPTS}"
|
||||
fi
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
if [ x${PATCH} = "x" ] ; then
|
||||
VERSION="${MAJOR}.${MINOR}"
|
||||
@@ -352,7 +373,9 @@ case $ARCH in
|
||||
if [ "${SPARCV9}" ] ; then
|
||||
OPTS="${OPTS} -xarch=v9"
|
||||
fi
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
# for debug:
|
||||
#echo "mklib: linker is" ${LINK} ${OPTS}
|
||||
if [ $NOPREFIX = 1 ] ; then
|
||||
@@ -383,6 +406,9 @@ case $ARCH in
|
||||
# No "lib" or ".so" part
|
||||
echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
|
||||
OPTS="-shared"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
rm -f ${LIBNAME}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
@@ -396,6 +422,9 @@ case $ARCH in
|
||||
else
|
||||
SHLIB="lib${LIBNAME}.so.${MAJOR}"
|
||||
OPTS="-shared -Wl,-soname,${SHLIB}"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
echo "mklib: Making FreeBSD shared library: " ${SHLIB}
|
||||
rm -f ${SHLIB}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
|
||||
@@ -449,6 +478,10 @@ case $ARCH in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK="CC"
|
||||
else
|
||||
@@ -529,6 +562,10 @@ case $ARCH in
|
||||
}
|
||||
}' | sort -u >> ${EXPFILE}
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
# On AIX a shared library is linked differently when
|
||||
# you want to dlopen the file
|
||||
if [ $DLOPEN = "1" ] ; then
|
||||
@@ -580,6 +617,9 @@ case $ARCH in
|
||||
echo "mklib: Making Darwin static library: " ${LIBNAME}
|
||||
LINK="ar"
|
||||
OPTS="-ruvs"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
@@ -591,19 +631,37 @@ case $ARCH in
|
||||
LIBSUFFIX="dylib"
|
||||
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
fi
|
||||
LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
|
||||
LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
|
||||
if [ ${EXPORTS} ] ; then
|
||||
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
|
||||
fi
|
||||
|
||||
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
|
||||
LIBNAME="lib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}"
|
||||
|
||||
# examine first object to determine ABI
|
||||
set ${OBJECTS}
|
||||
ABI_PPC=`file $1 | grep 'object ppc'`
|
||||
ABI_I386=`file $1 | grep 'object i386'`
|
||||
if [ "${ABI_PPC}" ] ; then
|
||||
OPTS="${OPTS} -arch ppc"
|
||||
fi
|
||||
if [ "${ABI_I386}" ] ; then
|
||||
OPTS="${OPTS} -arch i386"
|
||||
fi
|
||||
ABI_PPC=`file $1 | grep ' ppc'`
|
||||
ABI_I386=`file $1 | grep ' i386'`
|
||||
ABI_PPC64=`file $1 | grep ' ppc64'`
|
||||
ABI_X86_64=`file $1 | grep ' x86_64'`
|
||||
if [ "${ABI_PPC}" ] ; then
|
||||
OPTS="${OPTS} -arch ppc"
|
||||
fi
|
||||
if [ "${ABI_I386}" ] ; then
|
||||
OPTS="${OPTS} -arch i386"
|
||||
fi
|
||||
if [ "${ABI_PPC64}" ] ; then
|
||||
OPTS="${OPTS} -arch ppc64"
|
||||
fi
|
||||
if [ "${ABI_X86_64}" ] ; then
|
||||
OPTS="${OPTS} -arch x86_64"
|
||||
fi
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
# XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
||||
# to OPTS here?
|
||||
@@ -616,9 +674,11 @@ case $ARCH in
|
||||
fi
|
||||
|
||||
echo "mklib: Making Darwin shared library: " ${LIBNAME}
|
||||
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
ln -s ${LIBNAME} ${LINKNAME}
|
||||
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
|
||||
ln -s ${LIBNAME} ${LINKNAME2}
|
||||
FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}"
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -670,6 +730,9 @@ case $ARCH in
|
||||
echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a
|
||||
LINK="ar"
|
||||
OPTS="-ruv"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
|
||||
# finish up
|
||||
@@ -680,6 +743,9 @@ case $ARCH in
|
||||
else
|
||||
OPTS="-shared"
|
||||
fi
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
||||
echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION}
|
||||
|
||||
@@ -744,6 +810,9 @@ case $ARCH in
|
||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
|
||||
LINK="ar"
|
||||
OPTS="-ru"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
|
||||
ranlib ${LIBNAME}.a
|
||||
@@ -751,6 +820,9 @@ case $ARCH in
|
||||
FINAL_LIBS=${LIBNAME}.a
|
||||
else
|
||||
OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll
|
||||
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
|
@@ -4,11 +4,18 @@ include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = darwin
|
||||
|
||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||
-D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
||||
|
||||
# Compiler and flags
|
||||
CC = cc
|
||||
CXX = cc
|
||||
CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
CC = gcc
|
||||
CXX = gcc
|
||||
CFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
|
||||
CXXFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
|
||||
|
||||
CFLAGS += $(RC_CFLAGS)
|
||||
CXXFLAGS += $(RC_CFLAGS)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
@@ -21,13 +28,13 @@ GLUT_LIB_NAME = libglut.dylib
|
||||
GLW_LIB_NAME = libGLw.dylib
|
||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GL_LIB_DEPS = -L/usr/X11/lib -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = mesa glu glut/glx
|
||||
|
||||
SRC_DIRS = glx/x11 glu glut/glx mesa
|
||||
DRIVER_DIRS = osmesa
|
||||
|
7
configs/darwin-fat-32bit
Normal file
7
configs/darwin-fat-32bit
Normal file
@@ -0,0 +1,7 @@
|
||||
# Configuration for Darwin / MacOS X, making 32bit fat dynamic libs
|
||||
|
||||
RC_CFLAGS=-arch ppc -arch i386
|
||||
|
||||
include $(TOP)/configs/darwin
|
||||
|
||||
CONFIG_NAME = darwin-fat-32bit
|
7
configs/darwin-fat-all
Normal file
7
configs/darwin-fat-all
Normal file
@@ -0,0 +1,7 @@
|
||||
# Configuration for Darwin / MacOS X, making 32bit and 64bit fat dynamic libs
|
||||
|
||||
RC_CFLAGS=-arch ppc -arch i386 -arch ppc64 -arch x86_64
|
||||
|
||||
include $(TOP)/configs/darwin
|
||||
|
||||
CONFIG_NAME = darwin-fat-all
|
@@ -1,37 +0,0 @@
|
||||
# Configuration for Darwin / MacOS X, making dynamic libs
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = darwin
|
||||
|
||||
# Compiler and flags
|
||||
CC = cc
|
||||
CXX = cc
|
||||
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
|
||||
MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.dylib
|
||||
GLU_LIB_NAME = libGLU.dylib
|
||||
GLUT_LIB_NAME = libglut.dylib
|
||||
GLW_LIB_NAME = libGLw.dylib
|
||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = mesa glu glut/glx
|
||||
|
@@ -22,8 +22,8 @@ DRI_DIRS = mach64 mga r128 r200 r300 radeon s3v savage tdfx trident
|
||||
|
||||
ARCH_X86 = i386 amd64
|
||||
|
||||
ifneq ($(findstring $(DEB_BUILD_ARCH), $(ARCH_X86)),)
|
||||
DRI_DIRS += i810 i915 i915tex i965 sis unichrome
|
||||
ifneq ($(filter $(DEB_HOST_ARCH_CPU), $(ARCH_X86)),)
|
||||
DRI_DIRS += i810 i915 i965 sis unichrome
|
||||
endif
|
||||
|
||||
ifeq ($(DEB_BUILD_ARCH), sparc)
|
||||
|
@@ -6,9 +6,5 @@ CONFIG_NAME = debian-osmesa-default
|
||||
|
||||
DRIVER_DIRS = osmesa
|
||||
|
||||
ifeq ($(DEB_BUILD_ARCH), hppa)
|
||||
OPT_FLAGS = -g -O0
|
||||
endif
|
||||
|
||||
# vim: ft=make
|
||||
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=0
|
||||
MESA_TINY=2
|
||||
MESA_TINY=4
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
@@ -30,9 +30,11 @@ MKDEP_OPTIONS = -fdepend
|
||||
MAKE = make
|
||||
INSTALL = $(TOP)/bin/minstall
|
||||
|
||||
# Python and flags (generally only needed by the developers)
|
||||
# Tools for regenerating glapi (generally only needed by the developers)
|
||||
PYTHON2 = python
|
||||
PYTHON_FLAGS = -t -O -O
|
||||
INDENT = indent
|
||||
INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
|
||||
|
||||
# Library names (base name)
|
||||
GL_LIB = GL
|
||||
|
38
configs/dragonfly
Normal file
38
configs/dragonfly
Normal file
@@ -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/
|
||||
|
56
configs/dragonfly-dri
Normal file
56
configs/dragonfly-dri
Normal file
@@ -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
|
||||
|
10
configs/dragonfly-dri-amd64
Normal file
10
configs/dragonfly-dri-amd64
Normal file
@@ -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)
|
13
configs/dragonfly-dri-x86
Normal file
13
configs/dragonfly-dri-x86
Normal file
@@ -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)
|
27
configs/freebsd-static
Normal file
27
configs/freebsd-static
Normal file
@@ -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
|
@@ -9,8 +9,17 @@ CONFIG_NAME = linux-osmesa
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
CFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -ffast-math
|
||||
|
||||
CXXFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
@@ -26,3 +35,4 @@ PROGRAM_DIRS = osdemos
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lOSMesa -lGLU
|
||||
|
||||
|
@@ -8,7 +8,8 @@ CONFIG_NAME = linux-osmesa-static
|
||||
|
||||
# Compiler and flags
|
||||
MKLIB_OPTIONS = -static
|
||||
PIC_FLAGS =
|
||||
|
||||
# Library names
|
||||
OSMESA_LIB_NAME = libOSMesa.a
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
|
||||
|
||||
|
@@ -1,31 +1,19 @@
|
||||
# Configuration for 16 bits/channel OSMesa library on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-osmesa
|
||||
|
||||
CONFIG_NAME = linux-osmesa16
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
DEFINES += -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=32
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa16
|
||||
OSMESA_LIB_NAME = libOSMesa16.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lOSMesa16
|
||||
APP_LIB_DEPS = -l$(OSMESA_LIB)
|
||||
|
||||
|
@@ -1,14 +1,10 @@
|
||||
# Configuration for 16 bits/channel OSMesa library on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-osmesa16
|
||||
|
||||
CONFIG_NAME = linux-osmesa16-static
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
MKLIB_OPTIONS = -static
|
||||
PIC_FLAGS =
|
||||
|
||||
@@ -17,16 +13,5 @@ CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa16
|
||||
OSMESA_LIB_NAME = libOSMesa16.a
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
APP_LIB_DEPS = -lOSMesa16
|
||||
|
@@ -1,31 +1,22 @@
|
||||
# Configuration for 32 bits/channel OSMesa library on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-osmesa
|
||||
|
||||
CONFIG_NAME = linux-osmesa32
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
DEFINES += -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa32
|
||||
OSMESA_LIB_NAME = libOSMesa32.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lOSMesa32
|
||||
APP_LIB_DEPS = -l$(OSMESA_LIB)
|
||||
|
||||
|
@@ -1,28 +1,13 @@
|
||||
# Configuration for 32 bits/channel OSMesa library on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-osmesa32
|
||||
|
||||
CONFIG_NAME = linux-osmesa32-static
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
PIC_FLAGS =
|
||||
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa32
|
||||
OSMESA_LIB_NAME = libOSMesa32.a
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
APP_LIB_DEPS = -lOSMesa32
|
||||
|
84
debian/changelog
vendored
84
debian/changelog
vendored
@@ -1,3 +1,87 @@
|
||||
mesa (7.0.3-7) unstable; urgency=low
|
||||
|
||||
* Cherry-pick patch from upstream:
|
||||
Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
|
||||
(closes: #484180).
|
||||
* Also build the x86-specific dri drivers on kfreebsd (closes: #492894).
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sun, 14 Dec 2008 07:34:58 +0530
|
||||
|
||||
mesa (7.0.3-6) unstable; urgency=high
|
||||
|
||||
* Update debian/copyright to the SGI Free Software License B, version 2.0.
|
||||
It now mirrors the free X11 license used by X.Org (closes: #368560).
|
||||
http://www.sgi.com/company_info/newsroom/press_releases/2008/september/opengl.html
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sat, 20 Sep 2008 16:30:44 +0200
|
||||
|
||||
mesa (7.0.3-5) unstable; urgency=low
|
||||
|
||||
* Disable the i915tex driver, it doesn't build against libdrm 2.3.1.
|
||||
* Pull from mesa_7_0_branch (27425708).
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sat, 12 Jul 2008 18:56:19 +0200
|
||||
|
||||
mesa (7.0.3-4) unstable; urgency=low
|
||||
|
||||
* Pull from mesa_7_0_branch (2ac4919d).
|
||||
* Put back our configs/ changes into the .diff.gz since choose-configs
|
||||
needs them before quilt is invoked. Put 04_cleanup-osmesa-configs.patch
|
||||
there as well for #485161.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Wed, 18 Jun 2008 20:59:14 +0200
|
||||
|
||||
mesa (7.0.3-3) unstable; urgency=low
|
||||
|
||||
* Pull from mesa_7_0_branch (718724de).
|
||||
+ Fix intel_batchbuffer_space on i965, closes: #455817.
|
||||
+ Fix busy error in i915_wait_irq for real now, closes: #467319.
|
||||
* Move our configs/ changes from the .diff.gz into our quilt patches,
|
||||
with 04_cleanup-osmesa-configs.patch renamed into 04_debian-configs.patch,
|
||||
closes: #485161.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Tue, 17 Jun 2008 20:00:51 +0200
|
||||
|
||||
mesa (7.0.3-2) unstable; urgency=low
|
||||
|
||||
* Pull from mesa_7_0_branch (03447de3).
|
||||
* Set right cliprects for the current draw region on Intel, closes: #467319.
|
||||
* Use BRW_TEXCOORDMODE_CLAMP instead of BRW_TEXCOORDMODE_CLAMP_BORDER
|
||||
to implement GL_CLAMP on i965, closes: #478880.
|
||||
* Fix segment fault with BASE_LEVEL set to 5 for MipMap on i915,
|
||||
closes: #451339.
|
||||
* Disable low impact fallback on r300 by default, closes: #440868.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Fri, 13 Jun 2008 06:53:29 +0200
|
||||
|
||||
mesa (7.0.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Only call ProgramStringNotify if program parsing succeeded,
|
||||
closes: #473551.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Fri, 11 Apr 2008 08:42:37 +0200
|
||||
|
||||
mesa (7.0.3~rc2-2) unstable; urgency=low
|
||||
|
||||
* Pull from mesa_7_0_branch (1e83d70b).
|
||||
* Fixes regression in the i965 dri driver (closes: #470984, #470084)
|
||||
* Update 02_use-ieee-fp-on-s390-and-m68k.patch.
|
||||
* Change libgl1-mesa-swx11-i686's pre-dependency on libgl1-mesa-swx11 to a
|
||||
regular versioned dependency, and add ${shlibs:Depends}.
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Mon, 31 Mar 2008 16:47:31 +0200
|
||||
|
||||
mesa (7.0.3~rc2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release candidate.
|
||||
+ enable user-defined clip planes for R300 (closes: #408679)
|
||||
+ 03_optional-progs-and-install.patch: partly applied upstream, fixed up
|
||||
* Stop building with -O0 on hppa. Bug #451047 should be fixed in recent gcc
|
||||
versions.
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sun, 24 Feb 2008 10:22:54 +0100
|
||||
|
||||
mesa (7.0.2-4) unstable; urgency=low
|
||||
|
||||
* Update to mesa_7_0_branch head (commit 48ae5cf0).
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@@ -60,7 +60,7 @@ Package: libgl1-mesa-swx11-i686
|
||||
Section: libs
|
||||
Priority: extra
|
||||
Architecture: i386
|
||||
Pre-Depends: libgl1-mesa-swx11
|
||||
Depends: libgl1-mesa-swx11 (= ${binary:Version}), ${shlibs:Depends}
|
||||
Description: Mesa OpenGL runtime [i686 optimized]
|
||||
Mesa is a 3-D graphics library with an API which is very similar to
|
||||
that of OpenGL. To the extent that Mesa utilizes the OpenGL command
|
||||
|
297
debian/copyright
vendored
297
debian/copyright
vendored
@@ -65,283 +65,32 @@ License:
|
||||
Some files, as listed below, are made available under the SGI Free B
|
||||
license. This license is as follows:
|
||||
|
||||
SGI FREE SOFTWARE LICENSE B (Version 1.1 [02/22/2000])
|
||||
SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.1. "Additional Notice Provisions" means such additional provisions as
|
||||
appear in the Notice in Original Code under the heading "Additional
|
||||
Notice Provisions."
|
||||
|
||||
1.2. "Covered Code" means the Original Code or Modifications, or any
|
||||
combination thereof.
|
||||
|
||||
1.3. "Hardware" means any physical device that accepts input, processes
|
||||
input, stores the results of processing, and/or provides output.
|
||||
|
||||
1.4. "Larger Work" means a work that combines Covered Code or portions
|
||||
thereof with code not governed by the terms of this License.
|
||||
|
||||
1.5. "Licensable" means having the right to grant, to the maximum extent
|
||||
possible, whether at the time of the initial grant or subsequently
|
||||
acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.6. "License" means this document.
|
||||
|
||||
1.7. "Licensed Patents" means patent claims Licensable by SGI that are
|
||||
infringed by the use or sale of Original Code or any Modifications
|
||||
provided by SGI, or any combination thereof.
|
||||
|
||||
1.8. "Modifications" means any addition to or deletion from the
|
||||
substance or structure of the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files,
|
||||
a Modification is:
|
||||
|
||||
A. Any addition to the contents of a file containing Original Code
|
||||
and/or addition to or deletion from the contents of a file
|
||||
containing previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.9. "Notice" means any notice in Original Code or Covered Code, as
|
||||
required by and in compliance with this License.
|
||||
|
||||
1.10. "Original Code" means source code of computer software code that
|
||||
is described in the source code Notice required by Exhibit A as
|
||||
Original Code, and updates and error corrections specifically
|
||||
thereto.
|
||||
|
||||
1.11. "Recipient" means an individual or a legal entity exercising
|
||||
rights under, and complying with all of the terms of, this License
|
||||
or a future version of this License issued under Section 8. For
|
||||
legal entities, "Recipient" includes any entity that controls, is
|
||||
controlled by, or is under common control with Recipient. For
|
||||
purposes of this definition, "control" of an entity means (a) the
|
||||
power, direct or indirect, to direct or manage such entity, or (b)
|
||||
ownership of fifty percent (50%) or more of the outstanding shares
|
||||
or beneficial ownership of such entity.
|
||||
|
||||
1.12. "Recipient Patents" means patent claims Licensable by a Recipient
|
||||
that are infringed by the use or sale of Original Code or any
|
||||
Modifications provided by SGI, or any combination thereof.
|
||||
|
||||
1.13. "SGI" means Silicon Graphics, Inc.
|
||||
|
||||
1.14. "SGI Patents" means patent claims Licensable by SGI other than the
|
||||
Licensed Patents.
|
||||
|
||||
2. License Grant and Restrictions.
|
||||
|
||||
2.1. SGI License Grant. Subject to the terms of this License and any
|
||||
third party intellectual property claims, for the duration of
|
||||
intellectual property protections inherent in the Original Code,
|
||||
SGI hereby grants Recipient a worldwide, royalty-free,
|
||||
non-exclusive license, to do the following: (i) under copyrights
|
||||
Licensable by SGI, to reproduce, distribute, create derivative
|
||||
works from, and, to the extent applicable, display and perform the
|
||||
Original Code and/or any Modifications provided by SGI alone and/or
|
||||
as part of a Larger Work; and (ii) under any Licensable Patents, to
|
||||
make, have made, use, sell, offer for sale, import and/or otherwise
|
||||
transfer the Original Code and/or any Modifications provided by
|
||||
SGI. Recipient accepts the terms and conditions of this License by
|
||||
undertaking any of the aforementioned actions. The patent license
|
||||
shall apply to the Covered Code if, at the time any related
|
||||
Modification is added, such addition of the Modification causes
|
||||
such combination to be covered by the Licensed Patents. The patent
|
||||
license in Section 2.1(ii) shall not apply to any other
|
||||
combinations that include the Modification. No patent license is
|
||||
provided under SGI Patents for infringements of SGI Patents by
|
||||
Modifications not provided by SGI or combinations of Original Code
|
||||
and Modifications not provided by SGI.
|
||||
|
||||
2.2. Recipient License Grant. Subject to the terms of this License and
|
||||
any third party intellectual property claims, Recipient hereby
|
||||
grants SGI and any other Recipients a worldwide, royalty-free,
|
||||
non-exclusive license, under any Recipient Patents, to make, have
|
||||
made, use, sell, offer for sale, import and/or otherwise transfer
|
||||
the Original Code and/or any Modifications provided by SGI.
|
||||
|
||||
2.3. No License For Hardware Implementations. The licenses granted in
|
||||
Section 2.1 and 2.2 are not applicable to implementation in
|
||||
Hardware of the algorithms embodied in the Original Code or any
|
||||
Modifications provided by SGI .
|
||||
|
||||
3. Redistributions.
|
||||
|
||||
3.1. Retention of Notice/Copy of License. The Notice set forth in
|
||||
Exhibit A, below, must be conspicuously retained or included in any
|
||||
and all redistributions of Covered Code. For distributions of the
|
||||
Covered Code in source code form, the Notice must appear in every
|
||||
file that can include a text comments field; in executable form,
|
||||
the Notice and a copy of this License must appear in related
|
||||
documentation or collateral where the Recipient’s rights relating
|
||||
to Covered Code are described. Any Additional Notice Provisions
|
||||
which actually appears in the Original Code must also be retained
|
||||
or included in any and all redistributions of Covered Code.
|
||||
|
||||
3.2. Alternative License. Provided that Recipient is in compliance with
|
||||
the terms of this License, Recipient may, so long as without
|
||||
derogation of any of SGI’s rights in and to the Original Code,
|
||||
distribute the source code and/or executable version(s) of Covered
|
||||
Code under (1) this License; (2) a license identical to this
|
||||
License but for only such changes as are necessary in order to
|
||||
clarify Recipient’s role as licensor of Modifications; and/or (3) a
|
||||
license of Recipient’s choosing, containing terms different from
|
||||
this License, provided that the license terms include this Section
|
||||
3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be
|
||||
modified or superseded by any other terms of such license. If
|
||||
Recipient elects to use any license other than this License,
|
||||
Recipient must make it absolutely clear that any of its terms which
|
||||
differ from this License are offered by Recipient alone, and not by
|
||||
SGI. It is emphasized that this License is a limited license, and,
|
||||
regardless of the license form employed by Recipient in accordance
|
||||
with this Section 3.2, Recipient may relicense only such rights, in
|
||||
Original Code and Modifications by SGI, as it has actually been
|
||||
granted by SGI in this License.
|
||||
|
||||
3.3. Indemnity. Recipient hereby agrees to indemnify SGI for any
|
||||
liability incurred by SGI as a result of any such alternative
|
||||
license terms Recipient offers.
|
||||
|
||||
4. Termination. This License and the rights granted hereunder will
|
||||
terminate automatically if Recipient breaches any term herein and
|
||||
fails to cure such breach within 30 days thereof. Any sublicense to
|
||||
the Covered Code that is properly granted shall survive any
|
||||
termination of this License, absent termination by the terms of such
|
||||
sublicense. Provisions that, by their nature, must remain in effect
|
||||
beyond the termination of this License, shall survive.
|
||||
|
||||
5. No Trademark Or Other Rights. This License does not grant any rights
|
||||
to: (i) any software apart from the Covered Code, nor shall any
|
||||
other rights or licenses not expressly granted hereunder arise by
|
||||
implication, estoppel or otherwise with respect to the Covered Code;
|
||||
(ii) any trade name, trademark or service mark whatsoever, including
|
||||
without limitation any related right for purposes of endorsement or
|
||||
promotion of products derived from the Covered Code, without prior
|
||||
written permission of SGI; or (iii) any title to or ownership of the
|
||||
Original Code, which shall at all times remains with SGI. All rights
|
||||
in the Original Code not expressly granted under this License are
|
||||
reserved.
|
||||
|
||||
6. Compliance with Laws; Non-Infringement. There are various worldwide
|
||||
laws, regulations, and executive orders applicable to dispositions
|
||||
of Covered Code, including without limitation export, re-export, and
|
||||
import control laws, regulations, and executive orders, of the U.S.
|
||||
government and other countries, and Recipient is reminded it is
|
||||
obliged to obey such laws, regulations, and executive orders.
|
||||
Recipient may not distribute Covered Code that (i) in any way
|
||||
infringes (directly or contributorily) any intellectual property
|
||||
rights of any kind of any other person or entity or (ii) breaches
|
||||
any representation or warranty, express, implied or statutory, to
|
||||
which, under any applicable law, it might be deemed to have been
|
||||
subject.
|
||||
|
||||
7. Claims of Infringement. If Recipient learns of any third party claim
|
||||
that any disposition of Covered Code and/or functionality wholly or
|
||||
partially infringes the third party's intellectual property rights,
|
||||
Recipient will promptly notify SGI of such claim.
|
||||
|
||||
8. Versions of the License. SGI may publish revised and/or new versions
|
||||
of the License from time to time, each with a distinguishing version
|
||||
number. Once Covered Code has been published under a particular
|
||||
version of the License, Recipient may, for the duration of the
|
||||
license, continue to use it under the terms of that version, or
|
||||
choose to use such Covered Code under the terms of any subsequent
|
||||
version published by SGI. Subject to the provisions of Sections 3
|
||||
and 4 of this License, only SGI may modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL
|
||||
EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED,
|
||||
INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS
|
||||
OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY
|
||||
AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE
|
||||
IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING,
|
||||
REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL
|
||||
PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED
|
||||
HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER.
|
||||
|
||||
10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY,
|
||||
WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT
|
||||
LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
|
||||
CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
|
||||
LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF
|
||||
DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
|
||||
|
||||
11. Indemnity. Recipient shall be solely responsible for damages
|
||||
arising, directly or indirectly, out of its utilization of rights
|
||||
under this License. Recipient will defend, indemnify and hold
|
||||
harmless Silicon Graphics, Inc. from and against any loss,
|
||||
liability, damages, costs or expenses (including the payment of
|
||||
reasonable attorneys fees) arising out of Recipient's use,
|
||||
modification, reproduction and distribution of the Covered Code or
|
||||
out of any representation or warranty made by Recipient.
|
||||
|
||||
12. U.S. Government End Users. The Covered Code is a "commercial item"
|
||||
consisting of "commercial computer software" as such terms are
|
||||
defined in title 48 of the Code of Federal Regulations and all U.S.
|
||||
Government End Users acquire only the rights set forth in this
|
||||
License and are subject to the terms of this License.
|
||||
|
||||
13. Miscellaneous. This License represents the complete agreement
|
||||
concerning the its subject matter. If any provision of this License
|
||||
is held to be unenforceable, such provision shall be reformed so as
|
||||
to achieve as nearly as possible the same legal and economic effect
|
||||
as the original provision and the remainder of this License will
|
||||
remain in effect. This License shall be governed by and construed
|
||||
in accordance with the laws of the United States and the State of
|
||||
California as applied to agreements entered into and to be
|
||||
performed entirely within California between California residents.
|
||||
Any litigation relating to this License shall be subject to the
|
||||
exclusive jurisdiction of the Federal Courts of the Northern
|
||||
District of California (or, absent subject matter jurisdiction in
|
||||
such courts, the courts of the State of California), with venue
|
||||
lying exclusively in Santa Clara County, California, with the
|
||||
losing party responsible for costs, including without limitation,
|
||||
court costs and reasonable attorneys fees and expenses. The
|
||||
application of the United Nations Convention on Contracts for the
|
||||
International Sale of Goods is expressly excluded. Any law or
|
||||
regulation that provides that the language of a contract shall be
|
||||
construed against the drafter shall not apply to this License.
|
||||
|
||||
Exhibit A
|
||||
|
||||
License Applicability. Except to the extent portions of this file are
|
||||
made subject to an alternative license as permitted in the SGI Free
|
||||
Software License B, Version 1.1 (the "License"), the contents of this
|
||||
file are subject only to the provisions of the License. You may not use
|
||||
this file except in compliance with the License. You may obtain a copy
|
||||
of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
|
||||
http://oss.sgi.com/projects/FreeB
|
||||
|
||||
Note that, as provided in the License, the Software is distributed on an
|
||||
"AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
|
||||
Original Code. The Original Code is: [name of software, version number,
|
||||
and release date], developed by Silicon Graphics, Inc. The Original Code
|
||||
is Copyright (c) [dates of first publication, as appearing in the Notice
|
||||
in the Original Code] Silicon Graphics, Inc. Copyright in any portions
|
||||
created by third parties is as indicated elsewhere herein. All Rights
|
||||
Copyright (C) [dates of first publication] Silicon Graphics, Inc. All Rights
|
||||
Reserved.
|
||||
|
||||
Additional Notice Provisions: [such additional provisions, if any, as
|
||||
appear in the Notice in the Original Code under the heading "Additional
|
||||
Notice Provisions"]
|
||||
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 including the dates of first publication and either
|
||||
this permission notice or a reference to http://oss.sgi.com/projects/FreeB/
|
||||
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 SILICON GRAPHICS, INC. 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.
|
||||
Except as contained in this notice, the name of Silicon Graphics, Inc. shall
|
||||
not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization from Silicon
|
||||
Graphics, Inc.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
@@ -12,7 +12,7 @@ Index: mesa/src/mesa/main/imports.h
|
||||
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
|
||||
- defined(__s390x__) || defined(__powerpc__) || \
|
||||
+ defined(__s390__) || defined(__s390x__) || defined(__powerpc__) || \
|
||||
defined(__amd64__) || \
|
||||
defined(__amd64__) || defined(__x86_64__) || \
|
||||
+ defined(__m68k__) || \
|
||||
defined(ia64) || defined(__ia64__) || \
|
||||
defined(__hppa__) || defined(hpux) || \
|
||||
|
@@ -10,39 +10,31 @@ Also remove references to GLU library since it is not required
|
||||
and we don't actually build it at this point.
|
||||
|
||||
|
||||
Index: mesa/progs/xdemos/Makefile
|
||||
===================================================================
|
||||
--- mesa.orig/progs/xdemos/Makefile 2007-11-11 00:34:12.000000000 +0100
|
||||
+++ mesa/progs/xdemos/Makefile 2007-11-11 02:07:52.000000000 +0100
|
||||
@@ -6,11 +6,11 @@
|
||||
--- mesa.orig/progs/xdemos/Makefile
|
||||
+++ mesa/progs/xdemos/Makefile
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
INCDIR = $(TOP)/include
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
|
||||
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
-PROGS = glthreads \
|
||||
+PROGS ?= glthreads \
|
||||
-PROGS = \
|
||||
+PROGS ?= \
|
||||
glthreads \
|
||||
glxdemo \
|
||||
glxgears \
|
||||
glxgears_fbconfig \
|
||||
@@ -46,6 +46,9 @@
|
||||
@@ -55,6 +55,11 @@
|
||||
extra: $(EXTRA_PROGS)
|
||||
|
||||
default: $(PROGS)
|
||||
|
||||
+install: $(PROGS)
|
||||
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/bin
|
||||
+ $(INSTALL) -m 755 $(PROGS) $(DESTDIR)$(INSTALL_DIR)/bin
|
||||
|
||||
+
|
||||
+
|
||||
clean:
|
||||
-rm -f $(PROGS)
|
||||
Index: mesa/progs/Makefile
|
||||
===================================================================
|
||||
--- mesa.orig/progs/Makefile 2007-11-11 00:34:12.000000000 +0100
|
||||
+++ mesa/progs/Makefile 2007-11-11 02:06:48.000000000 +0100
|
||||
-rm -f $(PROGS) $(EXTRA_PROGS)
|
||||
-rm -f *.o *~
|
||||
--- mesa.orig/progs/Makefile
|
||||
+++ mesa/progs/Makefile
|
||||
@@ -21,8 +21,12 @@
|
||||
fi \
|
||||
done
|
||||
|
197
debian/patches/04_cleanup-osmesa-configs.patch
vendored
197
debian/patches/04_cleanup-osmesa-configs.patch
vendored
@@ -1,197 +0,0 @@
|
||||
Index: mesa/configs/linux-osmesa
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-osmesa 2007-11-11 00:24:07.000000000 +0100
|
||||
+++ mesa/configs/linux-osmesa 2007-11-11 00:33:20.000000000 +0100
|
||||
@@ -9,8 +9,17 @@
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
|
||||
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
+
|
||||
+PIC_FLAGS = -fPIC
|
||||
+
|
||||
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
+ -D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
+ -DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
|
||||
+
|
||||
+CFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
+ $(ASM_FLAGS) -ffast-math
|
||||
+
|
||||
+CXXFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
@@ -26,3 +35,4 @@
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lOSMesa -lGLU
|
||||
+
|
||||
Index: mesa/configs/linux-osmesa-static
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-osmesa-static 2007-11-11 00:24:01.000000000 +0100
|
||||
+++ mesa/configs/linux-osmesa-static 2007-11-11 00:33:20.000000000 +0100
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
# Compiler and flags
|
||||
MKLIB_OPTIONS = -static
|
||||
+PIC_FLAGS =
|
||||
|
||||
# Library names
|
||||
-OSMESA_LIB_NAME = libOSMesa.a
|
||||
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
|
||||
|
||||
Index: mesa/configs/linux-osmesa16
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-osmesa16 2007-11-11 00:24:07.000000000 +0100
|
||||
+++ mesa/configs/linux-osmesa16 2007-11-11 00:33:41.000000000 +0100
|
||||
@@ -1,31 +1,19 @@
|
||||
# Configuration for 16 bits/channel OSMesa library on Linux
|
||||
|
||||
-include $(TOP)/configs/default
|
||||
+include $(TOP)/configs/linux-osmesa
|
||||
|
||||
CONFIG_NAME = linux-osmesa16
|
||||
|
||||
-# Compiler and flags
|
||||
-CC = gcc
|
||||
-CXX = g++
|
||||
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
-
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
-
|
||||
+DEFINES += -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=32
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa16
|
||||
-OSMESA_LIB_NAME = libOSMesa16.so
|
||||
-
|
||||
|
||||
# Directories
|
||||
-SRC_DIRS = mesa glu
|
||||
-DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
-
|
||||
# Dependencies
|
||||
-OSMESA_LIB_DEPS = -lm -lpthread
|
||||
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
-APP_LIB_DEPS = -lOSMesa16
|
||||
+APP_LIB_DEPS = -l$(OSMESA_LIB)
|
||||
+
|
||||
Index: mesa/configs/linux-osmesa16-static
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-osmesa16-static 2007-11-11 00:24:07.000000000 +0100
|
||||
+++ mesa/configs/linux-osmesa16-static 2007-11-11 00:33:20.000000000 +0100
|
||||
@@ -1,14 +1,10 @@
|
||||
# Configuration for 16 bits/channel OSMesa library on Linux
|
||||
|
||||
-include $(TOP)/configs/default
|
||||
+include $(TOP)/configs/linux-osmesa16
|
||||
|
||||
CONFIG_NAME = linux-osmesa16-static
|
||||
|
||||
# Compiler and flags
|
||||
-CC = gcc
|
||||
-CXX = g++
|
||||
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
MKLIB_OPTIONS = -static
|
||||
PIC_FLAGS =
|
||||
|
||||
@@ -17,16 +13,5 @@
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names
|
||||
-OSMESA_LIB = OSMesa16
|
||||
-OSMESA_LIB_NAME = libOSMesa16.a
|
||||
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
|
||||
|
||||
-
|
||||
-# Directories
|
||||
-SRC_DIRS = mesa glu
|
||||
-DRIVER_DIRS = osmesa
|
||||
-PROGRAM_DIRS =
|
||||
-
|
||||
-
|
||||
-# Dependencies
|
||||
-OSMESA_LIB_DEPS = -lm -lpthread
|
||||
-APP_LIB_DEPS = -lOSMesa16
|
||||
Index: mesa/configs/linux-osmesa32
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-osmesa32 2007-11-11 00:24:07.000000000 +0100
|
||||
+++ mesa/configs/linux-osmesa32 2007-11-11 00:33:51.000000000 +0100
|
||||
@@ -1,31 +1,22 @@
|
||||
# Configuration for 32 bits/channel OSMesa library on Linux
|
||||
|
||||
-include $(TOP)/configs/default
|
||||
+include $(TOP)/configs/linux-osmesa
|
||||
|
||||
CONFIG_NAME = linux-osmesa32
|
||||
|
||||
# Compiler and flags
|
||||
-CC = gcc
|
||||
-CXX = g++
|
||||
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
+DEFINES += -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa32
|
||||
-OSMESA_LIB_NAME = libOSMesa32.so
|
||||
-
|
||||
|
||||
# Directories
|
||||
-SRC_DIRS = mesa glu
|
||||
-DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
-
|
||||
# Dependencies
|
||||
-OSMESA_LIB_DEPS = -lm -lpthread
|
||||
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
-APP_LIB_DEPS = -lOSMesa32
|
||||
+APP_LIB_DEPS = -l$(OSMESA_LIB)
|
||||
+
|
||||
Index: mesa/configs/linux-osmesa32-static
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-osmesa32-static 2007-11-11 00:24:01.000000000 +0100
|
||||
+++ mesa/configs/linux-osmesa32-static 2007-11-11 00:33:20.000000000 +0100
|
||||
@@ -1,28 +1,13 @@
|
||||
# Configuration for 32 bits/channel OSMesa library on Linux
|
||||
|
||||
-include $(TOP)/configs/default
|
||||
+include $(TOP)/configs/linux-osmesa32
|
||||
|
||||
CONFIG_NAME = linux-osmesa32-static
|
||||
|
||||
# Compiler and flags
|
||||
-CC = gcc
|
||||
-CXX = g++
|
||||
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
MKLIB_OPTIONS = -static
|
||||
-
|
||||
+PIC_FLAGS =
|
||||
|
||||
# Library names
|
||||
-OSMESA_LIB = OSMesa32
|
||||
-OSMESA_LIB_NAME = libOSMesa32.a
|
||||
-
|
||||
-
|
||||
-# Directories
|
||||
-SRC_DIRS = mesa glu
|
||||
-DRIVER_DIRS = osmesa
|
||||
-PROGRAM_DIRS =
|
||||
-
|
||||
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
|
||||
|
||||
-# Dependencies
|
||||
-OSMESA_LIB_DEPS = -lm -lpthread
|
||||
-APP_LIB_DEPS = -lOSMesa32
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -2,4 +2,3 @@
|
||||
01_fix-makefile.patch
|
||||
02_use-ieee-fp-on-s390-and-m68k.patch
|
||||
03_optional-progs-and-install.patch
|
||||
04_cleanup-osmesa-configs.patch
|
||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@@ -22,9 +22,11 @@ endif
|
||||
|
||||
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
DEB_BUILD_DIR ?= $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
|
||||
|
||||
export DEB_BUILD_ARCH
|
||||
export DEB_HOST_ARCH_CPU
|
||||
|
||||
# choose which configurations to build
|
||||
SWX11_GLU_CONFIGS =
|
||||
|
@@ -1,15 +1,15 @@
|
||||
<html>
|
||||
<html><head><title>Mesa fbdev/DRI Environment</title>
|
||||
|
||||
|
||||
<TITLE>Mesa fbdev/DRI Environment</TITLE>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
<body>
|
||||
|
||||
<center><H1>Mesa fbdev/DRI Drivers</H1></center>
|
||||
<center><h1>Mesa fbdev/DRI Drivers</h1></center>
|
||||
<br>
|
||||
|
||||
|
||||
<H1>1. Introduction</H1>
|
||||
<h1>1. Introduction</h1>
|
||||
|
||||
<p>
|
||||
The fbdev/DRI environment supports hardware-accelerated 3D rendering without
|
||||
@@ -22,60 +22,131 @@ Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.
|
||||
|
||||
<p>
|
||||
Applications in the fbdev/DRI environment use
|
||||
the <a href="MiniGXL.html"> MiniGLX</a> interface to choose pixel
|
||||
the <a href="http://www.nabble.com/file/p15480666/MiniGXL.html"> MiniGLX</a> interface to choose pixel
|
||||
formats, create rendering contexts, etc. It's a subset of the GLX and
|
||||
Xlib interfaces allowing some degree of application portability between
|
||||
the X and X-less environments.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Some of the files needed for building this configuration are not included
|
||||
in the normal Mesa releases so you'll need to get the latest sources
|
||||
sources from the <a href="repository.html">git repository</a>.
|
||||
Note that this environment is not well-supported and these instructions
|
||||
may not be completely up to date.
|
||||
</p>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
This fbdev/DRI environment isn't well supported.
|
||||
Code and documentation updates/patches are welcomed.
|
||||
</p>
|
||||
|
||||
|
||||
<h1>2. Compilation</h1>
|
||||
|
||||
<p>
|
||||
You'll need the DRM and pciaccess libraries. Check with:
|
||||
|
||||
<h2>2.1 glxproto</h2>
|
||||
|
||||
Get <a href="http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/include/GL/glxproto.h?rev=1.9">glxproto.h</a>. Copy it to the /mesa/include/GL/ directory.
|
||||
</p>
|
||||
<pre>
|
||||
pkg-config --modversion libdrm
|
||||
pkg-config --modversion pciaccess
|
||||
|
||||
<h2>2.2 libpciaccess</h2>
|
||||
<p>
|
||||
Check if you have libpciaccess installed:
|
||||
</p>
|
||||
|
||||
<pre>pkg-config --modversion pciaccess
|
||||
</pre>
|
||||
<p>
|
||||
If not you can download the latest code from:
|
||||
</p>
|
||||
<pre> git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess
|
||||
</pre>
|
||||
<p>
|
||||
Run autogen.sh to generate a configure file. autogen.sh uses autoconf
|
||||
utility. This utility may not be installed with your linux distro,
|
||||
check if it is available. if not you can use your package manager or
|
||||
type:
|
||||
</p>
|
||||
<pre>sudo apt-get install autoconf
|
||||
</pre>
|
||||
The next step is to install the libpciaccess library.
|
||||
<pre>make
|
||||
make install
|
||||
</pre>
|
||||
<p> Now your libpciaccess.a file is saved into /usr/local/lib
|
||||
directory. If you have a libpciaccess.a in /usr/lib you may simply copy
|
||||
and overwrite these files. Don't forget to copy libpciaccess.pc file to
|
||||
/usr/lib/pkgconfig, which is also located in /usr/local/lib/pkgconfig/.
|
||||
Or you may use the following system variables:
|
||||
</p>
|
||||
<pre>export LD_LIBRARY_PATH=/usr/local/lib
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
You can get them from the git repository with:
|
||||
<h2>2.3 drm</h2>
|
||||
|
||||
<p>The next step is to compile the drm. DRM consists of two seperate parts,
|
||||
the DRM client library(lindrm.so) and kernel device module(such as
|
||||
radeon.ko). We need to make a small change in kernel device module. So
|
||||
you need to download the kernel source. You may choose the nearest
|
||||
mirror from www.kernel.org, or you are using Fedora Core 5, for
|
||||
example, you may need to install RPMs such as:
|
||||
kernel-smp-devel-2.16.15-1.2054_FC5.i686.rpm
|
||||
kernel-devel-2.6.15-1.2054_FC5.i686.rpm
|
||||
etc. You can find a detailed information <a href="http://www.howtoforge.com/kernel_compilation_fedora">here.</a>
|
||||
</p>
|
||||
|
||||
<p>You will find drm_drv.c at /usr/src/LINUX-VERSION/drivers/char/drm/. Edit this code and comment out the following part:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
git clone git://anongit.freedesktop.org/git/mesa/drm
|
||||
git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess
|
||||
/* ||
|
||||
((ioctl->flags & DRM_MASTER) && !priv->master)*/
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
See the README files in those projects for build/install instructions.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
Now you are ready to compile your kernel. If your kernel version is
|
||||
identical to the version you have compiled, you can simply over write
|
||||
your new "ko" files over older ones. If you have compiled a different
|
||||
kernel, you must configure your grub or lilo to be able to boot your
|
||||
new kernel. <p>
|
||||
You'll need fbdev header files. Check with:
|
||||
</p>
|
||||
<pre>
|
||||
ls -l /usr/include/linux/fb.h
|
||||
ls -l /usr/include/linux/fb.
|
||||
</pre>
|
||||
<p>This file may be missing if you have not installed linux header files.
|
||||
|
||||
<p>
|
||||
You'll need to get Mesa from git (see above).
|
||||
Compile Mesa with the 'linux-solo' configuration:
|
||||
|
||||
<h2>2.4 Mesa</h2>
|
||||
|
||||
</p><p>Get latest development Mesa sources from git repository
|
||||
(currently 7.1-prerelease)
|
||||
</p>
|
||||
<pre>
|
||||
make linux-solo
|
||||
git clone git://anongit.freedesktop.org/git/mesa/mesa
|
||||
</pre>
|
||||
|
||||
<p>You will need the makedepend utility which is a part of mesa project
|
||||
to build your linux-solo. You probably wont have this utility. You can
|
||||
download its source from following git repulsitory:
|
||||
</p>
|
||||
<pre>
|
||||
git clone git://anongit.freedesktop.org/git/xorg/util/makedepend
|
||||
</pre>
|
||||
|
||||
<p>Get the latest stable mesa version from SourceForge (currently 7.0.3)
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=3">http://sourceforge.net/project/showfiles.php?group_id=3</a>
|
||||
</p>
|
||||
|
||||
<p>Copy the miniglx folder from 7.1-prerelease to 7.0.3.
|
||||
You may also extract GLUT to 7.0.3 version at this step.
|
||||
</p>
|
||||
|
||||
<p>Edit linux-solo.conf at /conf directory, just only compile the
|
||||
graphics driver you need, delete the unwanted drivers names from the
|
||||
list(some drivers are causing problems...)
|
||||
</p>
|
||||
<pre>
|
||||
while(build==0)
|
||||
{
|
||||
make linux-solo
|
||||
|
||||
There will be some missing header files, copy them from 7.1-prerelease
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -83,22 +154,40 @@ When complete you should have the following:
|
||||
</p>
|
||||
<ul>
|
||||
<li>lib/libGL.so - the GL library which applications link with
|
||||
<li>lib/*_dri_so - DRI drivers
|
||||
<li>lib/miniglx.conf - sample MiniGLX config file
|
||||
<li>progs/miniglx/* - several MiniGLX sample programs
|
||||
</ul>
|
||||
</li><li>lib/*_dri_so - DRI drivers
|
||||
</li><li>lib/miniglx.conf - sample MiniGLX config file
|
||||
</li><li>progs/miniglx/* - several MiniGLX sample programs
|
||||
</li></ul>
|
||||
|
||||
To install these files into appropriate locations in system:
|
||||
<pre>
|
||||
make install
|
||||
</pre>
|
||||
|
||||
Now your openGL libraries are copied to /usr/local/lib and
|
||||
miniglx.conf is copied to /etc. You may copy them to /usr/lib and
|
||||
overwrite your old GL libraries. Or you may export following variable:
|
||||
|
||||
<pre>
|
||||
export LIBGL_DRIVERS_PATH=/usr/local/lib
|
||||
</pre>
|
||||
<br>
|
||||
|
||||
|
||||
<h1>3. Using fbdev/DRI</h1>
|
||||
|
||||
<p>
|
||||
If an X server currently running, exit/stop it so you're working from
|
||||
the console.
|
||||
the console. Following command shuts down the x window and also the multi user support.
|
||||
</p>
|
||||
<pre>
|
||||
init 1
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>3.1 Load Kernel Modules</h2>
|
||||
<p>Also you may define the runlevel as 1 in "/etc/inittab". Your system
|
||||
will always start in single user mode and without x-window with this
|
||||
option set.
|
||||
</p><h2>3.1 Load Kernel Modules</h2>
|
||||
|
||||
<p>
|
||||
You'll need to load the kernel modules specific to your graphics hardware.
|
||||
@@ -112,8 +201,7 @@ As root, the kernel modules can be loaded as follows:
|
||||
<p>
|
||||
If you have Intel i915/i945 hardware:
|
||||
</p>
|
||||
<pre>
|
||||
modprobe agpgart # the AGP GART module
|
||||
<pre> modprobe agpgart # the AGP GART module
|
||||
modprobe intelfb # the Intel fbdev driver
|
||||
modprobe i915 # the i915/945 DRI kernel module
|
||||
</pre>
|
||||
@@ -121,8 +209,7 @@ If you have Intel i915/i945 hardware:
|
||||
<p>
|
||||
If you have ATI Radeon/R200 hardware:
|
||||
</p>
|
||||
<pre>
|
||||
modprobe agpgart # the AGP GART module
|
||||
<pre> modprobe agpgart # the AGP GART module
|
||||
modprobe radeonfb # the Radeon fbdev driver
|
||||
modprobe radeon # the Radeon DRI kernel module
|
||||
</pre>
|
||||
@@ -130,8 +217,7 @@ If you have ATI Radeon/R200 hardware:
|
||||
<p>
|
||||
If you have ATI Rage 128 hardware:
|
||||
</p>
|
||||
<pre>
|
||||
modprobe agpgart # the AGP GART module
|
||||
<pre> modprobe agpgart # the AGP GART module
|
||||
modprobe aty128fb # the Rage 128 fbdev driver
|
||||
modprobe r128 # the Rage 128 DRI kernel module
|
||||
</pre>
|
||||
@@ -139,8 +225,7 @@ If you have ATI Rage 128 hardware:
|
||||
<p>
|
||||
If you have Matrox G200/G400 hardware:
|
||||
</p>
|
||||
<pre>
|
||||
modprobe agpgart # the AGP GART module
|
||||
<pre> modprobe agpgart # the AGP GART module
|
||||
modprobe mgafb # the Matrox fbdev driver
|
||||
modprobe mga # the Matrox DRI kernel module
|
||||
</pre>
|
||||
@@ -148,8 +233,7 @@ If you have Matrox G200/G400 hardware:
|
||||
<p>
|
||||
To verify that the agpgart, fbdev and drm modules are loaded:
|
||||
</p>
|
||||
<pre>
|
||||
ls -l /dev/agpgart /dev/fb* /dev/dri
|
||||
<pre> ls -l /dev/agpgart /dev/fb* /dev/dri
|
||||
</pre>
|
||||
<p>
|
||||
Alternately, use lsmod to inspect the currently installed modules.
|
||||
@@ -160,16 +244,15 @@ If you have problems, look at the output of dmesg.
|
||||
<h2>3.2 Configuration File</h2>
|
||||
|
||||
<p>
|
||||
Copy the sample miniglx.conf to /etc/miniglx.conf and review/edit its contents.
|
||||
review/edit /etc/miniglx.conf.
|
||||
Alternately, the MINIGLX_CONF environment variable can be used to
|
||||
indicate the location of miniglx.conf
|
||||
</p>
|
||||
|
||||
To determine the pciBusID value, run lspci and examine the output.
|
||||
For example:
|
||||
</p>
|
||||
<pre>
|
||||
/sbin/lspci:
|
||||
<p></p>
|
||||
<pre> /sbin/lspci:
|
||||
00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)
|
||||
</pre>
|
||||
<p>
|
||||
@@ -192,15 +275,13 @@ for example.
|
||||
Change to the <code>Mesa/progs/miniglx/</code> directory and
|
||||
start the sample_server program in the background:
|
||||
</p>
|
||||
<pre>
|
||||
./sample_server &
|
||||
<pre> ./sample_server &
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Then try running the <code>miniglxtest</code> program:
|
||||
</p>
|
||||
<pre>
|
||||
./miniglxtest
|
||||
<pre> ./miniglxtest
|
||||
</pre>
|
||||
<p>
|
||||
You should see a rotating quadrilateral which changes color as it rotates.
|
||||
@@ -211,7 +292,7 @@ It will exit automatically after a bit.
|
||||
If you run other tests in the miniglx/ directory, you may want to run
|
||||
them from a remote shell so that you can stop them with ctrl-C.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<h1>4.0 Troubleshooting</h1>
|
||||
@@ -220,8 +301,7 @@ them from a remote shell so that you can stop them with ctrl-C.
|
||||
<li>
|
||||
If you try to run miniglxtest and get the following:
|
||||
<br>
|
||||
<pre>
|
||||
[miniglx] failed to probe chipset
|
||||
<pre> [miniglx] failed to probe chipset
|
||||
connect: Connection refused
|
||||
server connection lost
|
||||
</pre>
|
||||
@@ -235,7 +315,7 @@ It means that the sample_server process is not running.
|
||||
<h1>5.0 Programming Information</h1>
|
||||
|
||||
<p>
|
||||
OpenGL/Mesa is interfaced to fbdev via the <a href="MiniGLX.html">MiniGLX</a>
|
||||
OpenGL/Mesa is interfaced to fbdev via the <a href="http://www.nabble.com/file/p15480666/MiniGLX.html">MiniGLX</a>
|
||||
interface.
|
||||
MiniGLX is a subset of Xlib and GLX API functions which provides just
|
||||
enough functionality to setup OpenGL rendering and respond to simple
|
||||
@@ -256,5 +336,6 @@ See the <code>GL/miniglx.h</code> header file for details.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</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>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.0.3 Release Notes / (TBD) 2007</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,13 +17,18 @@ 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>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Added missing glw.pc.in file to release tarball
|
||||
@@ -36,8 +41,25 @@ Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
|
||||
<li>glGetActiveUniform returned incorrect sizes (bug 13751)
|
||||
<li>Fix several bugs relating to uniforms and attributes in GLSL API (Bruce Merry, bug 13753)
|
||||
<li>glTexImage3D(GL_PROXY_TEXTURE_3D) mis-set teximage depth field
|
||||
<li>Fixed GLX indirect vertex array rendering bug (14197)
|
||||
<li>Fixed crash when deleting framebuffer objects (bugs 13507, 14293)
|
||||
<li>User-defined clip planes enabled for R300 (bug 9871)
|
||||
<li>Fixed glBindTexture() crash upon bad target (bug 14514)
|
||||
<li>Fixed potential crash in glDrawPixels(GL_DEPTH_COMPONENT) (bug 13915)
|
||||
<li>Bad strings given to glProgramStringARB() didn't generate GL_INVALID_OPERATION
|
||||
<li>Fixed minor point rasterization regression (bug 11016)
|
||||
<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>
|
||||
<ul>
|
||||
<li>Updated glext.h to version 40
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
|
70
docs/relnotes-7.0.4.html
Normal file
70
docs/relnotes-7.0.4.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<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
|
||||
<li>Fixed a per-vertex glMaterial bug which could cause bad lighting
|
||||
<li>Fixed potential crash in AA/smoothed triangle rendering when using a fragment shader
|
||||
<li>Fixed glDrawElement + VBO segfault (bug 16156)
|
||||
<li>Fixed GLSL linker bug causing generic vertex attributes to get aliased
|
||||
<li>Fixed stack overflow when using glPixelZoom on Windows
|
||||
<li>Fixed broken all(bvec2) GLSL function, added misc missing bvec constructors
|
||||
<li>ARB program "state.clip[n].plane" didn't parse correctly
|
||||
<li>Fixed broken glGetUniformiv() (bug 13774)
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Added support for DragonFly OS
|
||||
<li>Added a build config for FreeBSD static libs (Anatolij Shkodin)
|
||||
<li>Enabled GL_EXT_multi_draw_arrays extension in R200/R300 drivers
|
||||
<li>Enabled GL_ARB_point_sprite extension in I965 driver
|
||||
<li>Enabled GL_EXT_texture_sRGB extension in I965 driver
|
||||
<li>Added support for GL shading language in I965 driver
|
||||
</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>
|
@@ -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>
|
||||
|
@@ -46,9 +46,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2007/02/12 */
|
||||
/* glext.h last updated 2008/03/24 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 39
|
||||
#define GL_GLEXT_VERSION 40
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
@@ -3091,8 +3091,8 @@ extern "C" {
|
||||
#ifndef GL_EXT_framebuffer_blit
|
||||
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
|
||||
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_multisample
|
||||
@@ -3379,6 +3379,9 @@ extern "C" {
|
||||
#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
|
||||
#endif
|
||||
|
||||
#ifndef GL_GREMEDY_frame_terminator
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -7252,6 +7255,14 @@ typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint
|
||||
typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
|
||||
#endif
|
||||
|
||||
#ifndef GL_GREMEDY_frame_terminator
|
||||
#define GL_GREMEDY_frame_terminator 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -16,6 +16,10 @@
|
||||
#include "trackball.h"
|
||||
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#define DEG_TO_RAD(DEG) ((DEG) * M_PI / 180.0)
|
||||
|
||||
#define TEXTURE_FILE "../images/reflect.rgb"
|
||||
|
@@ -6,11 +6,12 @@ include $(TOP)/configs/current
|
||||
|
||||
INCDIR = $(TOP)/include
|
||||
|
||||
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
|
||||
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
PROGS = glthreads \
|
||||
PROGS = \
|
||||
glthreads \
|
||||
glxdemo \
|
||||
glxgears \
|
||||
glxgears_fbconfig \
|
||||
@@ -27,10 +28,14 @@ PROGS = glthreads \
|
||||
pbdemo \
|
||||
wincopy \
|
||||
xfont \
|
||||
xrotfontdemo \
|
||||
yuvrect_client
|
||||
xrotfontdemo
|
||||
|
||||
# Don't build these by default because of extra library dependencies
|
||||
EXTRA_PROGS = \
|
||||
shape \
|
||||
yuvrect_client \
|
||||
xdemo
|
||||
|
||||
# omit this XMesa API demo: xdemo
|
||||
|
||||
|
||||
##### RULES #####
|
||||
@@ -47,8 +52,11 @@ PROGS = glthreads \
|
||||
default: $(PROGS)
|
||||
|
||||
|
||||
extra: $(EXTRA_PROGS)
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f $(PROGS)
|
||||
-rm -f $(PROGS) $(EXTRA_PROGS)
|
||||
-rm -f *.o *~
|
||||
|
||||
|
||||
@@ -83,3 +91,6 @@ xuserotfont.o: xuserotfont.c xuserotfont.h
|
||||
xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
|
||||
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
|
||||
|
||||
yuvrect_client: yuvrect_client.c
|
||||
$(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
|
||||
|
||||
|
@@ -505,7 +505,7 @@ main(int argc, char *argv[])
|
||||
for (i = 0; i < numThreads; i++) {
|
||||
pthread_create(&WinThreads[i].Thread, NULL, thread_function,
|
||||
(void*) &WinThreads[i]);
|
||||
printf("glthreads: Created thread %u\n", (unsigned int) WinThreads[i].Thread);
|
||||
printf("glthreads: Created thread %p\n", WinThreads[i].Thread);
|
||||
}
|
||||
|
||||
if (MultiDisplays)
|
||||
|
@@ -596,7 +596,7 @@ get_visual_attribs(Display *dpy, XVisualInfo *vInfo,
|
||||
|
||||
/* multisample attribs */
|
||||
#ifdef GLX_ARB_multisample
|
||||
if (ext && strstr(ext, "GLX_ARB_multisample") == 0) {
|
||||
if (ext && strstr(ext, "GLX_ARB_multisample")) {
|
||||
glXGetConfig(dpy, vInfo, GLX_SAMPLE_BUFFERS_ARB, &attribs->numMultisample);
|
||||
glXGetConfig(dpy, vInfo, GLX_SAMPLES_ARB, &attribs->numSamples);
|
||||
}
|
||||
|
@@ -34,7 +34,6 @@
|
||||
static int Width=500, Height=500;
|
||||
|
||||
static float Xangle = 0.0, Yangle = 0.0;
|
||||
static int Redraw = 0;
|
||||
static int Sides = 5;
|
||||
static int MinSides = 3;
|
||||
static int MaxSides = 20;
|
||||
|
@@ -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");
|
||||
|
@@ -713,8 +713,8 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
|
||||
GLfloat cosCache3b[CACHE_SIZE];
|
||||
GLfloat angle;
|
||||
GLfloat zLow, zHigh;
|
||||
GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
|
||||
GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
|
||||
GLfloat sintemp1 = 0.0, sintemp2 = 0.0, sintemp3 = 0.0, sintemp4 = 0.0;
|
||||
GLfloat costemp1 = 0.0, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
|
||||
GLboolean needCache2, needCache3;
|
||||
GLint start, finish;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -72,6 +72,23 @@ tags:
|
||||
etags `find . -name \*.[ch]` `find ../include`
|
||||
|
||||
|
||||
# glut pkgconfig file
|
||||
pcedit = sed \
|
||||
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
||||
-e 's,@LIB_DIR@,$(LIB_DIR),' \
|
||||
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
|
||||
glut.pc: glut.pc.in
|
||||
$(pcedit) $< > $@
|
||||
|
||||
install: glut.pc
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
||||
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
||||
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
||||
|
||||
|
||||
# Remove .o and backup files
|
||||
clean: depend
|
||||
-rm -f depend
|
||||
|
11
src/glut/mini/glut.pc.in
Normal file
11
src/glut/mini/glut.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@INSTALL_DIR@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/@LIB_DIR@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: glut
|
||||
Description: Mesa OpenGL Utility Toolkit library
|
||||
Requires: gl glu
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lglut
|
||||
Cflags: -I${includedir}
|
@@ -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
|
||||
|
5914
src/glx/x11/indirect_dispatch.c
Normal file
5914
src/glx/x11/indirect_dispatch.c
Normal file
File diff suppressed because it is too large
Load Diff
1043
src/glx/x11/indirect_dispatch.h
Normal file
1043
src/glx/x11/indirect_dispatch.h
Normal file
File diff suppressed because it is too large
Load Diff
6076
src/glx/x11/indirect_dispatch_swap.c
Normal file
6076
src/glx/x11/indirect_dispatch_swap.c
Normal file
File diff suppressed because it is too large
Load Diff
832
src/glx/x11/indirect_reqsize.c
Normal file
832
src/glx/x11/indirect_reqsize.c
Normal file
@@ -0,0 +1,832 @@
|
||||
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
|
||||
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2005
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license,
|
||||
* 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* IBM,
|
||||
* AND/OR THEIR SUPPLIERS 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 <GL/gl.h>
|
||||
#include "glxserver.h"
|
||||
#include "glxbyteorder.h"
|
||||
#include "indirect_size.h"
|
||||
#include "indirect_reqsize.h"
|
||||
|
||||
#define __GLX_PAD(x) (((x) + 3) & ~3)
|
||||
|
||||
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
# undef HAVE_ALIAS
|
||||
#endif
|
||||
#ifdef HAVE_ALIAS
|
||||
# define ALIAS2(from,to) \
|
||||
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
|
||||
__attribute__ ((alias( # to )));
|
||||
# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
|
||||
#else
|
||||
# define ALIAS(from,to) \
|
||||
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
|
||||
{ return __glX ## to ## ReqSize( pc, swap ); }
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
__glXCallListsReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
GLenum type = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
compsize = __glCallLists_size(type);
|
||||
return __GLX_PAD((compsize * n));
|
||||
}
|
||||
|
||||
int
|
||||
__glXBitmapReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLsizei width = *(GLsizei *) (pc + 20);
|
||||
GLsizei height = *(GLsizei *) (pc + 24);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
}
|
||||
|
||||
return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXFogfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glFogfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXLightfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glLightfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glLightModelfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glMaterialfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
}
|
||||
|
||||
return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexParameterfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 32);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 32);
|
||||
GLsizei height = *(GLsizei *) (pc + 36);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexEnvfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexGendvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexGendv_size(pname);
|
||||
return __GLX_PAD((compsize * 8));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexGenfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei mapsize = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
mapsize = bswap_32(mapsize);
|
||||
}
|
||||
|
||||
return __GLX_PAD((mapsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei mapsize = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
mapsize = bswap_32(mapsize);
|
||||
}
|
||||
|
||||
return __GLX_PAD((mapsize * 2));
|
||||
}
|
||||
|
||||
int
|
||||
__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLsizei width = *(GLsizei *) (pc + 20);
|
||||
GLsizei height = *(GLsizei *) (pc + 24);
|
||||
GLenum format = *(GLenum *) (pc + 28);
|
||||
GLenum type = *(GLenum *) (pc + 32);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, 0, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 4) + (n * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 36);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 36);
|
||||
GLsizei height = *(GLsizei *) (pc + 40);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXColorTableReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 28);
|
||||
GLenum format = *(GLenum *) (pc + 32);
|
||||
GLenum type = *(GLenum *) (pc + 36);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glColorTableParameterfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei count = *(GLsizei *) (pc + 28);
|
||||
GLenum format = *(GLenum *) (pc + 32);
|
||||
GLenum type = *(GLenum *) (pc + 36);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
count = bswap_32(count);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, count, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 28);
|
||||
GLenum format = *(GLenum *) (pc + 36);
|
||||
GLenum type = *(GLenum *) (pc + 40);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 28);
|
||||
GLsizei height = *(GLsizei *) (pc + 32);
|
||||
GLenum format = *(GLenum *) (pc + 36);
|
||||
GLenum type = *(GLenum *) (pc + 40);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glConvolutionParameterfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = *(GLint *) (pc + 8);
|
||||
GLint skip_rows = *(GLint *) (pc + 16);
|
||||
GLint skip_images = *(GLint *) (pc + 20);
|
||||
GLint alignment = *(GLint *) (pc + 32);
|
||||
GLenum target = *(GLenum *) (pc + 36);
|
||||
GLsizei width = *(GLsizei *) (pc + 48);
|
||||
GLsizei height = *(GLsizei *) (pc + 52);
|
||||
GLsizei depth = *(GLsizei *) (pc + 56);
|
||||
GLenum format = *(GLenum *) (pc + 68);
|
||||
GLenum type = *(GLenum *) (pc + 72);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
image_height = bswap_32(image_height);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
skip_images = bswap_32(skip_images);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
depth = bswap_32(depth);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, depth,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = *(GLint *) (pc + 8);
|
||||
GLint skip_rows = *(GLint *) (pc + 16);
|
||||
GLint skip_images = *(GLint *) (pc + 20);
|
||||
GLint alignment = *(GLint *) (pc + 32);
|
||||
GLenum target = *(GLenum *) (pc + 36);
|
||||
GLsizei width = *(GLsizei *) (pc + 60);
|
||||
GLsizei height = *(GLsizei *) (pc + 64);
|
||||
GLsizei depth = *(GLsizei *) (pc + 68);
|
||||
GLenum format = *(GLenum *) (pc + 76);
|
||||
GLenum type = *(GLenum *) (pc + 80);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
image_height = bswap_32(image_height);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
skip_images = bswap_32(skip_images);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
depth = bswap_32(depth);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, depth,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 20);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 24);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 28);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 36);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei len = *(GLsizei *) (pc + 8);
|
||||
|
||||
if (swap) {
|
||||
len = bswap_32(len);
|
||||
}
|
||||
|
||||
return __GLX_PAD(len);
|
||||
}
|
||||
|
||||
int
|
||||
__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glPointParameterfvEXT_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLuint num = *(GLuint *) (pc + 8);
|
||||
|
||||
if (swap) {
|
||||
num = bswap_32(num);
|
||||
}
|
||||
|
||||
return __GLX_PAD((num * 32));
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLuint num = *(GLuint *) (pc + 8);
|
||||
|
||||
if (swap) {
|
||||
num = bswap_32(num);
|
||||
}
|
||||
|
||||
return __GLX_PAD((num * 16));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 8));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 16));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 24));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 12));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 6));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 32));
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei len = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
len = bswap_32(len);
|
||||
}
|
||||
|
||||
return __GLX_PAD(len);
|
||||
}
|
||||
|
||||
ALIAS(Fogiv, Fogfv)
|
||||
ALIAS(Lightiv, Lightfv)
|
||||
ALIAS(LightModeliv, LightModelfv)
|
||||
ALIAS(Materialiv, Materialfv)
|
||||
ALIAS(TexParameteriv, TexParameterfv)
|
||||
ALIAS(TexEnviv, TexEnvfv)
|
||||
ALIAS(TexGeniv, TexGenfv)
|
||||
ALIAS(PixelMapuiv, PixelMapfv)
|
||||
ALIAS(ColorTableParameteriv, ColorTableParameterfv)
|
||||
ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
|
||||
ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB)
|
||||
ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB)
|
||||
ALIAS(LoadProgramNV, ProgramStringARB)
|
||||
ALIAS(RequestResidentProgramsNV, DrawBuffersARB)
|
||||
ALIAS(VertexAttribs1fvNV, PixelMapfv)
|
||||
ALIAS(VertexAttribs1svNV, PixelMapusv)
|
||||
ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
|
||||
ALIAS(VertexAttribs2svNV, PixelMapfv)
|
||||
ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
|
||||
ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
|
||||
ALIAS(VertexAttribs4ubvNV, PixelMapfv)
|
||||
ALIAS(PointParameterivNV, PointParameterfvEXT)
|
||||
ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB)
|
||||
ALIAS(DeleteFramebuffersEXT, DrawBuffersARB)
|
||||
ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB)
|
121
src/glx/x11/indirect_reqsize.h
Normal file
121
src/glx/x11/indirect_reqsize.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
|
||||
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2005
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license,
|
||||
* 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* IBM,
|
||||
* AND/OR THEIR SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
#if !defined( _INDIRECT_REQSIZE_H_ )
|
||||
# define _INDIRECT_REQSIZE_H_
|
||||
|
||||
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
|
||||
# define HIDDEN __attribute__((visibility("hidden")))
|
||||
# else
|
||||
# define HIDDEN
|
||||
# endif
|
||||
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
# define PURE __attribute__((pure))
|
||||
# else
|
||||
# define PURE
|
||||
# endif
|
||||
|
||||
extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap);
|
||||
|
||||
# undef HIDDEN
|
||||
# undef PURE
|
||||
|
||||
#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */
|
1206
src/glx/x11/indirect_size_get.c
Normal file
1206
src/glx/x11/indirect_size_get.c
Normal file
File diff suppressed because it is too large
Load Diff
102
src/glx/x11/indirect_size_get.h
Normal file
102
src/glx/x11/indirect_size_get.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
|
||||
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2004
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license,
|
||||
* 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* IBM,
|
||||
* AND/OR THEIR SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
#if !defined( _INDIRECT_SIZE_GET_H_ )
|
||||
# define _INDIRECT_SIZE_GET_H_
|
||||
|
||||
/**
|
||||
* \file
|
||||
* Prototypes for functions used to determine the number of data elements in
|
||||
* various GLX protocol messages.
|
||||
*
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
# define PURE __attribute__((pure))
|
||||
# else
|
||||
# define PURE
|
||||
# endif
|
||||
|
||||
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define FASTCALL __attribute__((fastcall))
|
||||
# else
|
||||
# define FASTCALL
|
||||
# endif
|
||||
|
||||
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
|
||||
# define INTERNAL __attribute__((visibility("internal")))
|
||||
# else
|
||||
# define INTERNAL
|
||||
# endif
|
||||
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetConvolutionParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetConvolutionParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
|
||||
|
||||
# undef PURE
|
||||
# undef FASTCALL
|
||||
# undef INTERNAL
|
||||
|
||||
#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */
|
1593
src/glx/x11/indirect_table.c
Normal file
1593
src/glx/x11/indirect_table.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -485,14 +485,14 @@ emit_DrawArrays_none( GLenum mode, GLint first, GLsizei count )
|
||||
|
||||
for ( i = 0 ; i < count ; i++ ) {
|
||||
if ( (pc + single_vertex_size) >= gc->bufEnd ) {
|
||||
pc = __glXFlushRenderBuffer(gc, gc->pc);
|
||||
pc = __glXFlushRenderBuffer(gc, pc);
|
||||
}
|
||||
|
||||
pc = emit_element_none( pc, arrays, first + i );
|
||||
}
|
||||
|
||||
if ( (pc + 4) >= gc->bufEnd ) {
|
||||
pc = __glXFlushRenderBuffer(gc, gc->pc);
|
||||
pc = __glXFlushRenderBuffer(gc, pc);
|
||||
}
|
||||
|
||||
(void) memcpy( pc, end_cmd, 4 );
|
||||
@@ -726,7 +726,7 @@ emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type,
|
||||
unsigned index = 0;
|
||||
|
||||
if ( (pc + single_vertex_size) >= gc->bufEnd ) {
|
||||
pc = __glXFlushRenderBuffer(gc, gc->pc);
|
||||
pc = __glXFlushRenderBuffer(gc, pc);
|
||||
}
|
||||
|
||||
switch( type ) {
|
||||
@@ -744,7 +744,7 @@ emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type,
|
||||
}
|
||||
|
||||
if ( (pc + 4) >= gc->bufEnd ) {
|
||||
pc = __glXFlushRenderBuffer(gc, gc->pc);
|
||||
pc = __glXFlushRenderBuffer(gc, pc);
|
||||
}
|
||||
|
||||
(void) memcpy( pc, end_cmd, 4 );
|
||||
|
@@ -89,7 +89,8 @@ fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
|
||||
# Stand-alone Mesa libGL and libOSMesa
|
||||
STAND_ALONE_DRIVER_SOURCES = \
|
||||
$(COMMON_DRIVER_SOURCES) \
|
||||
$(X11_DRIVER_SOURCES)
|
||||
$(X11_DRIVER_SOURCES) \
|
||||
$(GLIDE_DRIVER_SOURCES)
|
||||
|
||||
STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o)
|
||||
|
||||
|
@@ -284,6 +284,7 @@ _mesa_init_glsl_driver_functions(struct dd_function_table *driver)
|
||||
driver->GetShaderInfoLog = _mesa_get_shader_info_log;
|
||||
driver->GetShaderSource = _mesa_get_shader_source;
|
||||
driver->GetUniformfv = _mesa_get_uniformfv;
|
||||
driver->GetUniformiv = _mesa_get_uniformiv;
|
||||
driver->GetUniformLocation = _mesa_get_uniform_location;
|
||||
driver->IsProgram = _mesa_is_program;
|
||||
driver->IsShader = _mesa_is_shader;
|
||||
|
@@ -486,6 +486,9 @@ static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate )
|
||||
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
|
||||
drm_clip_rect_t rect;
|
||||
|
||||
if (!dPriv->numClipRects)
|
||||
return;
|
||||
|
||||
dPriv->swapBuffers(dPriv);
|
||||
|
||||
/* Check that we actually have the new damage report method */
|
||||
|
@@ -1278,6 +1278,7 @@ driCalculateTextureFirstLastLevel( driTextureObject * t )
|
||||
else {
|
||||
firstLevel = tObj->BaseLevel + (GLint)(tObj->MinLod + 0.5);
|
||||
firstLevel = MAX2(firstLevel, tObj->BaseLevel);
|
||||
firstLevel = MIN2(firstLevel, tObj->BaseLevel + baseImage->MaxLog2);
|
||||
lastLevel = tObj->BaseLevel + (GLint)(tObj->MaxLod + 0.5);
|
||||
lastLevel = MAX2(lastLevel, t->tObj->BaseLevel);
|
||||
lastLevel = MIN2(lastLevel, t->tObj->BaseLevel + baseImage->MaxLog2);
|
||||
|
@@ -233,8 +233,8 @@ static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd )
|
||||
if ( first_time ) {
|
||||
fprintf(stderr,
|
||||
"%s: drmWaitVBlank returned %d, IRQs don't seem to be"
|
||||
" working correctly.\nTry running with LIBGL_THROTTLE_REFRESH"
|
||||
" and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret);
|
||||
" working correctly.\nTry adjusting the vblank_mode"
|
||||
" configuration parameter.\n", __FUNCTION__, ret);
|
||||
first_time = GL_FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#define I915CONTEXT_INC
|
||||
|
||||
#include "intel_context.h"
|
||||
#include "i915_reg.h"
|
||||
|
||||
#define I915_FALLBACK_TEXTURE 0x1000
|
||||
#define I915_FALLBACK_COLORMASK 0x2000
|
||||
@@ -103,6 +104,7 @@
|
||||
|
||||
#define I915_PROGRAM_SIZE 192
|
||||
|
||||
#define I915_MAX_INSN (I915_MAX_TEX_INSN+I915_MAX_ALU_INSN)
|
||||
|
||||
/* Hardware version of a parsed fragment program. "Derived" from the
|
||||
* mesa fragment_program struct.
|
||||
@@ -153,6 +155,10 @@ struct i915_fragment_program {
|
||||
*/
|
||||
|
||||
|
||||
/* Track which R registers are "live" for each instruction.
|
||||
* A register is live between the time it's written to and the last time
|
||||
* it's read. */
|
||||
GLuint usedRegs[I915_MAX_INSN];
|
||||
|
||||
/* Helpers for i915_fragprog.c:
|
||||
*/
|
||||
|
@@ -42,7 +42,20 @@
|
||||
#include "program.h"
|
||||
#include "programopt.h"
|
||||
|
||||
|
||||
static const GLfloat sin_quad_constants[2][4] = {
|
||||
{
|
||||
2.0,
|
||||
-1.0,
|
||||
.5,
|
||||
.75
|
||||
},
|
||||
{
|
||||
4.0,
|
||||
-4.0,
|
||||
1.0 / (2.0 * M_PI),
|
||||
.2225
|
||||
}
|
||||
};
|
||||
|
||||
/* 1, -1/3!, 1/5!, -1/7! */
|
||||
static const GLfloat sin_constants[4] = { 1.0,
|
||||
@@ -91,7 +104,7 @@ static GLuint src_vector( struct i915_fragment_program *p,
|
||||
break;
|
||||
case FRAG_ATTRIB_FOGC:
|
||||
src = i915_emit_decl( p, REG_TYPE_T, T_FOG_W, D0_CHANNEL_W );
|
||||
src = swizzle( src, W, W, W, W );
|
||||
src = swizzle(src, W, ZERO, ZERO, ONE);
|
||||
break;
|
||||
case FRAG_ATTRIB_TEX0:
|
||||
case FRAG_ATTRIB_TEX1:
|
||||
@@ -211,7 +224,7 @@ do { \
|
||||
GLuint coord = src_vector( p, &inst->SrcReg[0], program); \
|
||||
/* Texel lookup */ \
|
||||
\
|
||||
i915_emit_texld( p, \
|
||||
i915_emit_texld( p, get_live_regs(p, inst), \
|
||||
get_result_vector( p, inst ), \
|
||||
get_result_flags( inst ), \
|
||||
sampler, \
|
||||
@@ -234,6 +247,43 @@ do { \
|
||||
#define EMIT_2ARG_ARITH( OP ) EMIT_ARITH( OP, 2 )
|
||||
#define EMIT_3ARG_ARITH( OP ) EMIT_ARITH( OP, 3 )
|
||||
|
||||
/*
|
||||
* TODO: consider moving this into core
|
||||
*/
|
||||
static void calc_live_regs( struct i915_fragment_program *p )
|
||||
{
|
||||
const struct gl_fragment_program *program = p->ctx->FragmentProgram._Current;
|
||||
GLuint regsUsed = 0xffff0000;
|
||||
GLint i;
|
||||
|
||||
for (i = program->Base.NumInstructions - 1; i >= 0; i--) {
|
||||
struct prog_instruction *inst = &program->Base.Instructions[i];
|
||||
int opArgs = _mesa_num_inst_src_regs(inst->Opcode);
|
||||
int a;
|
||||
|
||||
/* Register is written to: unmark as live for this and preceeding ops */
|
||||
if (inst->DstReg.File == PROGRAM_TEMPORARY)
|
||||
regsUsed &= ~(1 << inst->DstReg.Index);
|
||||
|
||||
for (a = 0; a < opArgs; a++) {
|
||||
/* Register is read from: mark as live for this and preceeding ops */
|
||||
if (inst->SrcReg[a].File == PROGRAM_TEMPORARY)
|
||||
regsUsed |= 1 << inst->SrcReg[a].Index;
|
||||
}
|
||||
|
||||
p->usedRegs[i] = regsUsed;
|
||||
}
|
||||
}
|
||||
|
||||
static GLuint get_live_regs( struct i915_fragment_program *p,
|
||||
const struct prog_instruction *inst )
|
||||
{
|
||||
const struct gl_fragment_program *program = p->ctx->FragmentProgram._Current;
|
||||
GLuint nr = inst - program->Base.Instructions;
|
||||
|
||||
return p->usedRegs[nr];
|
||||
}
|
||||
|
||||
|
||||
/* Possible concerns:
|
||||
*
|
||||
@@ -267,9 +317,18 @@ static void upload_program( struct i915_fragment_program *p )
|
||||
return;
|
||||
}
|
||||
|
||||
if (program->Base.NumInstructions > I915_MAX_INSN) {
|
||||
i915_program_error( p, "Exceeded max instructions" );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Not always needed:
|
||||
*/
|
||||
calc_live_regs(p);
|
||||
|
||||
while (1) {
|
||||
GLuint src0, src1, src2, flags;
|
||||
GLuint tmp = 0;
|
||||
GLuint tmp = 0, consts0 = 0, consts1 = 0;
|
||||
|
||||
switch (inst->Opcode) {
|
||||
case OPCODE_ABS:
|
||||
@@ -297,67 +356,87 @@ static void upload_program( struct i915_fragment_program *p )
|
||||
break;
|
||||
|
||||
case OPCODE_COS:
|
||||
src0 = src_vector( p, &inst->SrcReg[0], program);
|
||||
tmp = i915_get_utemp( p );
|
||||
src0 = src_vector(p, &inst->SrcReg[0], program);
|
||||
tmp = i915_get_utemp(p);
|
||||
consts0 = i915_emit_const4fv(p, sin_quad_constants[0]);
|
||||
consts1 = i915_emit_const4fv(p, sin_quad_constants[1]);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
/* Reduce range from repeating about [-pi,pi] to [-1,1] */
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
src0,
|
||||
swizzle(consts1, Z, ZERO, ZERO, ZERO), /* 1/(2pi) */
|
||||
swizzle(consts0, W, ZERO, ZERO, ZERO)); /* .75 */
|
||||
|
||||
i915_emit_arith(p, A0_FRC, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0);
|
||||
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
src0,
|
||||
i915_emit_const1f(p, 1.0/(M_PI * 2)),
|
||||
tmp,
|
||||
swizzle(consts0, X, ZERO, ZERO, ZERO), /* 2 */
|
||||
swizzle(consts0, Y, ZERO, ZERO, ZERO)); /* -1 */
|
||||
|
||||
/* Compute COS with the same calculation used for SIN, but a
|
||||
* different source range has been mapped to [-1,1] this time.
|
||||
*/
|
||||
|
||||
/* tmp.y = abs(tmp.x); {x, abs(x), 0, 0} */
|
||||
i915_emit_arith(p,
|
||||
A0_MAX,
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
|
||||
0);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MOD,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
tmp,
|
||||
0, 0 );
|
||||
|
||||
/* By choosing different taylor constants, could get rid of this mul:
|
||||
*/
|
||||
i915_emit_arith( p,
|
||||
/* tmp.y = tmp.y * tmp.x; {x, x * abs(x), 0, 0} */
|
||||
i915_emit_arith(p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
tmp,
|
||||
i915_emit_const1f(p, (M_PI * 2)),
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
tmp,
|
||||
0);
|
||||
|
||||
/*
|
||||
* t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1
|
||||
* t0 = MUL t0.xyxy t0.xx11 ; x^4, x^3, x^2, 1
|
||||
* t0 = MUL t0.xxz1 t0.z111 ; x^6 x^4 x^2 1
|
||||
* result = DP4 t0, cos_constants
|
||||
/* tmp.x = tmp.xy DP sin_quad_constants[2].xy */
|
||||
i915_emit_arith(p,
|
||||
A0_DP3,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
tmp,
|
||||
swizzle(consts1, X, Y, ZERO, ZERO),
|
||||
0);
|
||||
|
||||
/* tmp.x now contains a first approximation (y). Now, weight it
|
||||
* against tmp.y**2 to get closer.
|
||||
*/
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_XY, 0,
|
||||
swizzle(tmp, X,X,ONE,ONE),
|
||||
swizzle(tmp, X,ONE,ONE,ONE), 0);
|
||||
i915_emit_arith(p,
|
||||
A0_MAX,
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
|
||||
0);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_XYZ, 0,
|
||||
swizzle(tmp, X,Y,X,ONE),
|
||||
swizzle(tmp, X,X,ONE,ONE), 0);
|
||||
/* tmp.y = tmp.x * tmp.y - tmp.x; {y, y * abs(y) - y, 0, 0} */
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
swizzle(tmp, ZERO, Y, ZERO, ZERO),
|
||||
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0));
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_XYZ, 0,
|
||||
swizzle(tmp, X,X,Z,ONE),
|
||||
swizzle(tmp, Z,ONE,ONE,ONE), 0);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_DP4,
|
||||
get_result_vector( p, inst ),
|
||||
get_result_flags( inst ), 0,
|
||||
swizzle(tmp, ONE,Z,Y,X),
|
||||
i915_emit_const4fv( p, cos_constants ), 0);
|
||||
/* result = .2225 * tmp.y + tmp.x =.2225(y * abs(y) - y) + y= */
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
get_result_vector(p, inst),
|
||||
get_result_flags(inst), 0,
|
||||
swizzle(consts1, W, W, W, W),
|
||||
swizzle(tmp, Y, Y, Y, Y),
|
||||
swizzle(tmp, X, X, X, X));
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case OPCODE_DP3:
|
||||
EMIT_2ARG_ARITH( A0_DP3 );
|
||||
break;
|
||||
case OPCODE_DP3:
|
||||
EMIT_2ARG_ARITH(A0_DP3);
|
||||
break;
|
||||
|
||||
case OPCODE_DP4:
|
||||
EMIT_2ARG_ARITH( A0_DP4 );
|
||||
@@ -414,11 +493,9 @@ static void upload_program( struct i915_fragment_program *p )
|
||||
src0 = src_vector( p, &inst->SrcReg[0], program);
|
||||
tmp = i915_get_utemp( p );
|
||||
|
||||
i915_emit_texld( p,
|
||||
tmp, A0_DEST_CHANNEL_ALL, /* use a dummy dest reg */
|
||||
0,
|
||||
src0,
|
||||
T0_TEXKILL );
|
||||
i915_emit_texld(p, get_live_regs(p, inst),
|
||||
tmp, A0_DEST_CHANNEL_ALL, /* use a dummy dest reg */
|
||||
0, src0, T0_TEXKILL);
|
||||
break;
|
||||
|
||||
case OPCODE_LG2:
|
||||
@@ -638,62 +715,86 @@ static void upload_program( struct i915_fragment_program *p )
|
||||
break;
|
||||
|
||||
case OPCODE_SIN:
|
||||
src0 = src_vector( p, &inst->SrcReg[0], program);
|
||||
tmp = i915_get_utemp( p );
|
||||
src0 = src_vector(p, &inst->SrcReg[0], program);
|
||||
tmp = i915_get_utemp(p);
|
||||
consts0 = i915_emit_const4fv(p, sin_quad_constants[0]);
|
||||
consts1 = i915_emit_const4fv(p, sin_quad_constants[1]);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
/* Reduce range from repeating about [-pi,pi] to [-1,1] */
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
src0,
|
||||
swizzle(consts1, Z, ZERO, ZERO, ZERO), /* 1/(2pi) */
|
||||
swizzle(consts0, Z, ZERO, ZERO, ZERO)); /* .5 */
|
||||
|
||||
i915_emit_arith(p, A0_FRC, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0);
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
src0,
|
||||
i915_emit_const1f(p, 1.0/(M_PI * 2)),
|
||||
tmp,
|
||||
swizzle(consts0, X, ZERO, ZERO, ZERO), /* 2 */
|
||||
swizzle(consts0, Y, ZERO, ZERO, ZERO)); /* -1 */
|
||||
|
||||
/* Compute sin using a quadratic and quartic. It gives continuity
|
||||
* that repeating the Taylor series lacks every 2*pi, and has
|
||||
* reduced error.
|
||||
*
|
||||
* The idea was described at:
|
||||
* http://www.devmaster.net/forums/showthread.php?t=5784
|
||||
*/
|
||||
/* tmp.y = abs(tmp.x); {x, abs(x), 0, 0} */
|
||||
i915_emit_arith(p,
|
||||
A0_MAX,
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
|
||||
0);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MOD,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
tmp,
|
||||
0, 0 );
|
||||
|
||||
/* By choosing different taylor constants, could get rid of this mul:
|
||||
*/
|
||||
i915_emit_arith( p,
|
||||
/* tmp.y = tmp.y * tmp.x; {x, x * abs(x), 0, 0} */
|
||||
i915_emit_arith(p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
tmp,
|
||||
i915_emit_const1f(p, (M_PI * 2)),
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
tmp,
|
||||
0);
|
||||
|
||||
/*
|
||||
* t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1
|
||||
* t0 = MUL t0.xyxy t0.xx11 ; x^4, x^3, x^2, x
|
||||
* t1 = MUL t0.xyyw t0.yz11 ; x^7 x^5 x^3 x
|
||||
* result = DP4 t1.wzyx, sin_constants
|
||||
/* tmp.x = tmp.xy DP sin_quad_constants[2].xy */
|
||||
i915_emit_arith(p,
|
||||
A0_DP3,
|
||||
tmp, A0_DEST_CHANNEL_X, 0,
|
||||
tmp,
|
||||
swizzle(consts1, X, Y, ZERO, ZERO),
|
||||
0);
|
||||
|
||||
/* tmp.x now contains a first approximation (y). Now, weight it
|
||||
* against tmp.y**2 to get closer.
|
||||
*/
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_XY, 0,
|
||||
swizzle(tmp, X,X,ONE,ONE),
|
||||
swizzle(tmp, X,ONE,ONE,ONE), 0);
|
||||
i915_emit_arith(p,
|
||||
A0_MAX,
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
|
||||
0);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_ALL, 0,
|
||||
swizzle(tmp, X,Y,X,Y),
|
||||
swizzle(tmp, X,X,ONE,ONE), 0);
|
||||
/* tmp.y = tmp.x * tmp.y - tmp.x; {y, y * abs(y) - y, 0, 0} */
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
tmp, A0_DEST_CHANNEL_Y, 0,
|
||||
swizzle(tmp, ZERO, X, ZERO, ZERO),
|
||||
swizzle(tmp, ZERO, Y, ZERO, ZERO),
|
||||
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0));
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_MUL,
|
||||
tmp, A0_DEST_CHANNEL_ALL, 0,
|
||||
swizzle(tmp, X,Y,Y,W),
|
||||
swizzle(tmp, X,Z,ONE,ONE), 0);
|
||||
|
||||
i915_emit_arith( p,
|
||||
A0_DP4,
|
||||
get_result_vector( p, inst ),
|
||||
get_result_flags( inst ), 0,
|
||||
swizzle(tmp, W, Z, Y, X ),
|
||||
i915_emit_const4fv( p, sin_constants ), 0);
|
||||
break;
|
||||
/* result = .2225 * tmp.y + tmp.x =.2225(y * abs(y) - y) + y= */
|
||||
i915_emit_arith(p,
|
||||
A0_MAD,
|
||||
get_result_vector(p, inst),
|
||||
get_result_flags(inst), 0,
|
||||
swizzle(consts1, W, W, W, W),
|
||||
swizzle(tmp, Y, Y, Y, Y),
|
||||
swizzle(tmp, X, X, X, X));
|
||||
|
||||
break;
|
||||
|
||||
case OPCODE_SLT:
|
||||
EMIT_2ARG_ARITH( A0_SLT );
|
||||
|
@@ -194,27 +194,43 @@ GLuint i915_emit_arith( struct i915_fragment_program *p,
|
||||
return dest;
|
||||
}
|
||||
|
||||
static GLuint get_free_rreg (struct i915_fragment_program *p,
|
||||
GLuint live_regs)
|
||||
{
|
||||
int bit = ffs(~live_regs);
|
||||
if (!bit) {
|
||||
i915_program_error(p, "Can't find free R reg");
|
||||
return UREG_BAD;
|
||||
}
|
||||
return UREG(REG_TYPE_R, bit - 1);
|
||||
}
|
||||
|
||||
GLuint i915_emit_texld( struct i915_fragment_program *p,
|
||||
GLuint live_regs,
|
||||
GLuint dest,
|
||||
GLuint destmask,
|
||||
GLuint sampler,
|
||||
GLuint coord,
|
||||
GLuint op )
|
||||
{
|
||||
if (coord != UREG(GET_UREG_TYPE(coord), GET_UREG_NR(coord))) {
|
||||
/* No real way to work around this in the general case - need to
|
||||
* allocate and declare a new temporary register (a utemp won't
|
||||
* do). Will fallback for now.
|
||||
*/
|
||||
i915_program_error(p, "Can't (yet) swizzle TEX arguments");
|
||||
return 0;
|
||||
}
|
||||
if (coord != UREG(GET_UREG_TYPE(coord), GET_UREG_NR(coord))) {
|
||||
/* With the help of the "needed registers" table created earlier, pick
|
||||
* a register we can MOV the swizzled TC to (since TEX doesn't support
|
||||
* swizzled sources) */
|
||||
GLuint swizCoord = get_free_rreg(p, live_regs);
|
||||
if (swizCoord == UREG_BAD)
|
||||
return 0;
|
||||
|
||||
/* Don't worry about saturate as we only support
|
||||
i915_emit_arith( p, A0_MOV, swizCoord, A0_DEST_CHANNEL_ALL, 0, coord, 0, 0 );
|
||||
coord = swizCoord;
|
||||
}
|
||||
|
||||
/* Don't worry about saturate as we only support texture formats
|
||||
* that are always in the 0..1 range.
|
||||
*/
|
||||
if (destmask != A0_DEST_CHANNEL_ALL) {
|
||||
GLuint tmp = i915_get_utemp(p);
|
||||
i915_emit_texld( p, tmp, A0_DEST_CHANNEL_ALL, sampler, coord, op );
|
||||
i915_emit_texld( p, 0, tmp, A0_DEST_CHANNEL_ALL, sampler, coord, op );
|
||||
i915_emit_arith( p, A0_MOV, dest, destmask, 0, tmp, 0, 0 );
|
||||
return dest;
|
||||
}
|
||||
|
@@ -110,6 +110,7 @@ extern void i915_release_utemps( struct i915_fragment_program *p );
|
||||
|
||||
|
||||
extern GLuint i915_emit_texld( struct i915_fragment_program *p,
|
||||
GLuint live_regs,
|
||||
GLuint dest,
|
||||
GLuint destmask,
|
||||
GLuint sampler,
|
||||
|
@@ -69,7 +69,7 @@ static GLuint get_source( struct i915_fragment_program *p,
|
||||
if (p->VB->TexCoordPtr[unit]->size == 4)
|
||||
op = T0_TEXLDP;
|
||||
|
||||
p->src_texture = i915_emit_texld( p, tmp, A0_DEST_CHANNEL_ALL,
|
||||
p->src_texture = i915_emit_texld( p, 0, tmp, A0_DEST_CHANNEL_ALL,
|
||||
sampler, texcoord, op );
|
||||
}
|
||||
|
||||
|
@@ -454,7 +454,12 @@ static void i915SetTexImages( i915ContextPtr i915,
|
||||
|
||||
case MESA_FORMAT_Z16:
|
||||
t->intel.texelBytes = 2;
|
||||
textureFormat = (MAPSURF_16BIT | MT_16BIT_L16);
|
||||
if (tObj->DepthMode == GL_ALPHA)
|
||||
textureFormat = (MAPSURF_16BIT | MT_16BIT_A16);
|
||||
else if (tObj->DepthMode == GL_INTENSITY)
|
||||
textureFormat = (MAPSURF_16BIT | MT_16BIT_I16);
|
||||
else
|
||||
textureFormat = (MAPSURF_16BIT | MT_16BIT_L16);
|
||||
break;
|
||||
|
||||
case MESA_FORMAT_RGBA_DXT1:
|
||||
@@ -737,6 +742,9 @@ static GLboolean enable_tex_common( GLcontext *ctx, GLuint unit )
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (tObj->Target == GL_TEXTURE_1D &&
|
||||
tObj->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB)
|
||||
return GL_FALSE;
|
||||
|
||||
/* Update state if this is a different texture object to last
|
||||
* time.
|
||||
|
@@ -117,6 +117,8 @@ const GLubyte *intelGetString( GLcontext *ctx, GLenum name )
|
||||
chipset = "Intel(R) 865G"; break;
|
||||
case PCI_CHIP_I915_G:
|
||||
chipset = "Intel(R) 915G"; break;
|
||||
case PCI_CHIP_E7221_G:
|
||||
chipset = "Intel (R) E7221G (i915)"; break;
|
||||
case PCI_CHIP_I915_GM:
|
||||
chipset = "Intel(R) 915GM"; break;
|
||||
case PCI_CHIP_I945_G:
|
||||
|
@@ -361,6 +361,8 @@ do { \
|
||||
#define SUBPIXEL_X 0.125
|
||||
#define SUBPIXEL_Y 0.125
|
||||
|
||||
#define ALIGN(value, alignment) ((value + alignment - 1) & ~(alignment - 1))
|
||||
|
||||
#define INTEL_FIREVERTICES(intel) \
|
||||
do { \
|
||||
if ((intel)->prim.flush) \
|
||||
@@ -451,6 +453,7 @@ extern int INTEL_DEBUG;
|
||||
#define PCI_CHIP_I855_GM 0x3582
|
||||
#define PCI_CHIP_I865_G 0x2572
|
||||
#define PCI_CHIP_I915_G 0x2582
|
||||
#define PCI_CHIP_E7221_G 0x258A
|
||||
#define PCI_CHIP_I915_GM 0x2592
|
||||
#define PCI_CHIP_I945_G 0x2772
|
||||
#define PCI_CHIP_I945_GM 0x27A2
|
||||
|
@@ -228,7 +228,7 @@ intelTryReadPixels( GLcontext *ctx,
|
||||
__DRIdrawablePrivate *dPriv = intel->driDrawable;
|
||||
int nbox = dPriv->numClipRects;
|
||||
int src_offset = intel->readRegion->offset;
|
||||
int src_pitch = intel->intelScreen->front.pitch;
|
||||
int src_pitch = intel->intelScreen->front.pitch / intel->intelScreen->cpp; /* in pixels */
|
||||
int dst_offset = intelAgpOffsetFromVirtual( intel, pixels);
|
||||
drm_clip_rect_t *box = dPriv->pClipRects;
|
||||
int i;
|
||||
@@ -308,7 +308,7 @@ static void do_draw_pix( GLcontext *ctx,
|
||||
int nbox = dPriv->numClipRects;
|
||||
int i;
|
||||
int src_offset = intelAgpOffsetFromVirtual( intel, pixels);
|
||||
int src_pitch = pitch;
|
||||
int src_pitch = pitch; /* in pixels */
|
||||
|
||||
assert(src_offset != ~0); /* should be caught earlier */
|
||||
|
||||
@@ -339,7 +339,7 @@ static void do_draw_pix( GLcontext *ctx,
|
||||
intelEmitCopyBlitLocked( intel,
|
||||
intel->intelScreen->cpp,
|
||||
src_pitch, src_offset,
|
||||
intel->intelScreen->front.pitch,
|
||||
intel->intelScreen->front.pitch / intel->intelScreen->cpp, /* in pixels */
|
||||
intel->drawRegion->offset,
|
||||
bx - x, by - y,
|
||||
bx, by,
|
||||
@@ -364,7 +364,7 @@ intelTryDrawPixels( GLcontext *ctx,
|
||||
GLint pitch = unpack->RowLength ? unpack->RowLength : width;
|
||||
GLuint dest;
|
||||
GLuint cpp = intel->intelScreen->cpp;
|
||||
GLint size = width * pitch * cpp;
|
||||
GLint size = height * pitch * cpp;
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_PIXEL)
|
||||
fprintf(stderr, "%s\n", __FUNCTION__);
|
||||
|
@@ -53,7 +53,7 @@ DRI_CONF_BEGIN
|
||||
DRI_CONF_SECTION_END
|
||||
DRI_CONF_SECTION_QUALITY
|
||||
DRI_CONF_FORCE_S3TC_ENABLE(false)
|
||||
DRI_CONF_ALLOW_LARGE_TEXTURES(1)
|
||||
DRI_CONF_ALLOW_LARGE_TEXTURES(2)
|
||||
DRI_CONF_SECTION_END
|
||||
DRI_CONF_END;
|
||||
const GLuint __driNConfigOptions = 4;
|
||||
@@ -511,6 +511,7 @@ static GLboolean intelCreateContext( const __GLcontextModes *mesaVis,
|
||||
sharedContextPrivate );
|
||||
|
||||
case PCI_CHIP_I915_G:
|
||||
case PCI_CHIP_E7221_G:
|
||||
case PCI_CHIP_I915_GM:
|
||||
case PCI_CHIP_I945_G:
|
||||
case PCI_CHIP_I945_GM:
|
||||
|
@@ -189,12 +189,12 @@ static void intelDrawBuffer(GLcontext *ctx, GLenum mode )
|
||||
if ( intel->sarea->pf_current_page == 1 )
|
||||
front ^= 1;
|
||||
|
||||
intelSetFrontClipRects( intel );
|
||||
|
||||
if (front) {
|
||||
intelSetFrontClipRects( intel );
|
||||
intel->drawRegion = &intel->intelScreen->front;
|
||||
intel->readRegion = &intel->intelScreen->front;
|
||||
} else {
|
||||
intelSetBackClipRects( intel );
|
||||
intel->drawRegion = &intel->intelScreen->back;
|
||||
intel->readRegion = &intel->intelScreen->back;
|
||||
}
|
||||
|
@@ -759,7 +759,7 @@ int intelUploadTexImages( intelContextPtr intel,
|
||||
GLuint face)
|
||||
{
|
||||
const int numLevels = t->base.lastLevel - t->base.firstLevel + 1;
|
||||
const struct gl_texture_image *firstImage = t->image[face][t->base.firstLevel].image;
|
||||
const struct gl_texture_image *firstImage = t->image[face][0].image;
|
||||
int pitch = firstImage->RowStride * firstImage->TexFormat->TexelBytes;
|
||||
|
||||
/* Can we texture out of the existing client data? */
|
||||
|
@@ -202,12 +202,19 @@ static void intel_wpos_triangle( intelContextPtr intel,
|
||||
{
|
||||
GLuint offset = intel->wpos_offset;
|
||||
GLuint size = intel->wpos_size;
|
||||
|
||||
__memcpy( ((char *)v0) + offset, v0, size );
|
||||
__memcpy( ((char *)v1) + offset, v1, size );
|
||||
__memcpy( ((char *)v2) + offset, v2, size );
|
||||
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
|
||||
GLfloat *v1_wpos = (GLfloat *)((char *)v1 + offset);
|
||||
GLfloat *v2_wpos = (GLfloat *)((char *)v2 + offset);
|
||||
|
||||
intel_draw_triangle( intel, v0, v1, v2 );
|
||||
__memcpy(v0_wpos, v0, size);
|
||||
__memcpy(v1_wpos, v1, size);
|
||||
__memcpy(v2_wpos, v2, size);
|
||||
|
||||
v0_wpos[1] = -v0_wpos[1] + intel->driDrawable->h;
|
||||
v1_wpos[1] = -v1_wpos[1] + intel->driDrawable->h;
|
||||
v2_wpos[1] = -v2_wpos[1] + intel->driDrawable->h;
|
||||
|
||||
intel_draw_triangle(intel, v0, v1, v2);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,9 +224,14 @@ static void intel_wpos_line( intelContextPtr intel,
|
||||
{
|
||||
GLuint offset = intel->wpos_offset;
|
||||
GLuint size = intel->wpos_size;
|
||||
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
|
||||
GLfloat *v1_wpos = (GLfloat *)((char *)v1 + offset);
|
||||
|
||||
__memcpy( ((char *)v0) + offset, v0, size );
|
||||
__memcpy( ((char *)v1) + offset, v1, size );
|
||||
__memcpy(v0_wpos, v0, size);
|
||||
__memcpy(v1_wpos, v1, size);
|
||||
|
||||
v0_wpos[1] = -v0_wpos[1] + intel->driDrawable->h;
|
||||
v1_wpos[1] = -v1_wpos[1] + intel->driDrawable->h;
|
||||
|
||||
intel_draw_line( intel, v0, v1 );
|
||||
}
|
||||
@@ -230,8 +242,10 @@ static void intel_wpos_point( intelContextPtr intel,
|
||||
{
|
||||
GLuint offset = intel->wpos_offset;
|
||||
GLuint size = intel->wpos_size;
|
||||
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
|
||||
|
||||
__memcpy( ((char *)v0) + offset, v0, size );
|
||||
__memcpy(v0_wpos, v0, size);
|
||||
v0_wpos[1] = -v0_wpos[1] + intel->driDrawable->h;
|
||||
|
||||
intel_draw_point( intel, v0 );
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ src_vector(struct i915_fragment_program *p,
|
||||
break;
|
||||
case FRAG_ATTRIB_FOGC:
|
||||
src = i915_emit_decl(p, REG_TYPE_T, T_FOG_W, D0_CHANNEL_W);
|
||||
src = swizzle(src, W, W, W, W);
|
||||
src = swizzle(src, W, ZERO, ZERO, ONE);
|
||||
break;
|
||||
case FRAG_ATTRIB_TEX0:
|
||||
case FRAG_ATTRIB_TEX1:
|
||||
|
@@ -365,6 +365,7 @@ intel_miptree_image_data(struct intel_context *intel,
|
||||
}
|
||||
}
|
||||
|
||||
extern GLuint intel_compressed_alignment(GLenum);
|
||||
/* Copy mipmap image between trees
|
||||
*/
|
||||
void
|
||||
@@ -382,8 +383,12 @@ intel_miptree_image_copy(struct intel_context *intel,
|
||||
const GLuint *src_depth_offset = intel_miptree_depth_offsets(src, level);
|
||||
GLuint i;
|
||||
|
||||
if (dst->compressed)
|
||||
height /= 4;
|
||||
if (dst->compressed) {
|
||||
GLuint alignment = intel_compressed_alignment(dst->internal_format);
|
||||
height = (height + 3) / 4;
|
||||
width = ((width + alignment - 1) & ~(alignment - 1));
|
||||
}
|
||||
|
||||
for (i = 0; i < depth; i++) {
|
||||
intel_region_copy(intel->intelScreen,
|
||||
dst->region, dst_offset + dst_depth_offset[i],
|
||||
|
@@ -56,7 +56,7 @@ PUBLIC const char __driConfigOptions[] =
|
||||
DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_0)
|
||||
DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY
|
||||
DRI_CONF_FORCE_S3TC_ENABLE(false)
|
||||
DRI_CONF_ALLOW_LARGE_TEXTURES(1)
|
||||
DRI_CONF_ALLOW_LARGE_TEXTURES(2)
|
||||
DRI_CONF_SECTION_END DRI_CONF_END;
|
||||
const GLuint __driNConfigOptions = 4;
|
||||
|
||||
|
@@ -70,6 +70,7 @@ DRIVER_SOURCES = \
|
||||
brw_wm_emit.c \
|
||||
brw_wm_fp.c \
|
||||
brw_wm_iz.c \
|
||||
brw_wm_glsl.c \
|
||||
brw_wm_pass0.c \
|
||||
brw_wm_pass1.c \
|
||||
brw_wm_pass2.c \
|
||||
|
@@ -143,13 +143,15 @@ static struct {
|
||||
{ CMD_CONST_BUFFER, "CONST_BUFFER", 1 },
|
||||
{ CMD_STATE_BASE_ADDRESS, "STATE_BASE_ADDRESS", 1 },
|
||||
{ CMD_STATE_INSN_POINTER, "STATE_INSN_POINTER", 1 },
|
||||
{ CMD_PIPELINE_SELECT, "PIPELINE_SELECT", 0, },
|
||||
{ CMD_PIPELINE_SELECT_965, "PIPELINE_SELECT", 0, },
|
||||
{ CMD_PIPELINE_SELECT_GM45, "PIPELINE_SELECT", 0,},
|
||||
{ CMD_PIPELINED_STATE_POINTERS, "PIPELINED_STATE_POINTERS", 1 },
|
||||
{ CMD_BINDING_TABLE_PTRS, "BINDING_TABLE_PTRS", 1 },
|
||||
{ CMD_VERTEX_BUFFER, "VERTEX_BUFFER", 1 },
|
||||
{ CMD_VERTEX_ELEMENT, "VERTEX_ELEMENT", 1 },
|
||||
{ CMD_INDEX_BUFFER, "INDEX_BUFFER", 1 },
|
||||
{ CMD_VF_STATISTICS, "VF_STATISTICS", 0 },
|
||||
{ CMD_VF_STATISTICS_965, "VF_STATISTICS", 0 },
|
||||
{ CMD_VF_STATISTICS_GM45, "VF_STATISTICS", 0 },
|
||||
{ CMD_DRAW_RECT, "DRAW_RECT", 1 },
|
||||
{ CMD_BLEND_CONSTANT_COLOR, "BLEND_CONSTANT_COLOR", 1 },
|
||||
{ CMD_CHROMA_KEY, "CHROMA_KEY", 1 },
|
||||
@@ -157,6 +159,7 @@ static struct {
|
||||
{ CMD_POLY_STIPPLE_OFFSET, "POLY_STIPPLE_OFFSET", 1 },
|
||||
{ CMD_POLY_STIPPLE_PATTERN, "POLY_STIPPLE_PATTERN", 1 },
|
||||
{ CMD_LINE_STIPPLE_PATTERN, "LINE_STIPPLE_PATTERN", 1 },
|
||||
{ CMD_AA_LINE_PARAMETERS, "AA_LINE_PARAMETERS", 1},
|
||||
{ CMD_GLOBAL_DEPTH_OFFSET_CLAMP, "GLOBAL_DEPTH_OFFSET_CLAMP", 1 },
|
||||
{ CMD_PIPE_CONTROL, "PIPE_CONTROL", 1 },
|
||||
{ CMD_MI_FLUSH, "MI_FLUSH", 0 },
|
||||
|
@@ -76,8 +76,8 @@ static void upload_cc_unit( struct brw_context *brw )
|
||||
cc.cc1.stencil_write_mask = brw->attribs.Stencil->WriteMask[0];
|
||||
cc.cc1.stencil_test_mask = brw->attribs.Stencil->ValueMask[0];
|
||||
|
||||
if (brw->attribs.Stencil->TestTwoSide) {
|
||||
cc.cc0.bf_stencil_enable = brw->attribs.Stencil->TestTwoSide;
|
||||
if (brw->attribs.Stencil->_TestTwoSide) {
|
||||
cc.cc0.bf_stencil_enable = brw->attribs.Stencil->_TestTwoSide;
|
||||
cc.cc0.bf_stencil_func = intel_translate_compare_func(brw->attribs.Stencil->Function[1]);
|
||||
cc.cc0.bf_stencil_fail_op = intel_translate_stencil_op(brw->attribs.Stencil->FailFunc[1]);
|
||||
cc.cc0.bf_stencil_pass_depth_fail_op = intel_translate_stencil_op(brw->attribs.Stencil->ZFailFunc[1]);
|
||||
@@ -90,7 +90,8 @@ static void upload_cc_unit( struct brw_context *brw )
|
||||
/* Not really sure about this:
|
||||
*/
|
||||
if (brw->attribs.Stencil->WriteMask[0] ||
|
||||
(brw->attribs.Stencil->TestTwoSide && brw->attribs.Stencil->WriteMask[1]))
|
||||
(brw->attribs.Stencil->_TestTwoSide &&
|
||||
brw->attribs.Stencil->WriteMask[1]))
|
||||
cc.cc0.stencil_write_enable = 1;
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ static void compile_clip_prog( struct brw_context *brw,
|
||||
|
||||
/* Begin the compilation:
|
||||
*/
|
||||
brw_init_compile(&c.func);
|
||||
brw_init_compile(brw, &c.func);
|
||||
|
||||
c.func.single_program_flow = 1;
|
||||
|
||||
|
@@ -42,7 +42,7 @@
|
||||
* up polygon offset and flatshading at this point:
|
||||
*/
|
||||
struct brw_clip_prog_key {
|
||||
GLuint attrs:16;
|
||||
GLuint attrs:32;
|
||||
GLuint primitive:4;
|
||||
GLuint nr_userclip:3;
|
||||
GLuint do_flat_shading:1;
|
||||
@@ -51,7 +51,7 @@ struct brw_clip_prog_key {
|
||||
GLuint fill_ccw:2; /* includes cull information */
|
||||
GLuint offset_cw:1;
|
||||
GLuint offset_ccw:1;
|
||||
GLuint pad0:1;
|
||||
GLuint pad0:17;
|
||||
|
||||
GLuint copy_bfc_cw:1;
|
||||
GLuint copy_bfc_ccw:1;
|
||||
|
@@ -146,6 +146,15 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
|
||||
brw_clip_init_planes(c);
|
||||
brw_clip_init_clipmask(c);
|
||||
|
||||
/* -ve rhw workaround */
|
||||
if (!(BRW_IS_GM45(p->brw) || BRW_IS_G4X(p->brw))) {
|
||||
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
|
||||
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
|
||||
brw_imm_ud(1<<20));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(0x3f));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
}
|
||||
|
||||
plane_loop = brw_DO(p, BRW_EXECUTE_1);
|
||||
{
|
||||
/* if (planemask & 1)
|
||||
|
@@ -43,7 +43,8 @@ static void upload_clip_unit( struct brw_context *brw )
|
||||
memset(&clip, 0, sizeof(clip));
|
||||
|
||||
/* CACHE_NEW_CLIP_PROG */
|
||||
clip.thread0.grf_reg_count = ((brw->clip.prog_data->total_grf-1) & ~15) / 16;
|
||||
clip.thread0.grf_reg_count =
|
||||
ALIGN(brw->clip.prog_data->total_grf, 16) / 16 - 1;
|
||||
clip.thread0.kernel_start_pointer = brw->clip.prog_gs_offset >> 6;
|
||||
clip.thread3.urb_entry_read_length = brw->clip.prog_data->urb_read_length;
|
||||
clip.thread3.const_urb_entry_read_length = brw->clip.prog_data->curb_read_length;
|
||||
@@ -55,7 +56,7 @@ static void upload_clip_unit( struct brw_context *brw )
|
||||
/* BRW_NEW_URB_FENCE */
|
||||
clip.thread4.nr_urb_entries = brw->urb.nr_clip_entries;
|
||||
clip.thread4.urb_entry_allocation_size = brw->urb.vsize - 1;
|
||||
clip.thread4.max_threads = 0; /* Hmm, maybe the max is 1 or 2 threads */
|
||||
clip.thread4.max_threads = 1; /* 2 threads */
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_STATS)
|
||||
clip.thread4.stats_enable = 1;
|
||||
@@ -72,6 +73,10 @@ static void upload_clip_unit( struct brw_context *brw )
|
||||
clip.clip5.viewport_xy_clip_enable = 1;
|
||||
clip.clip5.vertex_position_space = BRW_CLIP_NDCSPACE;
|
||||
clip.clip5.api_mode = BRW_CLIP_API_OGL;
|
||||
|
||||
if (BRW_IS_GM45(brw) || BRW_IS_G4X(brw))
|
||||
clip.clip5.negative_w_clip_test = 1;
|
||||
|
||||
clip.clip6.clipper_viewport_state_ptr = 0;
|
||||
clip.viewport_xmin = -1;
|
||||
clip.viewport_xmax = 1;
|
||||
|
@@ -42,6 +42,20 @@
|
||||
#include "brw_util.h"
|
||||
#include "brw_clip.h"
|
||||
|
||||
static struct brw_reg get_tmp( struct brw_clip_compile *c )
|
||||
{
|
||||
struct brw_reg tmp = brw_vec4_grf(c->last_tmp, 0);
|
||||
|
||||
if (++c->last_tmp > c->prog_data.total_grf)
|
||||
c->prog_data.total_grf = c->last_tmp;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static void release_tmps( struct brw_clip_compile *c )
|
||||
{
|
||||
c->last_tmp = c->first_tmp;
|
||||
}
|
||||
|
||||
|
||||
void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
|
||||
@@ -78,7 +92,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
|
||||
}
|
||||
|
||||
c->reg.t = brw_vec1_grf(i, 0);
|
||||
c->reg.loopcount = retype(brw_vec1_grf(i, 1), BRW_REGISTER_TYPE_UD);
|
||||
c->reg.loopcount = retype(brw_vec1_grf(i, 1), BRW_REGISTER_TYPE_D);
|
||||
c->reg.nr_verts = retype(brw_vec1_grf(i, 2), BRW_REGISTER_TYPE_UD);
|
||||
c->reg.planemask = retype(brw_vec1_grf(i, 3), BRW_REGISTER_TYPE_UD);
|
||||
c->reg.plane_equation = brw_vec4_grf(i, 4);
|
||||
@@ -435,15 +449,104 @@ static void maybe_do_clip_tri( struct brw_clip_compile *c )
|
||||
brw_ENDIF(p, do_clip);
|
||||
}
|
||||
|
||||
static void brw_clip_test( struct brw_clip_compile *c )
|
||||
{
|
||||
struct brw_reg t = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
|
||||
struct brw_reg t1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
|
||||
struct brw_reg t2 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
|
||||
struct brw_reg t3 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
|
||||
|
||||
struct brw_reg v0 = get_tmp(c);
|
||||
struct brw_reg v1 = get_tmp(c);
|
||||
struct brw_reg v2 = get_tmp(c);
|
||||
|
||||
struct brw_indirect vt0 = brw_indirect(0, 0);
|
||||
struct brw_indirect vt1 = brw_indirect(1, 0);
|
||||
struct brw_indirect vt2 = brw_indirect(2, 0);
|
||||
|
||||
struct brw_compile *p = &c->func;
|
||||
|
||||
brw_MOV(p, get_addr_reg(vt0), brw_address(c->reg.vertex[0]));
|
||||
brw_MOV(p, get_addr_reg(vt1), brw_address(c->reg.vertex[1]));
|
||||
brw_MOV(p, get_addr_reg(vt2), brw_address(c->reg.vertex[2]));
|
||||
brw_MOV(p, v0, deref_4f(vt0, c->offset[VERT_RESULT_HPOS]));
|
||||
brw_MOV(p, v1, deref_4f(vt1, c->offset[VERT_RESULT_HPOS]));
|
||||
brw_MOV(p, v2, deref_4f(vt2, c->offset[VERT_RESULT_HPOS]));
|
||||
|
||||
/* test nearz, xmin, ymin plane */
|
||||
brw_CMP(p, t1, BRW_CONDITIONAL_LE, negate(v0), get_element(v0, 3));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, t2, BRW_CONDITIONAL_LE, negate(v1), get_element(v1, 3));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, t3, BRW_CONDITIONAL_LE, negate(v2), get_element(v2, 3));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_XOR(p, t, t1, t2);
|
||||
brw_XOR(p, t1, t2, t3);
|
||||
brw_OR(p, t, t, t1);
|
||||
|
||||
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
|
||||
get_element(t, 0), brw_imm_ud(0));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<5)));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
|
||||
get_element(t, 1), brw_imm_ud(0));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<3)));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
|
||||
get_element(t, 2), brw_imm_ud(0));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<1)));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
|
||||
/* test farz, xmax, ymax plane */
|
||||
brw_CMP(p, t1, BRW_CONDITIONAL_L, v0, get_element(v0, 3));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, t2, BRW_CONDITIONAL_L, v1, get_element(v1, 3));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, t3, BRW_CONDITIONAL_L, v2, get_element(v2, 3));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
|
||||
brw_XOR(p, t, t1, t2);
|
||||
brw_XOR(p, t1, t2, t3);
|
||||
brw_OR(p, t, t, t1);
|
||||
|
||||
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
|
||||
get_element(t, 0), brw_imm_ud(0));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<4)));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
|
||||
get_element(t, 1), brw_imm_ud(0));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<2)));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
|
||||
get_element(t, 2), brw_imm_ud(0));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<0)));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
|
||||
release_tmps(c);
|
||||
}
|
||||
|
||||
|
||||
void brw_emit_tri_clip( struct brw_clip_compile *c )
|
||||
{
|
||||
struct brw_instruction *neg_rhw;
|
||||
struct brw_compile *p = &c->func;
|
||||
brw_clip_tri_alloc_regs(c, 3 + c->key.nr_userclip + 6);
|
||||
brw_clip_tri_init_vertices(c);
|
||||
brw_clip_init_clipmask(c);
|
||||
|
||||
/* if -ve rhw workaround bit is set,
|
||||
do cliptest */
|
||||
if (!(BRW_IS_GM45(p->brw) || BRW_IS_G4X(p->brw))) {
|
||||
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
|
||||
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
|
||||
brw_imm_ud(1<<20));
|
||||
neg_rhw = brw_IF(p, BRW_EXECUTE_1);
|
||||
{
|
||||
brw_clip_test(c);
|
||||
}
|
||||
brw_ENDIF(p, neg_rhw);
|
||||
}
|
||||
|
||||
/* Can't push into do_clip_tri because with polygon (or quad)
|
||||
* flatshading, need to apply the flatshade here because we don't
|
||||
* respect the PV when converting to trifan for emit:
|
||||
@@ -462,6 +565,3 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
|
||||
*/
|
||||
brw_clip_kill_thread(c);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -220,8 +220,8 @@ static void apply_one_offset( struct brw_clip_compile *c,
|
||||
struct brw_indirect vert )
|
||||
{
|
||||
struct brw_compile *p = &c->func;
|
||||
struct brw_reg pos = deref_4f(vert, c->offset[VERT_RESULT_HPOS]);
|
||||
struct brw_reg z = get_element(pos, 2);
|
||||
struct brw_reg z = deref_1f(vert, c->header_position_offset +
|
||||
2 * type_sz(BRW_REGISTER_TYPE_F));
|
||||
|
||||
brw_ADD(p, z, z, vec1(c->reg.offset));
|
||||
}
|
||||
|
@@ -262,7 +262,7 @@ void brw_clip_kill_thread(struct brw_clip_compile *c)
|
||||
c->reg.R0,
|
||||
0, /* allocate */
|
||||
0, /* used */
|
||||
0, /* msg len */
|
||||
1, /* msg len */
|
||||
0, /* response len */
|
||||
1, /* eot */
|
||||
1, /* writes complete */
|
||||
@@ -272,6 +272,7 @@ void brw_clip_kill_thread(struct brw_clip_compile *c)
|
||||
|
||||
|
||||
|
||||
|
||||
struct brw_reg brw_clip_plane0_address( struct brw_clip_compile *c )
|
||||
{
|
||||
return brw_address(c->reg.fixed_planes);
|
||||
@@ -327,8 +328,7 @@ void brw_clip_init_clipmask( struct brw_clip_compile *c )
|
||||
|
||||
/* Shift so that lowest outcode bit is rightmost:
|
||||
*/
|
||||
brw_MOV(p, c->reg.planemask, incoming);
|
||||
brw_SHR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(26));
|
||||
brw_SHR(p, c->reg.planemask, incoming, brw_imm_ud(26));
|
||||
|
||||
if (c->key.nr_userclip) {
|
||||
struct brw_reg tmp = retype(vec1(get_tmp(c)), BRW_REGISTER_TYPE_UD);
|
||||
@@ -342,13 +342,5 @@ void brw_clip_init_clipmask( struct brw_clip_compile *c )
|
||||
|
||||
release_tmp(c, tmp);
|
||||
}
|
||||
|
||||
/* Test for -ve rhw workaround
|
||||
*/
|
||||
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
|
||||
brw_AND(p, vec1(brw_null_reg()), incoming, brw_imm_ud(1<<20));
|
||||
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(0x3f));
|
||||
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -44,6 +44,8 @@
|
||||
#include "api_noop.h"
|
||||
#include "vtxfmt.h"
|
||||
|
||||
#include "shader/shader_api.h"
|
||||
|
||||
/***************************************
|
||||
* Mesa's Driver Functions
|
||||
***************************************/
|
||||
@@ -60,12 +62,21 @@ static const struct dri_extension brw_extensions[] =
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
static void brwUseProgram(GLcontext *ctx, GLuint program)
|
||||
{
|
||||
_mesa_use_program(ctx, program);
|
||||
}
|
||||
|
||||
static void brwInitProgFuncs( struct dd_function_table *functions )
|
||||
{
|
||||
functions->UseProgram = brwUseProgram;
|
||||
}
|
||||
static void brwInitDriverFunctions( struct dd_function_table *functions )
|
||||
{
|
||||
intelInitDriverFunctions( functions );
|
||||
brwInitTextureFuncs( functions );
|
||||
brwInitFragProgFuncs( functions );
|
||||
brwInitProgFuncs( functions );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -305,7 +305,7 @@ static void upload_constant_buffer(struct brw_context *brw)
|
||||
|
||||
if (!brw_pool_alloc(pool,
|
||||
bufsz,
|
||||
6,
|
||||
1 << 6,
|
||||
&brw->curbe.gs_offset)) {
|
||||
_mesa_printf("out of GS memory for curbe\n");
|
||||
assert(0);
|
||||
|
@@ -240,6 +240,8 @@
|
||||
#define BRW_FRONTWINDING_CW 0
|
||||
#define BRW_FRONTWINDING_CCW 1
|
||||
|
||||
#define BRW_SPRITE_POINT_ENABLE 16
|
||||
|
||||
#define BRW_INDEX_BYTE 0
|
||||
#define BRW_INDEX_WORD 1
|
||||
#define BRW_INDEX_DWORD 2
|
||||
@@ -815,14 +817,16 @@
|
||||
|
||||
#define CMD_STATE_BASE_ADDRESS 0x6101
|
||||
#define CMD_STATE_INSN_POINTER 0x6102
|
||||
#define CMD_PIPELINE_SELECT 0x6104
|
||||
#define CMD_PIPELINE_SELECT_965 0x6104
|
||||
#define CMD_PIPELINE_SELECT_GM45 0x6904
|
||||
|
||||
#define CMD_PIPELINED_STATE_POINTERS 0x7800
|
||||
#define CMD_BINDING_TABLE_PTRS 0x7801
|
||||
#define CMD_VERTEX_BUFFER 0x7808
|
||||
#define CMD_VERTEX_ELEMENT 0x7809
|
||||
#define CMD_INDEX_BUFFER 0x780a
|
||||
#define CMD_VF_STATISTICS 0x780b
|
||||
#define CMD_VF_STATISTICS_965 0x780b
|
||||
#define CMD_VF_STATISTICS_GM45 0x680b
|
||||
|
||||
#define CMD_DRAW_RECT 0x7900
|
||||
#define CMD_BLEND_CONSTANT_COLOR 0x7901
|
||||
@@ -832,6 +836,7 @@
|
||||
#define CMD_POLY_STIPPLE_PATTERN 0x7907
|
||||
#define CMD_LINE_STIPPLE_PATTERN 0x7908
|
||||
#define CMD_GLOBAL_DEPTH_OFFSET_CLAMP 0x7909
|
||||
#define CMD_AA_LINE_PARAMETERS 0x790a
|
||||
|
||||
#define CMD_PIPE_CONTROL 0x7a00
|
||||
|
||||
@@ -845,6 +850,12 @@
|
||||
#define R02_PRIM_END 0x1
|
||||
#define R02_PRIM_START 0x2
|
||||
|
||||
|
||||
#define BRW_IS_GM45(brw) ((brw)->intel.intelScreen->deviceID == PCI_CHIP_GM45_GM)
|
||||
#define BRW_IS_G4X(brw) (((brw)->intel.intelScreen->deviceID == PCI_CHIP_IGD_E_G) || \
|
||||
((brw)->intel.intelScreen->deviceID == PCI_CHIP_G45_G) || \
|
||||
((brw)->intel.intelScreen->deviceID == PCI_CHIP_Q45_G))
|
||||
#define CMD_PIPELINE_SELECT(brw) ((BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? CMD_PIPELINE_SELECT_GM45 : CMD_PIPELINE_SELECT_965)
|
||||
#define CMD_VF_STATISTICS(brw) ((BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? CMD_VF_STATISTICS_GM45 : CMD_VF_STATISTICS_965)
|
||||
#define URB_SIZES(brw) ((BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? 384 : 256) /* 512 bit unit */
|
||||
|
||||
#endif
|
||||
|
@@ -291,7 +291,7 @@ static void get_space( struct brw_context *brw,
|
||||
struct gl_buffer_object **vbo_return,
|
||||
GLuint *offset_return )
|
||||
{
|
||||
size = (size + 63) & ~63;
|
||||
size = ALIGN(size, 64);
|
||||
|
||||
if (brw->vb.upload.offset + size > BRW_UPLOAD_INIT_SIZE)
|
||||
wrap_buffers(brw, size);
|
||||
@@ -593,6 +593,31 @@ void brw_upload_indices( struct brw_context *brw,
|
||||
ib_size,
|
||||
index_buffer->ptr,
|
||||
bufferobj);
|
||||
} else {
|
||||
/* If the index buffer isn't aligned to its element size, we have to
|
||||
* rebase it into a temporary.
|
||||
*/
|
||||
if ((get_size(index_buffer->type) - 1) & offset) {
|
||||
struct gl_buffer_object *vbo;
|
||||
GLuint voffset;
|
||||
GLubyte *map = ctx->Driver.MapBuffer(ctx,
|
||||
GL_ELEMENT_ARRAY_BUFFER_ARB,
|
||||
GL_DYNAMIC_DRAW_ARB,
|
||||
bufferobj);
|
||||
map += offset;
|
||||
get_space(brw, ib_size, &vbo, &voffset);
|
||||
|
||||
ctx->Driver.BufferSubData(ctx,
|
||||
GL_ELEMENT_ARRAY_BUFFER_ARB,
|
||||
voffset,
|
||||
ib_size,
|
||||
map,
|
||||
vbo);
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, bufferobj);
|
||||
|
||||
bufferobj = vbo;
|
||||
offset = voffset;
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit the indexbuffer packet:
|
||||
|
@@ -101,8 +101,9 @@ void brw_pop_insn_state( struct brw_compile *p )
|
||||
|
||||
/***********************************************************************
|
||||
*/
|
||||
void brw_init_compile( struct brw_compile *p )
|
||||
void brw_init_compile( struct brw_context *brw, struct brw_compile *p )
|
||||
{
|
||||
p->brw = brw;
|
||||
p->nr_insn = 0;
|
||||
p->current = p->stack;
|
||||
memset(p->current, 0, sizeof(p->current[0]));
|
||||
|
@@ -105,6 +105,7 @@ struct brw_compile {
|
||||
|
||||
GLuint flag_value;
|
||||
GLboolean single_program_flow;
|
||||
struct brw_context *brw;
|
||||
};
|
||||
|
||||
|
||||
@@ -334,14 +335,14 @@ static __inline struct brw_reg brw_imm_ud( GLuint ud )
|
||||
static __inline struct brw_reg brw_imm_uw( GLushort uw )
|
||||
{
|
||||
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_UW);
|
||||
imm.dw1.ud = uw;
|
||||
imm.dw1.ud = uw | (uw << 16);
|
||||
return imm;
|
||||
}
|
||||
|
||||
static __inline struct brw_reg brw_imm_w( GLshort w )
|
||||
{
|
||||
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_W);
|
||||
imm.dw1.d = w;
|
||||
imm.dw1.d = w | (w << 16);
|
||||
return imm;
|
||||
}
|
||||
|
||||
@@ -648,6 +649,16 @@ static __inline struct brw_reg deref_1uw(struct brw_indirect ptr, GLint offset)
|
||||
return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_UW);
|
||||
}
|
||||
|
||||
static __inline struct brw_reg deref_1d(struct brw_indirect ptr, GLint offset)
|
||||
{
|
||||
return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_D);
|
||||
}
|
||||
|
||||
static __inline struct brw_reg deref_1ud(struct brw_indirect ptr, GLint offset)
|
||||
{
|
||||
return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_UD);
|
||||
}
|
||||
|
||||
static __inline struct brw_reg get_addr_reg(struct brw_indirect ptr)
|
||||
{
|
||||
return brw_address_reg(ptr.addr_subnr);
|
||||
@@ -668,7 +679,10 @@ static __inline struct brw_indirect brw_indirect( GLuint addr_subnr, GLint offse
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
static __inline struct brw_instruction *current_insn( struct brw_compile *p)
|
||||
{
|
||||
return &p->store[p->nr_insn];
|
||||
}
|
||||
|
||||
void brw_pop_insn_state( struct brw_compile *p );
|
||||
void brw_push_insn_state( struct brw_compile *p );
|
||||
@@ -680,7 +694,7 @@ void brw_set_predicate_control_flag_value( struct brw_compile *p, GLuint value )
|
||||
void brw_set_predicate_control( struct brw_compile *p, GLuint pc );
|
||||
void brw_set_conditionalmod( struct brw_compile *p, GLuint conditional );
|
||||
|
||||
void brw_init_compile( struct brw_compile *p );
|
||||
void brw_init_compile( struct brw_context *, struct brw_compile *p );
|
||||
const GLuint *brw_get_program( struct brw_compile *p, GLuint *sz );
|
||||
|
||||
|
||||
@@ -808,9 +822,11 @@ void brw_ENDIF(struct brw_compile *p,
|
||||
struct brw_instruction *brw_DO(struct brw_compile *p,
|
||||
GLuint execute_size);
|
||||
|
||||
void brw_WHILE(struct brw_compile *p,
|
||||
struct brw_instruction *brw_WHILE(struct brw_compile *p,
|
||||
struct brw_instruction *patch_insn);
|
||||
|
||||
struct brw_instruction *brw_BREAK(struct brw_compile *p);
|
||||
struct brw_instruction *brw_CONT(struct brw_compile *p);
|
||||
/* Forward jumps:
|
||||
*/
|
||||
void brw_land_fwd_jump(struct brw_compile *p,
|
||||
@@ -860,5 +876,6 @@ void brw_math_invert( struct brw_compile *p,
|
||||
struct brw_reg dst,
|
||||
struct brw_reg src);
|
||||
|
||||
|
||||
void brw_set_src1( struct brw_instruction *insn,
|
||||
struct brw_reg reg );
|
||||
#endif
|
||||
|
@@ -164,7 +164,7 @@ static void brw_set_src0( struct brw_instruction *insn,
|
||||
}
|
||||
|
||||
|
||||
static void brw_set_src1( struct brw_instruction *insn,
|
||||
void brw_set_src1( struct brw_instruction *insn,
|
||||
struct brw_reg reg )
|
||||
{
|
||||
assert(reg.file != BRW_MESSAGE_REGISTER_FILE);
|
||||
@@ -186,7 +186,7 @@ static void brw_set_src1( struct brw_instruction *insn,
|
||||
* in the future:
|
||||
*/
|
||||
assert (reg.address_mode == BRW_ADDRESS_DIRECT);
|
||||
assert (reg.file == BRW_GENERAL_REGISTER_FILE);
|
||||
//assert (reg.file == BRW_GENERAL_REGISTER_FILE);
|
||||
|
||||
if (insn->header.access_mode == BRW_ALIGN_1) {
|
||||
insn->bits3.da1.src1_subreg_nr = reg.subnr;
|
||||
@@ -318,7 +318,8 @@ static void brw_set_dp_read_message( struct brw_instruction *insn,
|
||||
insn->bits3.dp_read.end_of_thread = end_of_thread;
|
||||
}
|
||||
|
||||
static void brw_set_sampler_message( struct brw_instruction *insn,
|
||||
static void brw_set_sampler_message(struct brw_context *brw,
|
||||
struct brw_instruction *insn,
|
||||
GLuint binding_table_index,
|
||||
GLuint sampler,
|
||||
GLuint msg_type,
|
||||
@@ -328,14 +329,24 @@ static void brw_set_sampler_message( struct brw_instruction *insn,
|
||||
{
|
||||
brw_set_src1(insn, brw_imm_d(0));
|
||||
|
||||
insn->bits3.sampler.binding_table_index = binding_table_index;
|
||||
insn->bits3.sampler.sampler = sampler;
|
||||
insn->bits3.sampler.msg_type = msg_type;
|
||||
insn->bits3.sampler.return_format = BRW_SAMPLER_RETURN_FORMAT_FLOAT32;
|
||||
insn->bits3.sampler.response_length = response_length;
|
||||
insn->bits3.sampler.msg_length = msg_length;
|
||||
insn->bits3.sampler.end_of_thread = eot;
|
||||
insn->bits3.sampler.msg_target = BRW_MESSAGE_TARGET_SAMPLER;
|
||||
if (BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) {
|
||||
insn->bits3.sampler_gm45_g4x.binding_table_index = binding_table_index;
|
||||
insn->bits3.sampler_gm45_g4x.sampler = sampler;
|
||||
insn->bits3.sampler_gm45_g4x.msg_type = msg_type;
|
||||
insn->bits3.sampler_gm45_g4x.response_length = response_length;
|
||||
insn->bits3.sampler_gm45_g4x.msg_length = msg_length;
|
||||
insn->bits3.sampler_gm45_g4x.end_of_thread = eot;
|
||||
insn->bits3.sampler_gm45_g4x.msg_target = BRW_MESSAGE_TARGET_SAMPLER;
|
||||
} else {
|
||||
insn->bits3.sampler.binding_table_index = binding_table_index;
|
||||
insn->bits3.sampler.sampler = sampler;
|
||||
insn->bits3.sampler.msg_type = msg_type;
|
||||
insn->bits3.sampler.return_format = BRW_SAMPLER_RETURN_FORMAT_FLOAT32;
|
||||
insn->bits3.sampler.response_length = response_length;
|
||||
insn->bits3.sampler.msg_length = msg_length;
|
||||
insn->bits3.sampler.end_of_thread = eot;
|
||||
insn->bits3.sampler.msg_target = BRW_MESSAGE_TARGET_SAMPLER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -597,6 +608,34 @@ void brw_ENDIF(struct brw_compile *p,
|
||||
}
|
||||
}
|
||||
|
||||
struct brw_instruction *brw_BREAK(struct brw_compile *p)
|
||||
{
|
||||
struct brw_instruction *insn;
|
||||
insn = next_insn(p, BRW_OPCODE_BREAK);
|
||||
brw_set_dest(insn, brw_ip_reg());
|
||||
brw_set_src0(insn, brw_ip_reg());
|
||||
brw_set_src1(insn, brw_imm_d(0x0));
|
||||
insn->header.compression_control = BRW_COMPRESSION_NONE;
|
||||
insn->header.execution_size = BRW_EXECUTE_8;
|
||||
insn->header.mask_control = BRW_MASK_DISABLE;
|
||||
insn->bits3.if_else.pad0 = 0;
|
||||
return insn;
|
||||
}
|
||||
|
||||
struct brw_instruction *brw_CONT(struct brw_compile *p)
|
||||
{
|
||||
struct brw_instruction *insn;
|
||||
insn = next_insn(p, BRW_OPCODE_CONTINUE);
|
||||
brw_set_dest(insn, brw_ip_reg());
|
||||
brw_set_src0(insn, brw_ip_reg());
|
||||
brw_set_src1(insn, brw_imm_d(0x0));
|
||||
insn->header.compression_control = BRW_COMPRESSION_NONE;
|
||||
insn->header.execution_size = BRW_EXECUTE_8;
|
||||
insn->header.mask_control = BRW_MASK_DISABLE;
|
||||
insn->bits3.if_else.pad0 = 0;
|
||||
return insn;
|
||||
}
|
||||
|
||||
/* DO/WHILE loop:
|
||||
*/
|
||||
struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size)
|
||||
@@ -608,13 +647,15 @@ struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size)
|
||||
|
||||
/* Override the defaults for this instruction:
|
||||
*/
|
||||
brw_set_dest(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD));
|
||||
brw_set_src0(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD));
|
||||
brw_set_src1(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD));
|
||||
brw_set_dest(insn, brw_null_reg());
|
||||
brw_set_src0(insn, brw_null_reg());
|
||||
brw_set_src1(insn, brw_null_reg());
|
||||
|
||||
insn->header.compression_control = BRW_COMPRESSION_NONE;
|
||||
insn->header.execution_size = execute_size;
|
||||
insn->header.predicate_control = BRW_PREDICATE_NONE;
|
||||
/* insn->header.mask_control = BRW_MASK_ENABLE; */
|
||||
insn->header.mask_control = BRW_MASK_DISABLE;
|
||||
|
||||
return insn;
|
||||
}
|
||||
@@ -622,7 +663,7 @@ struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size)
|
||||
|
||||
|
||||
|
||||
void brw_WHILE(struct brw_compile *p,
|
||||
struct brw_instruction *brw_WHILE(struct brw_compile *p,
|
||||
struct brw_instruction *do_insn)
|
||||
{
|
||||
struct brw_instruction *insn;
|
||||
@@ -646,14 +687,16 @@ void brw_WHILE(struct brw_compile *p,
|
||||
insn->header.execution_size = do_insn->header.execution_size;
|
||||
|
||||
assert(do_insn->header.opcode == BRW_OPCODE_DO);
|
||||
insn->bits3.if_else.jump_count = do_insn - insn;
|
||||
insn->bits3.if_else.jump_count = do_insn - insn + 1;
|
||||
insn->bits3.if_else.pop_count = 0;
|
||||
insn->bits3.if_else.pad0 = 0;
|
||||
}
|
||||
|
||||
/* insn->header.mask_control = BRW_MASK_ENABLE; */
|
||||
|
||||
insn->header.mask_control = BRW_MASK_DISABLE;
|
||||
p->current->header.predicate_control = BRW_PREDICATE_NONE;
|
||||
return insn;
|
||||
}
|
||||
|
||||
|
||||
@@ -985,7 +1028,7 @@ void brw_SAMPLE(struct brw_compile *p,
|
||||
|
||||
brw_set_dest(insn, dest);
|
||||
brw_set_src0(insn, src0);
|
||||
brw_set_sampler_message(insn,
|
||||
brw_set_sampler_message(p->brw, insn,
|
||||
binding_table_index,
|
||||
sampler,
|
||||
msg_type,
|
||||
|
@@ -65,7 +65,7 @@ static void compile_gs_prog( struct brw_context *brw,
|
||||
|
||||
/* Begin the compilation:
|
||||
*/
|
||||
brw_init_compile(&c.func);
|
||||
brw_init_compile(brw, &c.func);
|
||||
|
||||
c.func.single_program_flow = 1;
|
||||
|
||||
|
@@ -40,11 +40,11 @@
|
||||
#define MAX_GS_VERTS (4)
|
||||
|
||||
struct brw_gs_prog_key {
|
||||
GLuint attrs:32;
|
||||
GLuint primitive:4;
|
||||
GLuint attrs:16;
|
||||
GLuint hint_gs_always:1;
|
||||
GLuint need_gs_prog:1;
|
||||
GLuint pad:10;
|
||||
GLuint pad:26;
|
||||
};
|
||||
|
||||
struct brw_gs_compile {
|
||||
|
@@ -46,7 +46,8 @@ static void upload_gs_unit( struct brw_context *brw )
|
||||
|
||||
/* CACHE_NEW_GS_PROG */
|
||||
if (brw->gs.prog_active) {
|
||||
gs.thread0.grf_reg_count = ((brw->gs.prog_data->total_grf-1) & ~15) / 16;
|
||||
gs.thread0.grf_reg_count =
|
||||
ALIGN(brw->gs.prog_data->total_grf, 16) / 16 - 1;
|
||||
gs.thread0.kernel_start_pointer = brw->gs.prog_gs_offset >> 6;
|
||||
gs.thread3.urb_entry_read_length = brw->gs.prog_data->urb_read_length;
|
||||
}
|
||||
|
@@ -195,7 +195,7 @@ static void init_metaops_state( struct brw_context *brw )
|
||||
vp_prog, strlen(vp_prog),
|
||||
brw->metaops.vp);
|
||||
|
||||
brw->metaops.attribs.VertexProgram->Current = brw->metaops.vp;
|
||||
brw->metaops.attribs.VertexProgram->_Current = brw->metaops.vp;
|
||||
brw->metaops.attribs.VertexProgram->_Enabled = GL_TRUE;
|
||||
|
||||
brw->metaops.attribs.FragmentProgram->_Current = brw->metaops.fp;
|
||||
|
@@ -249,7 +249,7 @@ static void upload_depthbuffer(struct brw_context *brw)
|
||||
memset(&bd, 0, sizeof(bd));
|
||||
|
||||
bd.header.bits.opcode = CMD_DEPTH_BUFFER;
|
||||
bd.header.bits.length = sizeof(bd)/4-2;
|
||||
bd.header.bits.length = (BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? (sizeof(bd)/4-2) : (sizeof(bd)/4-3);
|
||||
bd.dword1.bits.pitch = (region->pitch * region->cpp) - 1;
|
||||
|
||||
switch (region->cpp) {
|
||||
@@ -359,6 +359,33 @@ const struct brw_tracked_state brw_polygon_stipple_offset = {
|
||||
.update = upload_polygon_stipple_offset
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
* AA Line parameters
|
||||
*/
|
||||
static void upload_aa_line_parameters(struct brw_context *brw)
|
||||
{
|
||||
struct brw_aa_line_parameters balp;
|
||||
|
||||
if (!(BRW_IS_GM45(brw) || BRW_IS_G4X(brw)))
|
||||
return;
|
||||
|
||||
/* use legacy aa line coverage computation */
|
||||
memset(&balp, 0, sizeof(balp));
|
||||
balp.header.opcode = CMD_AA_LINE_PARAMETERS;
|
||||
balp.header.length = sizeof(balp) / 4 - 2;
|
||||
|
||||
BRW_CACHED_BATCH_STRUCT(brw, &balp);
|
||||
}
|
||||
|
||||
const struct brw_tracked_state brw_aa_line_parameters = {
|
||||
.dirty = {
|
||||
.mesa = 0,
|
||||
.brw = BRW_NEW_CONTEXT,
|
||||
.cache = 0
|
||||
},
|
||||
.update = upload_aa_line_parameters
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* Line stipple packet
|
||||
*/
|
||||
@@ -441,7 +468,7 @@ static void upload_invarient_state( struct brw_context *brw )
|
||||
struct brw_pipeline_select ps;
|
||||
|
||||
memset(&ps, 0, sizeof(ps));
|
||||
ps.header.opcode = CMD_PIPELINE_SELECT;
|
||||
ps.header.opcode = CMD_PIPELINE_SELECT(brw);
|
||||
ps.header.pipeline_select = 0;
|
||||
BRW_BATCH_STRUCT(brw, &ps);
|
||||
}
|
||||
@@ -477,7 +504,7 @@ static void upload_invarient_state( struct brw_context *brw )
|
||||
struct brw_vf_statistics vfs;
|
||||
memset(&vfs, 0, sizeof(vfs));
|
||||
|
||||
vfs.opcode = CMD_VF_STATISTICS;
|
||||
vfs.opcode = CMD_VF_STATISTICS(brw);
|
||||
if (INTEL_DEBUG & DEBUG_STATS)
|
||||
vfs.statistics_enable = 1;
|
||||
|
||||
|
@@ -125,6 +125,9 @@ static void brwProgramStringNotify( GLcontext *ctx,
|
||||
struct brw_vertex_program *vp = (struct brw_vertex_program *)brw->vertex_program;
|
||||
if (p == vp)
|
||||
brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM;
|
||||
if (p->program.IsPositionInvariant) {
|
||||
_mesa_insert_mvp_code(ctx, &p->program);
|
||||
}
|
||||
p->id = brw->program_id++;
|
||||
p->param_state = p->program.Base.Parameters->StateFlags;
|
||||
|
||||
|
@@ -57,7 +57,7 @@ static void compile_sf_prog( struct brw_context *brw,
|
||||
|
||||
/* Begin the compilation:
|
||||
*/
|
||||
brw_init_compile(&c.func);
|
||||
brw_init_compile(brw, &c.func);
|
||||
|
||||
c.key = *key;
|
||||
c.nr_attrs = brw_count_bits(c.key.attrs);
|
||||
@@ -74,6 +74,11 @@ static void compile_sf_prog( struct brw_context *brw,
|
||||
if (c.key.attrs & (1<<i)) {
|
||||
c.attr_to_idx[i] = idx;
|
||||
c.idx_to_attr[idx] = i;
|
||||
if (i >= VERT_RESULT_TEX0 && i <= VERT_RESULT_TEX7) {
|
||||
c.point_attrs[i].CoordReplace =
|
||||
brw->attribs.Point->CoordReplace[i - VERT_RESULT_TEX0];
|
||||
} else
|
||||
c.point_attrs[i].CoordReplace = GL_FALSE;
|
||||
idx++;
|
||||
}
|
||||
|
||||
@@ -90,7 +95,10 @@ static void compile_sf_prog( struct brw_context *brw,
|
||||
break;
|
||||
case SF_POINTS:
|
||||
c.nr_verts = 1;
|
||||
brw_emit_point_setup( &c, GL_TRUE );
|
||||
if (key->do_point_sprite)
|
||||
brw_emit_point_sprite_setup( &c, GL_TRUE );
|
||||
else
|
||||
brw_emit_point_setup( &c, GL_TRUE );
|
||||
break;
|
||||
case SF_UNFILLED_TRIS:
|
||||
c.nr_verts = 3;
|
||||
@@ -162,7 +170,8 @@ static void upload_sf_prog( struct brw_context *brw )
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
key.do_point_sprite = brw->attribs.Point->PointSprite;
|
||||
key.SpriteOrigin = brw->attribs.Point->SpriteOrigin;
|
||||
/* _NEW_LIGHT */
|
||||
key.do_flat_shading = (brw->attribs.Light->ShadeModel == GL_FLAT);
|
||||
key.do_twoside_color = (brw->attribs.Light->Enabled && brw->attribs.Light->Model.TwoSide);
|
||||
@@ -179,7 +188,7 @@ static void upload_sf_prog( struct brw_context *brw )
|
||||
|
||||
const struct brw_tracked_state brw_sf_prog = {
|
||||
.dirty = {
|
||||
.mesa = (_NEW_LIGHT|_NEW_POLYGON),
|
||||
.mesa = (_NEW_LIGHT|_NEW_POLYGON|_NEW_POINT),
|
||||
.brw = (BRW_NEW_REDUCED_PRIMITIVE),
|
||||
.cache = CACHE_NEW_VS_PROG
|
||||
},
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user