Compare commits
74 Commits
mesa-7.0.2
...
mesa_7_0_3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70d227ac62 | ||
|
|
7f2c4f96f5 | ||
|
|
667f0f60fc | ||
|
|
7592b8cc10 | ||
|
|
f55b831859 | ||
|
|
217f7f7e5d | ||
|
|
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 | ||
|
|
ff63cf8068 | ||
|
|
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 | ||
|
|
0fd23f01c6 | ||
|
|
557b0d9df7 | ||
|
|
888f4380cf | ||
|
|
3266c5e95a | ||
|
|
834decdaae | ||
|
|
18b2d83173 | ||
|
|
30c65c3c62 | ||
|
|
04fcc4cf1e |
12
Makefile
12
Makefile
@@ -71,9 +71,10 @@ bluegene-osmesa \
|
||||
bluegene-xlc-osmesa \
|
||||
catamount-osmesa-pgi \
|
||||
darwin \
|
||||
darwin-fat-32bit \
|
||||
darwin-fat-all \
|
||||
darwin-static \
|
||||
darwin-static-x86ppc \
|
||||
darwin-x86ppc \
|
||||
freebsd \
|
||||
freebsd-dri \
|
||||
freebsd-dri-amd64 \
|
||||
@@ -166,10 +167,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.3-rc3
|
||||
LIB_NAME = MesaLib-7.0.3-rc3
|
||||
DEMO_NAME = MesaDemos-7.0.3-rc3
|
||||
GLUT_NAME = MesaGLUT-7.0.3-rc3
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
@@ -415,6 +416,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] \
|
||||
|
||||
91
bin/mklib
91
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'
|
||||
@@ -111,7 +112,6 @@ do
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
'-pthread')
|
||||
# for FreeBSD
|
||||
DEPS="$DEPS -pthread"
|
||||
;;
|
||||
'-cplusplus')
|
||||
@@ -135,6 +135,10 @@ do
|
||||
shift 1;
|
||||
ARCHOPT=$1
|
||||
;;
|
||||
'-altopts')
|
||||
shift 1;
|
||||
ALTOPTS=$1
|
||||
;;
|
||||
'-noprefix')
|
||||
NOPREFIX=1
|
||||
;;
|
||||
@@ -225,6 +229,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 +243,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 +281,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 +366,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 +399,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 +415,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 +471,10 @@ case $ARCH in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK="CC"
|
||||
else
|
||||
@@ -529,6 +555,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 +610,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 +624,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 +667,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 +723,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 +736,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 +803,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 +813,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
|
||||
|
||||
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=0
|
||||
MESA_TINY=2
|
||||
MESA_TINY=3
|
||||
|
||||
# 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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.0.3 Release Notes / (TBD) 2007</H1>
|
||||
<H1>Mesa 7.0.3 Release Notes / March TBD, 2008</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
|
||||
@@ -20,10 +20,6 @@ Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Added missing glw.pc.in file to release tarball
|
||||
@@ -36,8 +32,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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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}
|
||||
@@ -75,6 +75,10 @@ tags:
|
||||
etags `find . -name \*.[ch]` `find ../include`
|
||||
|
||||
|
||||
# Dummy install target
|
||||
install:
|
||||
|
||||
|
||||
# Remove .o and backup files
|
||||
clean:
|
||||
-rm -f drmtest $(TOP)/$(LIB_DIR)/libGL.so*
|
||||
|
||||
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 );
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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_IGD, "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_IGD, "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 },
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -72,6 +72,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_IGD(brw))
|
||||
clip.clip5.negative_w_clip_test = 1;
|
||||
|
||||
clip.clip6.clipper_viewport_state_ptr = 0;
|
||||
clip.viewport_xmin = -1;
|
||||
clip.viewport_xmax = 1;
|
||||
|
||||
@@ -78,7 +78,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);
|
||||
|
||||
@@ -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 */
|
||||
@@ -343,12 +343,14 @@ 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);
|
||||
if (!BRW_IS_IGD(p->brw)) {
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -815,14 +815,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_IGD 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_IGD 0x680b
|
||||
|
||||
#define CMD_DRAW_RECT 0x7900
|
||||
#define CMD_BLEND_CONSTANT_COLOR 0x7901
|
||||
@@ -832,6 +834,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 +848,9 @@
|
||||
#define R02_PRIM_END 0x1
|
||||
#define R02_PRIM_START 0x2
|
||||
|
||||
|
||||
#define BRW_IS_IGD(brw) ((brw)->intel.intelScreen->deviceID == PCI_CHIP_IGD_GM)
|
||||
#define CMD_PIPELINE_SELECT(brw) ((BRW_IS_IGD(brw)) ? CMD_PIPELINE_SELECT_IGD : CMD_PIPELINE_SELECT_965)
|
||||
#define CMD_VF_STATISTICS(brw) ((BRW_IS_IGD(brw)) ? CMD_VF_STATISTICS_IGD : CMD_VF_STATISTICS_965)
|
||||
#define URB_SIZES(brw) ((BRW_IS_IGD(brw)) ? 384 : 256) /* 512 bit unit */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -680,7 +681,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 );
|
||||
|
||||
|
||||
|
||||
@@ -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_IGD(brw)) {
|
||||
insn->bits3.sampler_igd.binding_table_index = binding_table_index;
|
||||
insn->bits3.sampler_igd.sampler = sampler;
|
||||
insn->bits3.sampler_igd.msg_type = msg_type;
|
||||
insn->bits3.sampler_igd.response_length = response_length;
|
||||
insn->bits3.sampler_igd.msg_length = msg_length;
|
||||
insn->bits3.sampler_igd.end_of_thread = eot;
|
||||
insn->bits3.sampler_igd.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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -985,7 +996,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;
|
||||
|
||||
|
||||
@@ -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_IGD(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_IGD(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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -185,7 +185,8 @@ static void upload_sf_unit( struct brw_context *brw )
|
||||
sf.sf6.point_rast_rule = 1; /* opengl conventions */
|
||||
sf.sf7.point_size = brw->attribs.Point->_Size * (1<<3);
|
||||
sf.sf7.use_point_size_state = !brw->attribs.Point->_Attenuated;
|
||||
|
||||
sf.sf7.aa_line_distance_mode = 0;
|
||||
|
||||
/* might be BRW_NEW_PRIMITIVE if we have to adjust pv for polygons:
|
||||
*/
|
||||
sf.sf7.trifan_pv = 2;
|
||||
|
||||
@@ -50,6 +50,7 @@ const struct brw_tracked_state brw_gs_prog;
|
||||
const struct brw_tracked_state brw_gs_unit;
|
||||
const struct brw_tracked_state brw_drawing_rect;
|
||||
const struct brw_tracked_state brw_line_stipple;
|
||||
const struct brw_tracked_state brw_aa_line_parameters;
|
||||
const struct brw_tracked_state brw_pipelined_state_pointers;
|
||||
const struct brw_tracked_state brw_binding_table_pointers;
|
||||
const struct brw_tracked_state brw_depthbuffer;
|
||||
|
||||
@@ -103,6 +103,7 @@ static void clear_batch_cache( struct brw_context *brw )
|
||||
|
||||
void brw_clear_batch_cache_flush( struct brw_context *brw )
|
||||
{
|
||||
bmFinishFenceLock(&(brw->intel), bmSetFenceLock(&(brw->intel)));
|
||||
clear_batch_cache(brw);
|
||||
|
||||
brw->wrap = 0;
|
||||
|
||||
@@ -92,7 +92,7 @@ const struct brw_tracked_state *atoms[] =
|
||||
&brw_polygon_stipple_offset,
|
||||
|
||||
&brw_line_stipple,
|
||||
|
||||
&brw_aa_line_parameters,
|
||||
/* Ordering of the commands below is documented as fixed.
|
||||
*/
|
||||
#if 0
|
||||
|
||||
@@ -141,7 +141,8 @@ struct brw_depthbuffer
|
||||
struct {
|
||||
GLuint pitch:18;
|
||||
GLuint format:3;
|
||||
GLuint pad:4;
|
||||
GLuint pad:2;
|
||||
GLuint software_tiled_rendering_mode:2;
|
||||
GLuint depth_offset_disable:1;
|
||||
GLuint tile_walk:1;
|
||||
GLuint tiled_surface:1;
|
||||
@@ -166,12 +167,20 @@ struct brw_depthbuffer
|
||||
|
||||
union {
|
||||
struct {
|
||||
GLuint pad:12;
|
||||
GLuint min_array_element:9;
|
||||
GLuint pad:10;
|
||||
GLuint min_array_element:11;
|
||||
GLuint depth:11;
|
||||
} bits;
|
||||
GLuint dword;
|
||||
} dword4;
|
||||
|
||||
union {
|
||||
struct {
|
||||
GLuint xoffset:16;
|
||||
GLuint yoffset:16;
|
||||
} bits;
|
||||
GLuint dword;
|
||||
} dword5; /* NEW in Integrated Graphics Device */
|
||||
};
|
||||
|
||||
struct brw_drawrect
|
||||
@@ -213,6 +222,25 @@ struct brw_indexbuffer
|
||||
GLuint buffer_end;
|
||||
};
|
||||
|
||||
/* NEW in Integrated Graphics Device */
|
||||
struct brw_aa_line_parameters
|
||||
{
|
||||
struct header header;
|
||||
|
||||
struct {
|
||||
GLuint aa_coverage_scope:8;
|
||||
GLuint pad0:8;
|
||||
GLuint aa_coverage_bias:8;
|
||||
GLuint pad1:8;
|
||||
} bits0;
|
||||
|
||||
struct {
|
||||
GLuint aa_coverage_endcap_slope:8;
|
||||
GLuint pad0:8;
|
||||
GLuint aa_coverage_endcap_bias:8;
|
||||
GLuint pad1:8;
|
||||
} bits1;
|
||||
};
|
||||
|
||||
struct brw_line_stipple
|
||||
{
|
||||
@@ -315,7 +343,8 @@ struct brw_pipe_control
|
||||
{
|
||||
GLuint length:8;
|
||||
GLuint notify_enable:1;
|
||||
GLuint pad:2;
|
||||
GLuint texture_cache_flush_enable:1;
|
||||
GLuint indirect_state_pointers_disable:1;
|
||||
GLuint instruction_state_cache_flush_enable:1;
|
||||
GLuint write_cache_flush_enable:1;
|
||||
GLuint depth_stall_enable:1;
|
||||
@@ -547,8 +576,8 @@ struct brw_clip_unit_state
|
||||
GLuint pad1:1;
|
||||
GLuint urb_entry_allocation_size:5;
|
||||
GLuint pad2:1;
|
||||
GLuint max_threads:1; /* may be less */
|
||||
GLuint pad3:6;
|
||||
GLuint max_threads:5; /* may be less */
|
||||
GLuint pad3:2;
|
||||
} thread4;
|
||||
|
||||
struct
|
||||
@@ -557,7 +586,7 @@ struct brw_clip_unit_state
|
||||
GLuint clip_mode:3;
|
||||
GLuint userclip_enable_flags:8;
|
||||
GLuint userclip_must_clip:1;
|
||||
GLuint pad1:1;
|
||||
GLuint negative_w_clip_test:1;
|
||||
GLuint guard_band_enable:1;
|
||||
GLuint viewport_z_clip_enable:1;
|
||||
GLuint viewport_xy_clip_enable:1;
|
||||
@@ -724,7 +753,8 @@ struct brw_sf_unit_state
|
||||
GLuint use_point_size_state:1;
|
||||
GLuint subpixel_precision:1;
|
||||
GLuint sprite_point:1;
|
||||
GLuint pad0:11;
|
||||
GLuint pad0:10;
|
||||
GLuint aa_line_distance_mode:1;
|
||||
GLuint trifan_pv:2;
|
||||
GLuint linestrip_pv:2;
|
||||
GLuint tristrip_pv:2;
|
||||
@@ -749,8 +779,8 @@ struct brw_gs_unit_state
|
||||
GLuint pad1:1;
|
||||
GLuint urb_entry_allocation_size:5;
|
||||
GLuint pad2:1;
|
||||
GLuint max_threads:1;
|
||||
GLuint pad3:6;
|
||||
GLuint max_threads:5;
|
||||
GLuint pad3:2;
|
||||
} thread4;
|
||||
|
||||
struct
|
||||
@@ -764,9 +794,14 @@ struct brw_gs_unit_state
|
||||
struct
|
||||
{
|
||||
GLuint max_vp_index:4;
|
||||
GLuint pad0:26;
|
||||
GLuint reorder_enable:1;
|
||||
GLuint pad0:12;
|
||||
GLuint svbi_post_inc_value:10;
|
||||
GLuint pad1:1;
|
||||
GLuint svbi_post_inc_enable:1;
|
||||
GLuint svbi_payload:1;
|
||||
GLuint discard_adjaceny:1;
|
||||
GLuint reorder_enable:1;
|
||||
GLuint pad2:1;
|
||||
} gs6;
|
||||
};
|
||||
|
||||
@@ -786,8 +821,8 @@ struct brw_vs_unit_state
|
||||
GLuint pad1:1;
|
||||
GLuint urb_entry_allocation_size:5;
|
||||
GLuint pad2:1;
|
||||
GLuint max_threads:4;
|
||||
GLuint pad3:3;
|
||||
GLuint max_threads:6;
|
||||
GLuint pad3:1;
|
||||
} thread4;
|
||||
|
||||
struct
|
||||
@@ -815,7 +850,7 @@ struct brw_wm_unit_state
|
||||
|
||||
struct {
|
||||
GLuint stats_enable:1;
|
||||
GLuint pad0:1;
|
||||
GLuint depth_buffer_clear:1;
|
||||
GLuint sampler_count:3;
|
||||
GLuint sampler_state_pointer:27;
|
||||
} wm4;
|
||||
@@ -825,7 +860,9 @@ struct brw_wm_unit_state
|
||||
GLuint enable_8_pix:1;
|
||||
GLuint enable_16_pix:1;
|
||||
GLuint enable_32_pix:1;
|
||||
GLuint pad0:7;
|
||||
GLuint enable_con_32_pix:1;
|
||||
GLuint enable_con_64_pix:1;
|
||||
GLuint pad0:5;
|
||||
GLuint legacy_global_depth_bias:1;
|
||||
GLuint line_stipple:1;
|
||||
GLuint depth_offset:1;
|
||||
@@ -838,9 +875,8 @@ struct brw_wm_unit_state
|
||||
GLuint program_computes_depth:1;
|
||||
GLuint program_uses_killpixel:1;
|
||||
GLuint legacy_line_rast: 1;
|
||||
GLuint pad1:1;
|
||||
GLuint max_threads:6;
|
||||
GLuint pad2:1;
|
||||
GLuint transposed_urb_read_enable:1;
|
||||
GLuint max_threads:7;
|
||||
} wm5;
|
||||
|
||||
GLfloat global_depth_offset_constant;
|
||||
@@ -978,10 +1014,26 @@ struct brw_surface_state
|
||||
} ss3;
|
||||
|
||||
struct {
|
||||
GLuint pad:19;
|
||||
GLuint min_array_elt:9;
|
||||
GLuint multisample_position_palette_index:3;
|
||||
GLuint pad1:1;
|
||||
GLuint num_multisamples:3;
|
||||
GLuint pad0:1;
|
||||
GLuint render_target_view_extent:9;
|
||||
GLuint min_array_elt:11;
|
||||
GLuint min_lod:4;
|
||||
} ss4;
|
||||
|
||||
struct {
|
||||
GLuint pad1:16;
|
||||
GLuint llc_mapping:1;
|
||||
GLuint mlc_mapping:1;
|
||||
GLuint gfdt:1;
|
||||
GLuint gfdt_src:1;
|
||||
GLuint y_offset:4;
|
||||
GLuint pad0:1;
|
||||
GLuint x_offset:7;
|
||||
} ss5; /* NEW in Integrated Graphics Device */
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1301,6 +1353,17 @@ struct brw_instruction
|
||||
GLuint end_of_thread:1;
|
||||
} sampler;
|
||||
|
||||
struct {
|
||||
GLuint binding_table_index:8;
|
||||
GLuint sampler:4;
|
||||
GLuint msg_type:4;
|
||||
GLuint response_length:4;
|
||||
GLuint msg_length:4;
|
||||
GLuint msg_target:4;
|
||||
GLuint pad1:3;
|
||||
GLuint end_of_thread:1;
|
||||
} sampler_igd;
|
||||
|
||||
struct brw_urb_immediate urb;
|
||||
|
||||
struct {
|
||||
|
||||
@@ -69,7 +69,7 @@ static GLboolean check_urb_layout( struct brw_context *brw )
|
||||
brw->urb.sf_start = brw->urb.clip_start + brw->urb.nr_clip_entries * brw->urb.vsize;
|
||||
brw->urb.cs_start = brw->urb.sf_start + brw->urb.nr_sf_entries * brw->urb.sfsize;
|
||||
|
||||
return brw->urb.cs_start + brw->urb.nr_cs_entries * brw->urb.csize <= 256;
|
||||
return brw->urb.cs_start + brw->urb.nr_cs_entries * brw->urb.csize <= URB_SIZES(brw);
|
||||
}
|
||||
|
||||
/* Most minimal update, forces re-emit of URB fence packet after GS
|
||||
@@ -153,7 +153,7 @@ static void recalculate_urb_fence( struct brw_context *brw )
|
||||
brw->urb.clip_start,
|
||||
brw->urb.sf_start,
|
||||
brw->urb.cs_start,
|
||||
256);
|
||||
URB_SIZES(brw));
|
||||
|
||||
brw->state.dirty.brw |= BRW_NEW_URB_FENCE;
|
||||
}
|
||||
@@ -191,13 +191,13 @@ void brw_upload_urb_fence(struct brw_context *brw)
|
||||
/* The ordering below is correct, not the layout in the
|
||||
* instruction.
|
||||
*
|
||||
* There are 256 urb reg pairs in total.
|
||||
* There are 256/384 urb reg pairs in total.
|
||||
*/
|
||||
uf.bits0.vs_fence = brw->urb.gs_start;
|
||||
uf.bits0.gs_fence = brw->urb.clip_start;
|
||||
uf.bits0.clp_fence = brw->urb.sf_start;
|
||||
uf.bits1.sf_fence = brw->urb.cs_start;
|
||||
uf.bits1.cs_fence = 256;
|
||||
uf.bits1.cs_fence = URB_SIZES(brw);
|
||||
|
||||
BRW_BATCH_STRUCT(brw, &uf);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ static void do_vs_prog( struct brw_context *brw,
|
||||
memset(&c, 0, sizeof(c));
|
||||
memcpy(&c.key, key, sizeof(*key));
|
||||
|
||||
brw_init_compile(&c.func);
|
||||
brw_init_compile(brw, &c.func);
|
||||
c.vp = vp;
|
||||
|
||||
c.prog_data.outputs_written = vp->program.Base.OutputsWritten;
|
||||
|
||||
@@ -845,7 +845,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
|
||||
* Later, clipping will detect ucp[6] and ensure the primitive is
|
||||
* clipped against all fixed planes.
|
||||
*/
|
||||
if (!c->key.know_w_is_one) {
|
||||
if (!BRW_IS_IGD(p->brw) && !c->key.know_w_is_one) {
|
||||
brw_CMP(p,
|
||||
vec8(brw_null_reg()),
|
||||
BRW_CONDITIONAL_L,
|
||||
|
||||
@@ -150,7 +150,6 @@ static void do_wm_prog( struct brw_context *brw,
|
||||
c->fp = fp;
|
||||
c->env_param = brw->intel.ctx.FragmentProgram.Parameters;
|
||||
|
||||
|
||||
/* Augment fragment program. Add instructions for pre- and
|
||||
* post-fragment-program tasks such as interpolation and fogging.
|
||||
*/
|
||||
@@ -175,7 +174,7 @@ static void do_wm_prog( struct brw_context *brw,
|
||||
|
||||
/* This is where we start emitting gen4 code:
|
||||
*/
|
||||
brw_init_compile(&c->func);
|
||||
brw_init_compile(brw, &c->func);
|
||||
|
||||
brw_wm_pass2(c);
|
||||
|
||||
|
||||
@@ -704,6 +704,9 @@ void bmDeleteBuffers(struct intel_context *intel, unsigned n, struct buffer **bu
|
||||
if (buf && buf->block)
|
||||
free_block(intel, buf->block);
|
||||
|
||||
if (buf && buf->backing_store)
|
||||
free_backing_store(intel, buf);
|
||||
|
||||
if (buf)
|
||||
free(buf);
|
||||
}
|
||||
|
||||
@@ -118,6 +118,9 @@ static const GLubyte *intelGetString( GLcontext *ctx, GLenum name )
|
||||
case PCI_CHIP_I965_GM:
|
||||
chipset = "Intel(R) 965GM"; break;
|
||||
break;
|
||||
case PCI_CHIP_IGD_GM:
|
||||
chipset = "Intel(R) Integrated Graphics Device";
|
||||
break;
|
||||
default:
|
||||
chipset = "Unknown Intel Chipset"; break;
|
||||
}
|
||||
|
||||
@@ -387,6 +387,8 @@ extern int INTEL_DEBUG;
|
||||
#define PCI_CHIP_I946_GZ 0x2972
|
||||
#define PCI_CHIP_I965_GM 0x2A02
|
||||
|
||||
#define PCI_CHIP_IGD_GM 0x2A42
|
||||
|
||||
|
||||
/* ================================================================
|
||||
* intel_context.c:
|
||||
|
||||
@@ -316,8 +316,8 @@ void r300InitCmdBuf(r300ContextPtr r300)
|
||||
r300->hw.vic.cmd[R300_VIC_CMD_0] = cmdpacket0(R300_VAP_INPUT_CNTL_0, 2);
|
||||
ALLOC_STATE(unk21DC, always, 2, 0);
|
||||
r300->hw.unk21DC.cmd[0] = cmdpacket0(0x21DC, 1);
|
||||
ALLOC_STATE(unk221C, always, 2, 0);
|
||||
r300->hw.unk221C.cmd[0] = cmdpacket0(R300_VAP_UNKNOWN_221C, 1);
|
||||
ALLOC_STATE(vap_clip_cntl, always, 2, 0);
|
||||
r300->hw.vap_clip_cntl.cmd[0] = cmdpacket0(R300_VAP_CLIP_CNTL, 1);
|
||||
ALLOC_STATE(unk2220, always, 5, 0);
|
||||
r300->hw.unk2220.cmd[0] = cmdpacket0(0x2220, 4);
|
||||
ALLOC_STATE(unk2288, always, 2, 0);
|
||||
@@ -438,15 +438,24 @@ void r300InitCmdBuf(r300ContextPtr r300)
|
||||
|
||||
/* VPU only on TCL */
|
||||
if (has_tcl) {
|
||||
int i;
|
||||
ALLOC_STATE(vpi, vpu, R300_VPI_CMDSIZE, 0);
|
||||
r300->hw.vpi.cmd[R300_VPI_CMD_0] =
|
||||
cmdvpu(R300_PVS_UPLOAD_PROGRAM, 0);
|
||||
|
||||
ALLOC_STATE(vpp, vpu, R300_VPP_CMDSIZE, 0);
|
||||
r300->hw.vpp.cmd[R300_VPP_CMD_0] =
|
||||
cmdvpu(R300_PVS_UPLOAD_PARAMETERS, 0);
|
||||
|
||||
ALLOC_STATE(vps, vpu, R300_VPS_CMDSIZE, 0);
|
||||
r300->hw.vps.cmd[R300_VPS_CMD_0] =
|
||||
cmdvpu(R300_PVS_UPLOAD_POINTSIZE, 1);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
ALLOC_STATE(vpucp[i], vpu, R300_VPUCP_CMDSIZE, 0);
|
||||
r300->hw.vpucp[i].cmd[R300_VPUCP_CMD_0] =
|
||||
cmdvpu(R300_PVS_UPLOAD_CLIP_PLANE0+i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Textures */
|
||||
|
||||
@@ -421,6 +421,13 @@ struct r300_state_atom {
|
||||
#define R300_VPP_PARAM_0 1
|
||||
#define R300_VPP_CMDSIZE 1025 /* 256 4-component parameters */
|
||||
|
||||
#define R300_VPUCP_CMD_0 0
|
||||
#define R300_VPUCP_X 1
|
||||
#define R300_VPUCP_Y 2
|
||||
#define R300_VPUCP_Z 3
|
||||
#define R300_VPUCP_W 4
|
||||
#define R300_VPUCP_CMDSIZE 5 /* 256 4-component parameters */
|
||||
|
||||
#define R300_VPS_CMD_0 0
|
||||
#define R300_VPS_ZERO_0 1
|
||||
#define R300_VPS_ZERO_1 2
|
||||
@@ -454,7 +461,7 @@ struct r300_hw_state {
|
||||
struct r300_state_atom vir[2]; /* vap input route (2150/21E0) */
|
||||
struct r300_state_atom vic; /* vap input control (2180) */
|
||||
struct r300_state_atom unk21DC; /* (21DC) */
|
||||
struct r300_state_atom unk221C; /* (221C) */
|
||||
struct r300_state_atom vap_clip_cntl;
|
||||
struct r300_state_atom unk2220; /* (2220) */
|
||||
struct r300_state_atom unk2288; /* (2288) */
|
||||
struct r300_state_atom pvs; /* pvs_cntl (22D0) */
|
||||
@@ -508,6 +515,7 @@ struct r300_hw_state {
|
||||
struct r300_state_atom vpi; /* vp instructions */
|
||||
struct r300_state_atom vpp; /* vp parameters */
|
||||
struct r300_state_atom vps; /* vertex point size (?) */
|
||||
struct r300_state_atom vpucp[6]; /* vp user clip plane - 6 */
|
||||
/* 8 texture units */
|
||||
/* the state is grouped by function and not by
|
||||
texture unit. This makes single unit updates
|
||||
|
||||
@@ -266,8 +266,8 @@ static void r300EmitClearState(GLcontext * ctx)
|
||||
e32(0x0);
|
||||
e32(0x0);
|
||||
|
||||
R300_STATECHANGE(r300, unk221C);
|
||||
reg_start(R300_VAP_UNKNOWN_221C, 0);
|
||||
R300_STATECHANGE(r300, vap_clip_cntl);
|
||||
reg_start(R300_VAP_CLIP_CNTL, 0);
|
||||
e32(R300_221C_CLEAR);
|
||||
|
||||
R300_STATECHANGE(r300, ps);
|
||||
|
||||
@@ -281,8 +281,21 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#define R300_VAP_PVS_UPLOAD_ADDRESS 0x2200
|
||||
# define R300_PVS_UPLOAD_PROGRAM 0x00000000
|
||||
# define R300_PVS_UPLOAD_PARAMETERS 0x00000200
|
||||
# define R300_PVS_UPLOAD_CLIP_PLANE0 0x00000400
|
||||
# define R300_PVS_UPLOAD_CLIP_PLANE1 0x00000401
|
||||
# define R300_PVS_UPLOAD_CLIP_PLANE2 0x00000402
|
||||
# define R300_PVS_UPLOAD_CLIP_PLANE3 0x00000403
|
||||
# define R300_PVS_UPLOAD_CLIP_PLANE4 0x00000404
|
||||
# define R300_PVS_UPLOAD_CLIP_PLANE5 0x00000405
|
||||
# define R300_PVS_UPLOAD_POINTSIZE 0x00000406
|
||||
|
||||
# define R500_PVS_UPLOAD_CLIP_PLANE0 0x00000600
|
||||
# define R500_PVS_UPLOAD_CLIP_PLANE1 0x00000601
|
||||
# define R500_PVS_UPLOAD_CLIP_PLANE2 0x00000602
|
||||
# define R500_PVS_UPLOAD_CLIP_PLANE3 0x00000603
|
||||
# define R500_PVS_UPLOAD_CLIP_PLANE4 0x00000604
|
||||
# define R500_PVS_UPLOAD_CLIP_PLANE5 0x00000605
|
||||
|
||||
/* gap */
|
||||
|
||||
#define R300_VAP_PVS_UPLOAD_DATA 0x2208
|
||||
@@ -294,10 +307,16 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
/* I do not know the purpose of this register. However, I do know that
|
||||
* it is set to 221C_CLEAR for clear operations and to 221C_NORMAL
|
||||
* for normal rendering.
|
||||
*
|
||||
* 2007-11-05: This register is the user clip plane control register, but there
|
||||
* also seems to be a rendering mode control; the NORMAL/CLEAR defines.
|
||||
*
|
||||
* See bug #9871. http://bugs.freedesktop.org/attachment.cgi?id=10672&action=view
|
||||
*/
|
||||
#define R300_VAP_UNKNOWN_221C 0x221C
|
||||
#define R300_VAP_CLIP_CNTL 0x221C
|
||||
# define R300_221C_NORMAL 0x00000000
|
||||
# define R300_221C_CLEAR 0x0001C000
|
||||
#define R300_VAP_UCP_ENABLE_0 (1 << 0)
|
||||
|
||||
/* gap */
|
||||
|
||||
|
||||
@@ -462,6 +462,8 @@ static void r300SetDepthState(GLcontext * ctx)
|
||||
r300SetEarlyZState(ctx);
|
||||
}
|
||||
|
||||
static void r300ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq );
|
||||
|
||||
/**
|
||||
* Handle glEnable()/glDisable().
|
||||
*
|
||||
@@ -470,7 +472,7 @@ static void r300SetDepthState(GLcontext * ctx)
|
||||
static void r300Enable(GLcontext * ctx, GLenum cap, GLboolean state)
|
||||
{
|
||||
r300ContextPtr r300 = R300_CONTEXT(ctx);
|
||||
|
||||
GLuint p;
|
||||
if (RADEON_DEBUG & DEBUG_STATE)
|
||||
fprintf(stderr, "%s( %s = %s )\n", __FUNCTION__,
|
||||
_mesa_lookup_enum_by_nr(cap),
|
||||
@@ -510,6 +512,27 @@ static void r300Enable(GLcontext * ctx, GLenum cap, GLboolean state)
|
||||
r300SetBlendState(ctx);
|
||||
break;
|
||||
|
||||
|
||||
case GL_CLIP_PLANE0:
|
||||
case GL_CLIP_PLANE1:
|
||||
case GL_CLIP_PLANE2:
|
||||
case GL_CLIP_PLANE3:
|
||||
case GL_CLIP_PLANE4:
|
||||
case GL_CLIP_PLANE5:
|
||||
/* no VAP UCP on non-TCL chipsets */
|
||||
if (!(r300->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL))
|
||||
return;
|
||||
|
||||
p = cap-GL_CLIP_PLANE0;
|
||||
R300_STATECHANGE( r300, vap_clip_cntl );
|
||||
if (state) {
|
||||
r300->hw.vap_clip_cntl.cmd[1] |= (R300_VAP_UCP_ENABLE_0<<p);
|
||||
r300ClipPlane( ctx, cap, NULL );
|
||||
}
|
||||
else {
|
||||
r300->hw.vap_clip_cntl.cmd[1] &= ~(R300_VAP_UCP_ENABLE_0<<p);
|
||||
}
|
||||
break;
|
||||
case GL_DEPTH_TEST:
|
||||
r300SetDepthState(ctx);
|
||||
break;
|
||||
@@ -1888,7 +1911,7 @@ static void r300ResetHwState(r300ContextPtr r300)
|
||||
|
||||
r300->hw.unk21DC.cmd[1] = 0xAAAAAAAA;
|
||||
|
||||
r300->hw.unk221C.cmd[1] = R300_221C_NORMAL;
|
||||
r300->hw.vap_clip_cntl.cmd[1] = R300_221C_NORMAL;
|
||||
|
||||
r300->hw.unk2220.cmd[1] = r300PackFloat32(1.0);
|
||||
r300->hw.unk2220.cmd[2] = r300PackFloat32(1.0);
|
||||
@@ -2254,6 +2277,8 @@ void r300InitState(r300ContextPtr r300)
|
||||
depth_fmt = R300_DEPTH_FORMAT_24BIT_INT_Z;
|
||||
r300->state.stencil.clear = 0x00ff0000;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Error: Unsupported depth %d... exiting\n",
|
||||
ctx->Visual.depthBits);
|
||||
@@ -2276,6 +2301,38 @@ static void r300RenderMode(GLcontext * ctx, GLenum mode)
|
||||
(void)mode;
|
||||
}
|
||||
|
||||
static void r300ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
|
||||
{
|
||||
r300ContextPtr rmesa = R300_CONTEXT(ctx);
|
||||
GLint p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
|
||||
GLint *ip = (GLint *)ctx->Transform._ClipUserPlane[p];
|
||||
|
||||
R300_STATECHANGE( rmesa, vpucp[p] );
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_X] = ip[0];
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_Y] = ip[1];
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_Z] = ip[2];
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_W] = ip[3];
|
||||
}
|
||||
|
||||
|
||||
void r300UpdateClipPlanes( GLcontext *ctx )
|
||||
{
|
||||
r300ContextPtr rmesa = R300_CONTEXT(ctx);
|
||||
GLuint p;
|
||||
|
||||
for (p = 0; p < ctx->Const.MaxClipPlanes; p++) {
|
||||
if (ctx->Transform.ClipPlanesEnabled & (1 << p)) {
|
||||
GLint *ip = (GLint *)ctx->Transform._ClipUserPlane[p];
|
||||
|
||||
R300_STATECHANGE( rmesa, vpucp[p] );
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_X] = ip[0];
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_Y] = ip[1];
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_Z] = ip[2];
|
||||
rmesa->hw.vpucp[p].cmd[R300_VPUCP_W] = ip[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize driver's state callback functions
|
||||
*/
|
||||
@@ -2313,4 +2370,6 @@ void r300InitStateFuncs(struct dd_function_table *functions)
|
||||
functions->PolygonMode = r300PolygonMode;
|
||||
|
||||
functions->RenderMode = r300RenderMode;
|
||||
|
||||
functions->ClipPlane = r300ClipPlane;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
#define PCI_CHIP_RV370_5B63 0x5B63
|
||||
#define PCI_CHIP_RV370_5B64 0x5B64
|
||||
#define PCI_CHIP_RV370_5B65 0x5B65
|
||||
#define PCI_CHIP_RV370_5657 0x5657
|
||||
#define PCI_CHIP_RV280_5C61 0x5C61
|
||||
#define PCI_CHIP_RV280_5C63 0x5C63
|
||||
#define PCI_CHIP_R430_5D48 0x5D48
|
||||
|
||||
@@ -585,6 +585,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
|
||||
case PCI_CHIP_RV370_5B63:
|
||||
case PCI_CHIP_RV370_5B64:
|
||||
case PCI_CHIP_RV370_5B65:
|
||||
case PCI_CHIP_RV370_5657:
|
||||
case PCI_CHIP_RV380_3150:
|
||||
case PCI_CHIP_RV380_3152:
|
||||
case PCI_CHIP_RV380_3154:
|
||||
@@ -634,6 +635,13 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
|
||||
screen->chip_flags = RADEON_CHIPSET_TCL;
|
||||
break;
|
||||
|
||||
/* RV410 SE chips have half the pipes of regular RV410 */
|
||||
case PCI_CHIP_RV410_5E4C:
|
||||
case PCI_CHIP_RV410_5E4F:
|
||||
screen->chip_family = CHIP_FAMILY_RV380;
|
||||
screen->chip_flags = RADEON_CHIPSET_TCL;
|
||||
break;
|
||||
|
||||
case PCI_CHIP_RV410_564A:
|
||||
case PCI_CHIP_RV410_564B:
|
||||
case PCI_CHIP_RV410_564F:
|
||||
@@ -642,9 +650,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
|
||||
case PCI_CHIP_RV410_5E48:
|
||||
case PCI_CHIP_RV410_5E4A:
|
||||
case PCI_CHIP_RV410_5E4B:
|
||||
case PCI_CHIP_RV410_5E4C:
|
||||
case PCI_CHIP_RV410_5E4D:
|
||||
case PCI_CHIP_RV410_5E4F:
|
||||
screen->chip_family = CHIP_FAMILY_RV410;
|
||||
screen->chip_flags = RADEON_CHIPSET_TCL;
|
||||
break;
|
||||
|
||||
@@ -795,6 +795,11 @@ glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share )
|
||||
}
|
||||
|
||||
_mesa_enable_sw_extensions(glctx);
|
||||
_mesa_enable_1_3_extensions(glctx);
|
||||
_mesa_enable_1_4_extensions(glctx);
|
||||
_mesa_enable_1_5_extensions(glctx);
|
||||
_mesa_enable_2_0_extensions(glctx);
|
||||
_mesa_enable_2_1_extensions(glctx);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,42 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers)
|
||||
|
||||
|
||||
#ifndef XFree86Server
|
||||
/* XXX this was never tested in the Xserver environment */
|
||||
/* XXX these functions haven't been tested in the Xserver environment */
|
||||
|
||||
|
||||
/**
|
||||
* Check if we can do an optimized glDrawPixels into an 8R8G8B visual.
|
||||
*/
|
||||
static GLboolean
|
||||
can_do_DrawPixels_8R8G8B(GLcontext *ctx, GLenum format, GLenum type)
|
||||
{
|
||||
if (format == GL_BGRA &&
|
||||
type == GL_UNSIGNED_BYTE &&
|
||||
ctx->DrawBuffer &&
|
||||
ctx->DrawBuffer->Name == 0 &&
|
||||
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
|
||||
ctx->Pixel.ZoomY == 1.0 &&
|
||||
ctx->_ImageTransferState == 0 /* no color tables, scale/bias, etc */) {
|
||||
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if ((swrast->_RasterMask & ~CLIP_BIT) == 0) /* no blend, z-test, etc */ {
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];
|
||||
if (rb) {
|
||||
struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb->Wrapped);
|
||||
if (xrb &&
|
||||
xrb->pixmap && /* drawing to pixmap or window */
|
||||
xrb->Base.AlphaBits == 0) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function implements glDrawPixels() with an XPutImage call when
|
||||
@@ -434,37 +469,16 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
|
||||
const struct gl_pixelstore_attrib *unpack,
|
||||
const GLvoid *pixels )
|
||||
{
|
||||
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];
|
||||
struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb->Wrapped);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (ctx->DrawBuffer->Name == 0 &&
|
||||
format == GL_BGRA &&
|
||||
type == GL_UNSIGNED_BYTE &&
|
||||
(swrast->_RasterMask & ~CLIP_BIT) == 0 && /* no blend, z-test, etc */
|
||||
ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */
|
||||
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
|
||||
ctx->Pixel.ZoomY == 1.0 &&
|
||||
xrb->pixmap && /* drawing to pixmap or window */
|
||||
xrb->Base.AlphaBits == 0)
|
||||
{
|
||||
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
|
||||
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
|
||||
XMesaDisplay *dpy = xmesa->xm_visual->display;
|
||||
const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
|
||||
if (can_do_DrawPixels_8R8G8B(ctx, format, type)) {
|
||||
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
|
||||
struct gl_pixelstore_attrib clippedUnpack = *unpack;
|
||||
int dstX = x;
|
||||
int dstY = y;
|
||||
int w = width;
|
||||
int h = height;
|
||||
struct gl_pixelstore_attrib clippedUnpack = *unpack;
|
||||
|
||||
ASSERT(xmesa->xm_visual->dithered_pf == PF_8R8G8B);
|
||||
ASSERT(xmesa->xm_visual->undithered_pf == PF_8R8G8B);
|
||||
ASSERT(dpy);
|
||||
ASSERT(gc);
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (unpack->BufferObj->Name) {
|
||||
/* unpack from PBO */
|
||||
@@ -489,14 +503,26 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
|
||||
}
|
||||
|
||||
if (_mesa_clip_drawpixels(ctx, &dstX, &dstY, &w, &h, &clippedUnpack)) {
|
||||
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
|
||||
XMesaDisplay *dpy = xmesa->xm_visual->display;
|
||||
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
|
||||
const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
|
||||
struct xmesa_renderbuffer *xrb
|
||||
= xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped);
|
||||
const int srcX = clippedUnpack.SkipPixels;
|
||||
const int srcY = clippedUnpack.SkipRows;
|
||||
const int rowLength = clippedUnpack.RowLength;
|
||||
XMesaImage ximage;
|
||||
|
||||
ASSERT(xmesa->xm_visual->dithered_pf == PF_8R8G8B);
|
||||
ASSERT(xmesa->xm_visual->undithered_pf == PF_8R8G8B);
|
||||
ASSERT(dpy);
|
||||
ASSERT(gc);
|
||||
|
||||
/* This is a little tricky since all coordinates up to now have
|
||||
* been in the OpenGL bottom-to-top orientation. X is top-to-bottom
|
||||
* so we have to carefully compute the Y coordinates/addresses here.
|
||||
*/
|
||||
int srcX = clippedUnpack.SkipPixels;
|
||||
int srcY = clippedUnpack.SkipRows;
|
||||
int rowLength = clippedUnpack.RowLength;
|
||||
XMesaImage ximage;
|
||||
MEMSET(&ximage, 0, sizeof(XMesaImage));
|
||||
ximage.width = width;
|
||||
ximage.height = height;
|
||||
@@ -507,9 +533,9 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
|
||||
ximage.bitmap_unit = 32;
|
||||
ximage.bitmap_bit_order = LSBFirst;
|
||||
ximage.bitmap_pad = 32;
|
||||
ximage.depth = 24;
|
||||
ximage.bytes_per_line = -rowLength * 4; /* negative to flip image */
|
||||
ximage.depth = 32;
|
||||
ximage.bits_per_pixel = 32;
|
||||
ximage.bytes_per_line = -rowLength * 4; /* negative to flip image */
|
||||
/* it seems we don't need to set the ximage.red/green/blue_mask fields */
|
||||
/* flip Y axis for dest position */
|
||||
dstY = YFLIP(xrb, dstY) - h + 1;
|
||||
@@ -530,6 +556,41 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check if we can do an optimized glDrawPixels into an 5R6G5B visual.
|
||||
*/
|
||||
static GLboolean
|
||||
can_do_DrawPixels_5R6G5B(GLcontext *ctx, GLenum format, GLenum type)
|
||||
{
|
||||
if (format == GL_RGB &&
|
||||
type == GL_UNSIGNED_SHORT_5_6_5 &&
|
||||
!ctx->Color.DitherFlag && /* no dithering */
|
||||
ctx->DrawBuffer &&
|
||||
ctx->DrawBuffer->Name == 0 &&
|
||||
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
|
||||
ctx->Pixel.ZoomY == 1.0 &&
|
||||
ctx->_ImageTransferState == 0 /* no color tables, scale/bias, etc */) {
|
||||
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if ((swrast->_RasterMask & ~CLIP_BIT) == 0) /* no blend, z-test, etc */ {
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];
|
||||
if (rb) {
|
||||
struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb->Wrapped);
|
||||
if (xrb &&
|
||||
xrb->pixmap && /* drawing to pixmap or window */
|
||||
xrb->Base.AlphaBits == 0) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function implements glDrawPixels() with an XPutImage call when
|
||||
* drawing to the front buffer (X Window drawable). The image format
|
||||
@@ -543,35 +604,17 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
|
||||
const struct gl_pixelstore_attrib *unpack,
|
||||
const GLvoid *pixels )
|
||||
{
|
||||
struct xmesa_renderbuffer *xrb
|
||||
= xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped);
|
||||
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
|
||||
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
|
||||
XMesaDisplay *dpy = xmesa->xm_visual->display;
|
||||
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
|
||||
const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
|
||||
|
||||
ASSERT(dpy);
|
||||
ASSERT(gc);
|
||||
ASSERT(xmesa->xm_visual->undithered_pf == PF_5R6G5B);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (xrb->pixmap && /* drawing to pixmap or window */
|
||||
format == GL_RGB &&
|
||||
type == GL_UNSIGNED_SHORT_5_6_5 &&
|
||||
!ctx->Color.DitherFlag && /* no dithering */
|
||||
(swrast->_RasterMask & ~CLIP_BIT) == 0 && /* no blend, z-test, etc */
|
||||
ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */
|
||||
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
|
||||
ctx->Pixel.ZoomY == 1.0) {
|
||||
if (can_do_DrawPixels_5R6G5B(ctx, format, type)) {
|
||||
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
|
||||
struct gl_pixelstore_attrib clippedUnpack = *unpack;
|
||||
int dstX = x;
|
||||
int dstY = y;
|
||||
int w = width;
|
||||
int h = height;
|
||||
struct gl_pixelstore_attrib clippedUnpack = *unpack;
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (unpack->BufferObj->Name) {
|
||||
/* unpack from PBO */
|
||||
GLubyte *buf;
|
||||
@@ -595,14 +638,25 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
|
||||
}
|
||||
|
||||
if (_mesa_clip_drawpixels(ctx, &dstX, &dstY, &w, &h, &clippedUnpack)) {
|
||||
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
|
||||
XMesaDisplay *dpy = xmesa->xm_visual->display;
|
||||
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
|
||||
const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
|
||||
struct xmesa_renderbuffer *xrb
|
||||
= xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped);
|
||||
const int srcX = clippedUnpack.SkipPixels;
|
||||
const int srcY = clippedUnpack.SkipRows;
|
||||
const int rowLength = clippedUnpack.RowLength;
|
||||
XMesaImage ximage;
|
||||
|
||||
ASSERT(xmesa->xm_visual->undithered_pf == PF_5R6G5B);
|
||||
ASSERT(dpy);
|
||||
ASSERT(gc);
|
||||
|
||||
/* This is a little tricky since all coordinates up to now have
|
||||
* been in the OpenGL bottom-to-top orientation. X is top-to-bottom
|
||||
* so we have to carefully compute the Y coordinates/addresses here.
|
||||
*/
|
||||
int srcX = clippedUnpack.SkipPixels;
|
||||
int srcY = clippedUnpack.SkipRows;
|
||||
int rowLength = clippedUnpack.RowLength;
|
||||
XMesaImage ximage;
|
||||
MEMSET(&ximage, 0, sizeof(XMesaImage));
|
||||
ximage.width = width;
|
||||
ximage.height = height;
|
||||
@@ -614,8 +668,8 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
|
||||
ximage.bitmap_bit_order = LSBFirst;
|
||||
ximage.bitmap_pad = 16;
|
||||
ximage.depth = 16;
|
||||
ximage.bytes_per_line = -rowLength * 2; /* negative to flip image */
|
||||
ximage.bits_per_pixel = 16;
|
||||
ximage.bytes_per_line = -rowLength * 2; /* negative to flip image */
|
||||
/* it seems we don't need to set the ximage.red/green/blue_mask fields */
|
||||
/* flip Y axis for dest position */
|
||||
dstY = YFLIP(xrb, dstY) - h + 1;
|
||||
@@ -635,6 +689,42 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if we can do an optimized glCopyPixels.
|
||||
*/
|
||||
static GLboolean
|
||||
can_do_CopyPixels(GLcontext *ctx, GLenum type)
|
||||
{
|
||||
if (type == GL_COLOR &&
|
||||
ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */
|
||||
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
|
||||
ctx->Pixel.ZoomY == 1.0 &&
|
||||
ctx->Color.DrawBuffer[0] == GL_FRONT && /* copy to front buf */
|
||||
ctx->Pixel.ReadBuffer == GL_FRONT && /* copy from front buf */
|
||||
ctx->ReadBuffer->_ColorReadBuffer &&
|
||||
ctx->DrawBuffer->_ColorDrawBuffers[0][0]) {
|
||||
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if ((swrast->_RasterMask & ~CLIP_BIT) == 0x0 &&
|
||||
ctx->ReadBuffer &&
|
||||
ctx->ReadBuffer->_ColorReadBuffer &&
|
||||
ctx->DrawBuffer &&
|
||||
ctx->DrawBuffer->_ColorDrawBuffers[0]) {
|
||||
struct xmesa_renderbuffer *srcXrb
|
||||
= xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer->Wrapped);
|
||||
struct xmesa_renderbuffer *dstXrb
|
||||
= xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped);
|
||||
if (srcXrb->pixmap && dstXrb->pixmap) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implement glCopyPixels for the front color buffer (or back buffer Pixmap)
|
||||
@@ -646,31 +736,19 @@ xmesa_CopyPixels( GLcontext *ctx,
|
||||
GLint srcx, GLint srcy, GLsizei width, GLsizei height,
|
||||
GLint destx, GLint desty, GLenum type )
|
||||
{
|
||||
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
|
||||
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
|
||||
XMesaDisplay *dpy = xmesa->xm_visual->display;
|
||||
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
|
||||
const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
|
||||
struct xmesa_renderbuffer *srcXrb
|
||||
= xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer->Wrapped);
|
||||
struct xmesa_renderbuffer *dstXrb
|
||||
= xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped);
|
||||
if (can_do_CopyPixels(ctx, type)) {
|
||||
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
|
||||
XMesaDisplay *dpy = xmesa->xm_visual->display;
|
||||
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
|
||||
const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
|
||||
struct xmesa_renderbuffer *srcXrb
|
||||
= xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer->Wrapped);
|
||||
struct xmesa_renderbuffer *dstXrb
|
||||
= xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped);
|
||||
|
||||
ASSERT(dpy);
|
||||
ASSERT(gc);
|
||||
ASSERT(dpy);
|
||||
ASSERT(gc);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (ctx->Color.DrawBuffer[0] == GL_FRONT &&
|
||||
ctx->Pixel.ReadBuffer == GL_FRONT &&
|
||||
srcXrb->pixmap &&
|
||||
dstXrb->pixmap &&
|
||||
type == GL_COLOR &&
|
||||
(swrast->_RasterMask & ~CLIP_BIT) == 0 && /* no blend, z-test, etc */
|
||||
ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */
|
||||
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
|
||||
ctx->Pixel.ZoomY == 1.0) {
|
||||
/* Note: we don't do any special clipping work here. We could,
|
||||
* but X will do it for us.
|
||||
*/
|
||||
@@ -683,6 +761,7 @@ xmesa_CopyPixels( GLcontext *ctx,
|
||||
_swrast_CopyPixels(ctx, srcx, srcy, width, height, destx, desty, type );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* XFree86Server */
|
||||
|
||||
|
||||
@@ -1072,7 +1151,8 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
|
||||
#ifndef XFree86Server
|
||||
driver->CopyPixels = xmesa_CopyPixels;
|
||||
if (xmvisual->undithered_pf == PF_8R8G8B &&
|
||||
xmvisual->dithered_pf == PF_8R8G8B) {
|
||||
xmvisual->dithered_pf == PF_8R8G8B &&
|
||||
xmvisual->BitsPerPixel == 32) {
|
||||
driver->DrawPixels = xmesa_DrawPixels_8R8G8B;
|
||||
}
|
||||
else if (xmvisual->undithered_pf == PF_5R6G5B) {
|
||||
|
||||
@@ -7,23 +7,20 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
GLX_DIR = ../../glx/x11
|
||||
|
||||
OUTPUTS = glprocs.h glapitemp.h glapioffsets.h glapitable.h dispatch.h \
|
||||
../main/enums.c \
|
||||
../x86/glapi_x86.S \
|
||||
../x86-64/glapi_x86-64.S \
|
||||
../sparc/glapi_sparc.S \
|
||||
../drivers/dri/common/extension_helper.h \
|
||||
../../glx/x11/indirect.c \
|
||||
../../glx/x11/indirect.h \
|
||||
../../glx/x11/indirect_init.c \
|
||||
../../glx/x11/indirect_size.h \
|
||||
../../glx/x11/indirect_size.c
|
||||
|
||||
|
||||
#XORG_BASE = /home/idr/devel/graphics/Xorg/xserver/xorg
|
||||
GLX_DIR = $(XORG_BASE)/GL/glx
|
||||
|
||||
SERVER_OUTPUTS = $(GLX_DIR)/indirect_dispatch.c \
|
||||
$(GLX_DIR)/indirect.c \
|
||||
$(GLX_DIR)/indirect.h \
|
||||
$(GLX_DIR)/indirect_init.c \
|
||||
$(GLX_DIR)/indirect_size.h \
|
||||
$(GLX_DIR)/indirect_size.c \
|
||||
$(GLX_DIR)/indirect_dispatch.c \
|
||||
$(GLX_DIR)/indirect_dispatch_swap.c \
|
||||
$(GLX_DIR)/indirect_dispatch.h \
|
||||
$(GLX_DIR)/indirect_reqsize.c \
|
||||
@@ -39,81 +36,81 @@ API_XML = gl_API.xml \
|
||||
COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py
|
||||
COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
|
||||
|
||||
INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
|
||||
|
||||
all: $(OUTPUTS)
|
||||
|
||||
server: $(SERVER_OUTPUTS)
|
||||
glprocs.h: gl_procs.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glprocs.h: $(COMMON) gl_procs.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_procs.py > glprocs.h
|
||||
glapitemp.h: gl_apitemp.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glapitemp.h: $(COMMON) gl_apitemp.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_apitemp.py > glapitemp.h
|
||||
glapioffsets.h: gl_offsets.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glapioffsets.h: $(COMMON) gl_offsets.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_offsets.py > glapioffsets.h
|
||||
glapitable.h: gl_table.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glapitable.h: $(COMMON) gl_table.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_table.py > glapitable.h
|
||||
dispatch.h: gl_table.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
|
||||
|
||||
dispatch.h: $(COMMON) gl_table.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_table.py -m remap_table > dispatch.h
|
||||
../main/enums.c: gl_enums.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../main/enums.c: $(COMMON) gl_enums.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_enums.py > ../main/enums.c
|
||||
../x86/glapi_x86.S: gl_x86_asm.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../x86/glapi_x86.S: $(COMMON) gl_x86_asm.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_x86_asm.py > ../x86/glapi_x86.S
|
||||
../x86-64/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../x86-64/glapi_x86-64.S: $(COMMON) gl_x86-64_asm.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_x86-64_asm.py > ../x86-64/glapi_x86-64.S
|
||||
|
||||
../sparc/glapi_sparc.S: $(COMMON) gl_SPARC_asm.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_SPARC_asm.py > ../sparc/glapi_sparc.S
|
||||
../sparc/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
|
||||
../drivers/dri/common/extension_helper.h: $(COMMON) extension_helper.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) extension_helper.py > ../drivers/dri/common/extension_helper.h
|
||||
../drivers/dri/common/extension_helper.h: extension_helper.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../../glx/x11/indirect.c: $(COMMON_GLX) glX_proto_send.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m proto | indent $(INDENT_FLAGS) > ../../glx/x11/indirect.c
|
||||
$(GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
../../glx/x11/indirect.h: $(COMMON_GLX) glX_proto_send.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m init_h > ../../glx/x11/indirect.h
|
||||
$(GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@
|
||||
|
||||
../../glx/x11/indirect_init.c: $(COMMON_GLX) glX_proto_send.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m init_c > ../../glx/x11/indirect_init.c
|
||||
$(GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@
|
||||
|
||||
../../glx/x11/indirect_size.h: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-set -h _INDIRECT_SIZE_H_ | indent $(INDENT_FLAGS) > ../../glx/x11/indirect_size.h
|
||||
$(GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
|
||||
| $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
../../glx/x11/indirect_size.c: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c --only-set | indent $(INDENT_FLAGS) > ../../glx/x11/indirect_size.c
|
||||
$(GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \
|
||||
| $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_dispatch.c: $(COMMON_GLX) glX_proto_recv.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_c > $@
|
||||
$(GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c > $@
|
||||
|
||||
$(GLX_DIR)/indirect_dispatch_swap.c: $(COMMON_GLX) glX_proto_recv.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_c -s > $@
|
||||
$(GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c -s > $@
|
||||
|
||||
$(GLX_DIR)/indirect_dispatch.h: $(COMMON_GLX) glX_proto_recv.py glX_API.xml
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_h -f gl_and_glX_API.xml -s > $@
|
||||
$(GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
|
||||
|
||||
$(GLX_DIR)/indirect_size_get.h: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) > $@
|
||||
$(GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
|
||||
| $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_size_get.c: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c | indent $(INDENT_FLAGS) > $@
|
||||
$(GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_reqsize.h: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) -l200 > $@
|
||||
$(GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
|
||||
| $(INDENT) $(INDENT_FLAGS) -l200 > $@
|
||||
|
||||
$(GLX_DIR)/indirect_reqsize.c: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_c | indent $(INDENT_FLAGS) > $@
|
||||
$(GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_table.c: $(COMMON_GLX) glX_server_table.py glX_API.xml
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_server_table.py -f gl_and_glX_API.xml > $@
|
||||
$(GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@
|
||||
|
||||
clean:
|
||||
rm -f *~ *.pyo
|
||||
|
||||
@@ -4529,15 +4529,19 @@
|
||||
</enum>
|
||||
<enum name="POINT_SIZE_MIN" count="1" value="0x8126">
|
||||
<size name="PointParameterfvEXT"/>
|
||||
<size name="Get" mode="get"/>
|
||||
</enum>
|
||||
<enum name="POINT_SIZE_MAX" count="1" value="0x8127">
|
||||
<size name="PointParameterfvEXT"/>
|
||||
<size name="Get" mode="get"/>
|
||||
</enum>
|
||||
<enum name="POINT_FADE_THRESHOLD_SIZE" count="1" value="0x8128">
|
||||
<size name="PointParameterfvEXT"/>
|
||||
<size name="Get" mode="get"/>
|
||||
</enum>
|
||||
<enum name="POINT_DISTANCE_ATTENUATION" count="3" value="0x8129">
|
||||
<size name="PointParameterfvEXT"/>
|
||||
<size name="Get" mode="get"/>
|
||||
</enum>
|
||||
<enum name="GENERATE_MIPMAP" count="1" value="0x8191">
|
||||
<size name="TexParameterfv"/>
|
||||
|
||||
@@ -640,7 +640,12 @@ delete_framebuffer_cb(GLuint id, void *data, void *userData)
|
||||
*/
|
||||
/*assert(fb->RefCount == 1);*/
|
||||
fb->RefCount = 0;
|
||||
fb->Delete(fb);
|
||||
|
||||
/* NOTE: Delete should always be defined but there are two reports
|
||||
* of it being NULL (bugs 13507, 14293). Work-around for now.
|
||||
*/
|
||||
if (fb->Delete)
|
||||
fb->Delete(fb);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -682,10 +687,10 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
|
||||
_mesa_DeleteHashTable(ss->Programs);
|
||||
#endif
|
||||
#if FEATURE_ARB_vertex_program
|
||||
_mesa_delete_program(ctx, ss->DefaultVertexProgram);
|
||||
ctx->Driver.DeleteProgram(ctx, ss->DefaultVertexProgram);
|
||||
#endif
|
||||
#if FEATURE_ARB_fragment_program
|
||||
_mesa_delete_program(ctx, ss->DefaultFragmentProgram);
|
||||
ctx->Driver.DeleteProgram(ctx, ss->DefaultFragmentProgram);
|
||||
#endif
|
||||
|
||||
#if FEATURE_ATI_fragment_shader
|
||||
@@ -749,7 +754,7 @@ _mesa_init_current(GLcontext *ctx)
|
||||
}
|
||||
|
||||
/* redo special cases: */
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 1.0, 0.0, 0.0, 1.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 1.0, 0.0, 0.0, 0.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 );
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5
|
||||
* Version: 7.0.3
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2008 Brian Paul 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"),
|
||||
@@ -341,12 +341,10 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
|
||||
}
|
||||
|
||||
if (ctx->RenderMode == GL_RENDER) {
|
||||
if (bitmap) {
|
||||
/* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
|
||||
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
|
||||
}
|
||||
/* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
|
||||
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
|
||||
}
|
||||
#if _HAVE_FULL_GL
|
||||
else if (ctx->RenderMode == GL_FEEDBACK) {
|
||||
|
||||
@@ -302,7 +302,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
||||
/* OK */
|
||||
}
|
||||
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
/* OK */
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1864,6 +1864,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
|
||||
break;
|
||||
case GL_READ_FRAMEBUFFER_BINDING_EXT:
|
||||
CHECK_EXT1(EXT_framebuffer_blit, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->ReadBuffer->Name);
|
||||
break;
|
||||
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
|
||||
CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Const.FragmentProgram.MaxUniformComponents);
|
||||
@@ -3695,6 +3699,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
|
||||
break;
|
||||
case GL_READ_FRAMEBUFFER_BINDING_EXT:
|
||||
CHECK_EXT1(EXT_framebuffer_blit, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->ReadBuffer->Name);
|
||||
break;
|
||||
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
|
||||
CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Const.FragmentProgram.MaxUniformComponents);
|
||||
@@ -5526,6 +5534,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
|
||||
params[0] = ctx->Const.MaxRenderbufferSize;
|
||||
break;
|
||||
case GL_READ_FRAMEBUFFER_BINDING_EXT:
|
||||
CHECK_EXT1(EXT_framebuffer_blit, "GetIntegerv");
|
||||
params[0] = ctx->ReadBuffer->Name;
|
||||
break;
|
||||
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
|
||||
CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
|
||||
params[0] = ctx->Const.FragmentProgram.MaxUniformComponents;
|
||||
|
||||
@@ -977,6 +977,11 @@ StateVars = [
|
||||
["ctx->Const.MaxRenderbufferSize"], "",
|
||||
["EXT_framebuffer_object"] ),
|
||||
|
||||
# GL_EXT_framebuffer_blit
|
||||
# NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT
|
||||
( "GL_READ_FRAMEBUFFER_BINDING_EXT", GLint, ["ctx->ReadBuffer->Name"], "",
|
||||
["EXT_framebuffer_blit"] ),
|
||||
|
||||
# GL_ARB_fragment_shader
|
||||
( "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB", GLint,
|
||||
["ctx->Const.FragmentProgram.MaxUniformComponents"], "",
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if (!defined(__GNUC__) || __GNUC__ < 3) && !defined(__IBMC__)
|
||||
#if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900)
|
||||
# define __builtin_expect(x, y) x
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.2
|
||||
* Version: 7.0.3
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2008 Brian Paul 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"),
|
||||
@@ -159,7 +159,7 @@ typedef union { GLfloat f; GLint i; } fi_type;
|
||||
***/
|
||||
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
|
||||
defined(__s390x__) || defined(__powerpc__) || \
|
||||
defined(__amd64__) || \
|
||||
defined(__amd64__) || defined(__x86_64__) || \
|
||||
defined(ia64) || defined(__ia64__) || \
|
||||
defined(__hppa__) || defined(hpux) || \
|
||||
defined(__mips) || defined(_MIPS_ARCH) || \
|
||||
|
||||
@@ -960,7 +960,7 @@ update_program(GLcontext *ctx)
|
||||
ctx->FragmentProgram._Enabled = ctx->FragmentProgram.Enabled
|
||||
&& ctx->FragmentProgram.Current->Base.Instructions;
|
||||
ctx->ATIFragmentShader._Enabled = ctx->ATIFragmentShader.Enabled
|
||||
&& ctx->ATIFragmentShader.Current->Instructions;
|
||||
&& ctx->ATIFragmentShader.Current->Instructions[0];
|
||||
|
||||
/*
|
||||
* Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current
|
||||
|
||||
@@ -199,8 +199,8 @@ static void make_state_key( GLcontext *ctx, struct state_key *key )
|
||||
|
||||
for (i=0;i<MAX_TEXTURE_UNITS;i++) {
|
||||
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
|
||||
|
||||
if (!texUnit->_ReallyEnabled)
|
||||
|
||||
if (!texUnit->_ReallyEnabled || !texUnit->Enabled)
|
||||
continue;
|
||||
|
||||
key->unit[i].enabled = 1;
|
||||
|
||||
@@ -2177,9 +2177,6 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pixels)
|
||||
return;
|
||||
|
||||
_mesa_lock_texture(ctx, texObj);
|
||||
{
|
||||
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
|
||||
|
||||
@@ -854,7 +854,8 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
||||
newTexObj = ctx->Shared->DefaultRect;
|
||||
break;
|
||||
default:
|
||||
; /* Bad targets are caught above */
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glBindTexture(target)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -926,6 +927,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
||||
_mesa_reference_texobj(&texUnit->CurrentRect, newTexObj);
|
||||
break;
|
||||
default:
|
||||
/* Bad target should be caught above */
|
||||
_mesa_problem(ctx, "bad target in BindTexture");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -809,6 +809,7 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx,
|
||||
/* _mesa_printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */
|
||||
|
||||
if (srcRowStride == dstRowStride &&
|
||||
srcComponents == dstComponents &&
|
||||
srcRowStride == srcWidth * srcComponents &&
|
||||
dimensions < 3) {
|
||||
/* 1 and 2D images only */
|
||||
|
||||
@@ -443,7 +443,7 @@ void GLAPIENTRY
|
||||
_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
|
||||
GLsizei stride, const GLvoid *ptr)
|
||||
{
|
||||
const GLboolean normalized = GL_FALSE;
|
||||
GLboolean normalized = GL_FALSE;
|
||||
GLsizei elementSize;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
@@ -471,6 +471,7 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
|
||||
/* check for valid 'type' and compute StrideB right away */
|
||||
switch (type) {
|
||||
case GL_UNSIGNED_BYTE:
|
||||
normalized = GL_TRUE;
|
||||
elementSize = size * sizeof(GLubyte);
|
||||
break;
|
||||
case GL_SHORT:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.0.3
|
||||
*
|
||||
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2008 Brian Paul 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"),
|
||||
@@ -31,7 +31,7 @@
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 0
|
||||
#define MESA_PATCH 3
|
||||
#define MESA_VERSION_STRING "7.0.3"
|
||||
#define MESA_VERSION_STRING "7.0.3-rc3"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
||||
@@ -1609,8 +1609,6 @@ parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst,
|
||||
program_error(ctx, Program->Position, "Bad attribute binding");
|
||||
}
|
||||
|
||||
Program->Base.InputsRead |= (1 << *inputReg);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -2565,6 +2563,11 @@ parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Add attributes to InputsRead only if they are used the program.
|
||||
* This avoids the handling of unused ATTRIB declarations in the drivers. */
|
||||
if (*File == PROGRAM_INPUT)
|
||||
Program->Base.InputsRead |= (1 << *Index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3916,7 +3919,7 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target,
|
||||
ASSERT(target == GL_VERTEX_PROGRAM_ARB);
|
||||
|
||||
if (!_mesa_parse_arb_program(ctx, target, (const GLubyte*) str, len, &ap)) {
|
||||
/* Error in the program. Just return. */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glProgramString(bad program)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
||||
struct gl_vertex_program *prog = ctx->VertexProgram.Current;
|
||||
_mesa_parse_arb_vertex_program(ctx, target, string, len, prog);
|
||||
|
||||
if (ctx->Driver.ProgramStringNotify)
|
||||
if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
|
||||
ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
|
||||
}
|
||||
else if (target == GL_FRAGMENT_PROGRAM_ARB
|
||||
@@ -237,7 +237,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
||||
struct gl_fragment_program *prog = ctx->FragmentProgram.Current;
|
||||
_mesa_parse_arb_fragment_program(ctx, target, string, len, prog);
|
||||
|
||||
if (ctx->Driver.ProgramStringNotify)
|
||||
if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
|
||||
ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1904,10 +1904,10 @@ stateTexEnvProperty
|
||||
fragment program
|
||||
<optLegacyTexUnitNum> ::= ""
|
||||
| "[" <legacyTexUnitNum> "]"
|
||||
|
||||
NOTE: <optLegaceTexUnitNum> is not optional.
|
||||
*/
|
||||
optLegacyTexUnitNum
|
||||
optLegacyTexUnitNum_1 .or .true .emit 0x00;
|
||||
optLegacyTexUnitNum_1
|
||||
lbracket_ne .and legacyTexUnitNum .and rbracket;
|
||||
|
||||
/*
|
||||
@@ -2605,14 +2605,14 @@ white_char
|
||||
' ' .or '\t' .or '\n' .or '\r';
|
||||
|
||||
comment_block
|
||||
'#' .and .loop comment_char .and new_line;
|
||||
'#' .and .loop comment_char .and optional_new_line;
|
||||
|
||||
/* All ASCII characters except '\r', '\n' and '\0' */
|
||||
comment_char
|
||||
'\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
|
||||
|
||||
new_line
|
||||
'\n' .or crlf .or '\0';
|
||||
optional_new_line
|
||||
'\n' .or crlf .or .true;
|
||||
|
||||
crlf
|
||||
'\r' .and '\n';
|
||||
|
||||
@@ -905,6 +905,8 @@
|
||||
"stateTexEnvProperty\n"
|
||||
" \"color\" .emit TEX_ENV_COLOR;\n"
|
||||
"optLegacyTexUnitNum\n"
|
||||
" optLegacyTexUnitNum_1 .or .true .emit 0x00;\n"
|
||||
"optLegacyTexUnitNum_1\n"
|
||||
" lbracket_ne .and legacyTexUnitNum .and rbracket;\n"
|
||||
"legacyTexUnitNum\n"
|
||||
" integer;\n"
|
||||
@@ -1221,11 +1223,11 @@
|
||||
"white_char\n"
|
||||
" ' ' .or '\\t' .or '\\n' .or '\\r';\n"
|
||||
"comment_block\n"
|
||||
" '#' .and .loop comment_char .and new_line;\n"
|
||||
" '#' .and .loop comment_char .and optional_new_line;\n"
|
||||
"comment_char\n"
|
||||
" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
|
||||
"new_line\n"
|
||||
" '\\n' .or crlf .or '\\0';\n"
|
||||
"optional_new_line\n"
|
||||
" '\\n' .or crlf .or .true;\n"
|
||||
"crlf\n"
|
||||
" '\\r' .and '\\n';\n"
|
||||
"semicolon\n"
|
||||
|
||||
@@ -181,7 +181,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
||||
ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][i];
|
||||
}
|
||||
/* [3] = material alpha */
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3];
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][3];
|
||||
return;
|
||||
case STATE_DIFFUSE:
|
||||
for (i = 0; i < 3; i++) {
|
||||
@@ -197,7 +197,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
||||
ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][i];
|
||||
}
|
||||
/* [3] = material alpha */
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3];
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][3];
|
||||
return;
|
||||
default:
|
||||
_mesa_problem(ctx, "Invalid lightprod state in fetch_state");
|
||||
@@ -349,7 +349,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
||||
value[0] = ctx->Viewport.Near; /* near */
|
||||
value[1] = ctx->Viewport.Far; /* far */
|
||||
value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */
|
||||
value[3] = 0;
|
||||
value[3] = 1.0;
|
||||
return;
|
||||
case STATE_FRAGMENT_PROGRAM:
|
||||
{
|
||||
|
||||
@@ -343,7 +343,7 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
|
||||
clone->Format = prog->Format;
|
||||
clone->Instructions = _mesa_alloc_instructions(prog->NumInstructions);
|
||||
if (!clone->Instructions) {
|
||||
_mesa_delete_program(ctx, clone);
|
||||
ctx->Driver.DeleteProgram(ctx, clone);
|
||||
return NULL;
|
||||
}
|
||||
_mesa_copy_instructions(clone->Instructions, prog->Instructions,
|
||||
|
||||
@@ -80,7 +80,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx,
|
||||
/* to prevent a double-free in the next call */
|
||||
shProg->VertexProgram->Base.Parameters = NULL;
|
||||
}
|
||||
_mesa_delete_program(ctx, &shProg->VertexProgram->Base);
|
||||
ctx->Driver.DeleteProgram(ctx, &shProg->VertexProgram->Base);
|
||||
shProg->VertexProgram = NULL;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx,
|
||||
/* to prevent a double-free in the next call */
|
||||
shProg->FragmentProgram->Base.Parameters = NULL;
|
||||
}
|
||||
_mesa_delete_program(ctx, &shProg->FragmentProgram->Base);
|
||||
ctx->Driver.DeleteProgram(ctx, &shProg->FragmentProgram->Base);
|
||||
shProg->FragmentProgram = NULL;
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ _mesa_free_shader(GLcontext *ctx, struct gl_shader *sh)
|
||||
_mesa_free(sh->InfoLog);
|
||||
for (i = 0; i < sh->NumPrograms; i++) {
|
||||
assert(sh->Programs[i]);
|
||||
_mesa_delete_program(ctx, sh->Programs[i]);
|
||||
ctx->Driver.DeleteProgram(ctx, sh->Programs[i]);
|
||||
}
|
||||
if (sh->Programs)
|
||||
_mesa_free(sh->Programs);
|
||||
|
||||
@@ -343,6 +343,7 @@ vec4 asin(const vec4 v)
|
||||
__retVal.x = asin(v.x);
|
||||
__retVal.y = asin(v.y);
|
||||
__retVal.z = asin(v.z);
|
||||
__retVal.w = asin(v.w);
|
||||
}
|
||||
|
||||
float acos(const float x)
|
||||
|
||||
@@ -181,47 +181,48 @@
|
||||
0,1,0,12,0,97,115,105,110,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,
|
||||
115,105,110,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,115,105,
|
||||
110,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,115,105,110,0,
|
||||
18,118,0,59,122,0,0,0,20,0,0,1,0,9,0,97,99,111,115,0,1,1,0,9,120,0,0,0,1,3,2,1,9,1,104,97,108,102,
|
||||
80,105,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0,53,0,0,48,0,0,9,18,95,95,114,101,116,86,97,108,
|
||||
0,18,104,97,108,102,80,105,0,58,97,115,105,110,0,18,120,0,0,0,47,20,0,0,1,0,10,0,97,99,111,115,0,1,
|
||||
1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,99,111,115,0,18,118,0,59,120,
|
||||
0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,20,
|
||||
0,0,1,0,11,0,97,99,111,115,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,
|
||||
97,99,111,115,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,99,
|
||||
111,115,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,99,111,115,
|
||||
0,18,118,0,59,122,0,0,0,20,0,0,1,0,12,0,97,99,111,115,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,
|
||||
116,86,97,108,0,59,120,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,
|
||||
97,108,0,59,121,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
|
||||
59,122,0,58,97,99,111,115,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,
|
||||
58,97,99,111,115,0,18,118,0,59,119,0,0,0,20,0,0,1,0,9,0,97,116,97,110,0,1,1,0,9,120,0,0,0,1,9,18,
|
||||
95,95,114,101,116,86,97,108,0,58,97,115,105,110,0,18,120,0,58,105,110,118,101,114,115,101,115,113,
|
||||
114,116,0,18,120,0,18,120,0,48,17,49,0,48,0,0,46,0,0,48,0,0,20,0,0,1,0,10,0,97,116,97,110,0,1,1,0,
|
||||
10,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,
|
||||
110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
|
||||
121,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,20,0,0,1,0,11,0,97,116,97,
|
||||
110,0,1,1,0,11,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,
|
||||
58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,
|
||||
97,108,0,59,121,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,20,0,9,18,95,
|
||||
95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,122,0,
|
||||
0,0,20,0,0,1,0,12,0,97,116,97,110,0,1,1,0,12,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,
|
||||
101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,
|
||||
0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,
|
||||
0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,18,121,95,111,
|
||||
118,101,114,95,120,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,
|
||||
110,0,18,121,95,111,118,101,114,95,120,0,59,119,0,0,0,20,0,0,1,0,9,0,97,116,97,110,0,1,1,0,9,121,0,
|
||||
0,1,1,0,9,120,0,0,0,1,10,18,120,0,17,48,0,48,0,0,38,0,8,17,48,0,48,0,0,0,9,14,0,3,2,0,9,1,122,0,2,
|
||||
58,97,116,97,110,0,18,121,0,18,120,0,49,0,0,0,0,10,18,120,0,17,48,0,48,0,0,40,0,2,10,18,121,0,17,
|
||||
48,0,48,0,0,40,0,8,18,122,0,17,51,0,49,52,49,53,57,51,0,0,47,0,9,14,0,8,18,122,0,17,51,0,49,52,49,
|
||||
53,57,51,0,0,46,0,0,9,14,0,8,18,122,0,0,0,1,0,10,0,97,116,97,110,0,1,1,0,10,117,0,0,1,1,0,10,118,0,
|
||||
0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,
|
||||
59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,117,0,59,121,0,
|
||||
0,18,118,0,59,121,0,0,0,20,0,0,1,0,11,0,97,116,97,110,0,1,1,0,11,117,0,0,1,1,0,11,118,0,0,0,1,9,18,
|
||||
95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,
|
||||
0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,117,0,59,121,0,0,18,118,0,
|
||||
59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,18,117,0,59,122,0,
|
||||
0,18,118,0,59,122,0,0,0,20,0,0,1,0,12,0,97,116,97,110,0,1,1,0,12,117,0,0,1,1,0,12,118,0,0,0,1,9,18,
|
||||
95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,
|
||||
0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,117,0,59,121,0,0,18,118,0,
|
||||
18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,115,105,110,0,18,118,
|
||||
0,59,119,0,0,0,20,0,0,1,0,9,0,97,99,111,115,0,1,1,0,9,120,0,0,0,1,3,2,1,9,1,104,97,108,102,80,105,
|
||||
0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0,53,0,0,48,0,0,9,18,95,95,114,101,116,86,97,108,0,18,
|
||||
104,97,108,102,80,105,0,58,97,115,105,110,0,18,120,0,0,0,47,20,0,0,1,0,10,0,97,99,111,115,0,1,1,0,
|
||||
10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,99,111,115,0,18,118,0,59,120,0,0,
|
||||
0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,20,0,0,
|
||||
1,0,11,0,97,99,111,115,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,99,
|
||||
111,115,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,99,111,115,
|
||||
0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,99,111,115,0,18,118,
|
||||
0,59,122,0,0,0,20,0,0,1,0,12,0,97,99,111,115,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,
|
||||
108,0,59,120,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
|
||||
121,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,
|
||||
97,99,111,115,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,99,
|
||||
111,115,0,18,118,0,59,119,0,0,0,20,0,0,1,0,9,0,97,116,97,110,0,1,1,0,9,120,0,0,0,1,9,18,95,95,114,
|
||||
101,116,86,97,108,0,58,97,115,105,110,0,18,120,0,58,105,110,118,101,114,115,101,115,113,114,116,0,
|
||||
18,120,0,18,120,0,48,17,49,0,48,0,0,46,0,0,48,0,0,20,0,0,1,0,10,0,97,116,97,110,0,1,1,0,10,121,95,
|
||||
111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,
|
||||
121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,
|
||||
97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,20,0,0,1,0,11,0,97,116,97,110,0,1,
|
||||
1,0,11,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,
|
||||
97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
|
||||
59,121,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,20,0,9,18,95,95,114,
|
||||
101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,122,0,0,0,20,
|
||||
0,0,1,0,12,0,97,116,97,110,0,1,1,0,12,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,
|
||||
86,97,108,0,59,120,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,
|
||||
95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,
|
||||
121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,18,121,95,111,118,
|
||||
101,114,95,120,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,
|
||||
18,121,95,111,118,101,114,95,120,0,59,119,0,0,0,20,0,0,1,0,9,0,97,116,97,110,0,1,1,0,9,121,0,0,1,1,
|
||||
0,9,120,0,0,0,1,10,18,120,0,17,48,0,48,0,0,38,0,8,17,48,0,48,0,0,0,9,14,0,3,2,0,9,1,122,0,2,58,97,
|
||||
116,97,110,0,18,121,0,18,120,0,49,0,0,0,0,10,18,120,0,17,48,0,48,0,0,40,0,2,10,18,121,0,17,48,0,48,
|
||||
0,0,40,0,8,18,122,0,17,51,0,49,52,49,53,57,51,0,0,47,0,9,14,0,8,18,122,0,17,51,0,49,52,49,53,57,51,
|
||||
0,0,46,0,0,9,14,0,8,18,122,0,0,0,1,0,10,0,97,116,97,110,0,1,1,0,10,117,0,0,1,1,0,10,118,0,0,0,1,9,
|
||||
18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,
|
||||
0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,117,0,59,121,0,0,18,118,
|
||||
0,59,121,0,0,0,20,0,0,1,0,11,0,97,116,97,110,0,1,1,0,11,117,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,
|
||||
114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,20,0,
|
||||
9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,117,0,59,121,0,0,18,118,0,59,121,
|
||||
0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,18,117,0,59,122,0,0,18,
|
||||
118,0,59,122,0,0,0,20,0,0,1,0,12,0,97,116,97,110,0,1,1,0,12,117,0,0,1,1,0,12,118,0,0,0,1,9,18,95,
|
||||
95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,
|
||||
20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,18,117,0,59,121,0,0,18,118,0,
|
||||
59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,18,117,0,59,122,0,
|
||||
0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,18,117,
|
||||
0,59,119,0,0,18,118,0,59,119,0,0,0,20,0,0,1,0,9,0,112,111,119,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,
|
||||
|
||||
@@ -677,6 +677,7 @@ static struct prog_instruction *
|
||||
emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
{
|
||||
struct prog_instruction *inst;
|
||||
slang_ir_node tmpNode;
|
||||
|
||||
assert(n->Opcode == IR_CLAMP);
|
||||
/* ch[0] = value
|
||||
@@ -722,18 +723,27 @@ emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
emit(emitInfo, n->Children[1]);
|
||||
emit(emitInfo, n->Children[2]);
|
||||
|
||||
/* Some GPUs don't allow reading from output registers. So if the
|
||||
* dest for this clamp() is an output reg, we can't use that reg for
|
||||
* the intermediate result. Use a temp register instead.
|
||||
*/
|
||||
_mesa_bzero(&tmpNode, sizeof(tmpNode));
|
||||
alloc_temp_storage(emitInfo, &tmpNode, n->Store->Size);
|
||||
|
||||
/* tmp = max(ch[0], ch[1]) */
|
||||
inst = new_instruction(emitInfo, OPCODE_MAX);
|
||||
storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
|
||||
storage_to_dst_reg(&inst->DstReg, tmpNode.Store, n->Writemask);
|
||||
storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store);
|
||||
storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store);
|
||||
|
||||
/* tmp = min(tmp, ch[2]) */
|
||||
/* n->dest = min(tmp, ch[2]) */
|
||||
inst = new_instruction(emitInfo, OPCODE_MIN);
|
||||
storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
|
||||
storage_to_src_reg(&inst->SrcReg[0], n->Store);
|
||||
storage_to_src_reg(&inst->SrcReg[0], tmpNode.Store);
|
||||
storage_to_src_reg(&inst->SrcReg[1], n->Children[2]->Store);
|
||||
|
||||
free_temp_storage(emitInfo->vt, &tmpNode);
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
|
||||
@@ -860,7 +860,8 @@ _swrast_DrawPixels( GLcontext *ctx,
|
||||
format, type, pixels)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glDrawPixels(invalid PBO access)");
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
GL_READ_ONLY_ARB,
|
||||
@@ -868,7 +869,8 @@ _swrast_DrawPixels( GLcontext *ctx,
|
||||
if (!buf) {
|
||||
/* buffer is already mapped - that's an error */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(PBO is mapped)");
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
pixels = ADD_POINTERS(buf, pixels);
|
||||
}
|
||||
@@ -908,8 +910,6 @@ _swrast_DrawPixels( GLcontext *ctx,
|
||||
/* don't return yet, clean-up */
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
RENDER_FINISH(swrast,ctx);
|
||||
|
||||
if (unpack->BufferObj->Name) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.3
|
||||
* Version: 7.0.3
|
||||
*
|
||||
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2008 Brian Paul 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"),
|
||||
@@ -218,9 +218,9 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
|
||||
}
|
||||
else {
|
||||
/* even size */
|
||||
xmin = (GLint) vert->win[0] - iRadius;
|
||||
xmin = (GLint) (vert->win[0] + 0.5) - iRadius;
|
||||
xmax = xmin + iSize - 1;
|
||||
ymin = (GLint) vert->win[1] - iRadius;
|
||||
ymin = (GLint) (vert->win[1] + 0.5) - iRadius;
|
||||
ymax = ymin + iSize - 1;
|
||||
}
|
||||
#endif /*SMOOTH*/
|
||||
|
||||
@@ -570,7 +570,8 @@ _swrast_ReadPixels( GLcontext *ctx,
|
||||
/* Do all needed clipping here, so that we can forget about it later */
|
||||
if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) {
|
||||
/* The ReadPixels region is totally outside the window bounds */
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
if (clippedPacking.BufferObj->Name) {
|
||||
@@ -580,7 +581,8 @@ _swrast_ReadPixels( GLcontext *ctx,
|
||||
format, type, pixels)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glReadPixels(invalid PBO access)");
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
|
||||
GL_WRITE_ONLY_ARB,
|
||||
@@ -588,7 +590,8 @@ _swrast_ReadPixels( GLcontext *ctx,
|
||||
if (!buf) {
|
||||
/* buffer is already mapped - that's an error */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(PBO is mapped)");
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
pixels = ADD_POINTERS(buf, pixels);
|
||||
}
|
||||
@@ -629,8 +632,6 @@ _swrast_ReadPixels( GLcontext *ctx,
|
||||
/* don't return yet, clean-up */
|
||||
}
|
||||
|
||||
|
||||
end:
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
|
||||
if (clippedPacking.BufferObj->Name) {
|
||||
|
||||
@@ -648,12 +648,12 @@ void _tnl_generate_sse_emit( GLcontext *ctx )
|
||||
|
||||
p.ctx = ctx;
|
||||
p.inputs_safe = 0; /* for now */
|
||||
p.outputs_safe = 1; /* for now */
|
||||
p.outputs_safe = 0; /* for now */
|
||||
p.have_sse2 = cpu_has_xmm2;
|
||||
p.identity = x86_make_reg(file_XMM, 6);
|
||||
p.chan0 = x86_make_reg(file_XMM, 7);
|
||||
|
||||
if (!x86_init_func(&p.func, MAX_SSE_CODE_SIZE)) {
|
||||
if (!x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE)) {
|
||||
vtx->emit = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,4 +162,7 @@ void vbo_exec_do_EvalCoord2f( struct vbo_exec_context *exec,
|
||||
void vbo_exec_do_EvalCoord1f( struct vbo_exec_context *exec,
|
||||
GLfloat u);
|
||||
|
||||
extern GLboolean
|
||||
vbo_validate_shaders(GLcontext *ctx);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -477,6 +477,23 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j )
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if programs/shaders are enabled and valid at glBegin time.
|
||||
*/
|
||||
GLboolean
|
||||
vbo_validate_shaders(GLcontext *ctx)
|
||||
{
|
||||
if ((ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) ||
|
||||
(ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled)) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
if (ctx->Shader.CurrentProgram && !ctx->Shader.CurrentProgram->LinkStatus) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* Build a list of primitives on the fly. Keep
|
||||
* ctx->Driver.CurrentExecPrimitive uptodate as well.
|
||||
*/
|
||||
@@ -491,18 +508,16 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
|
||||
if (ctx->NewState) {
|
||||
_mesa_update_state( ctx );
|
||||
|
||||
/* XXX also need to check if shader enabled, but invalid */
|
||||
if ((ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) ||
|
||||
(ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBegin (invalid vertex/fragment program)");
|
||||
return;
|
||||
}
|
||||
|
||||
CALL_Begin(ctx->Exec, (mode));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!vbo_validate_shaders(ctx)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBegin (invalid vertex/fragment program)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Heuristic: attempt to isolate attributes occuring outside
|
||||
* begin/end pairs.
|
||||
*/
|
||||
|
||||
@@ -245,6 +245,11 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state( ctx );
|
||||
|
||||
if (!vbo_validate_shaders(ctx)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawArrays(bad shader)");
|
||||
return;
|
||||
}
|
||||
|
||||
bind_arrays( ctx );
|
||||
|
||||
prim[0].begin = 1;
|
||||
@@ -280,6 +285,11 @@ vbo_exec_DrawRangeElements(GLenum mode,
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state( ctx );
|
||||
|
||||
if (!vbo_validate_shaders(ctx)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements(bad shader)");
|
||||
return;
|
||||
}
|
||||
|
||||
bind_arrays( ctx );
|
||||
|
||||
ib.count = count;
|
||||
@@ -340,6 +350,11 @@ vbo_exec_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *ind
|
||||
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
|
||||
return;
|
||||
|
||||
if (!vbo_validate_shaders(ctx)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawElements(bad shader)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Array.ElementArrayBufferObj->Name) {
|
||||
const GLvoid *map = ctx->Driver.MapBuffer(ctx,
|
||||
GL_ELEMENT_ARRAY_BUFFER_ARB,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
||||
#if defined(__i386__) || defined(__386__)
|
||||
|
||||
#include "imports.h"
|
||||
#include "x86sse.h"
|
||||
@@ -6,54 +6,78 @@
|
||||
#define DISASSEM 0
|
||||
#define X86_TWOB 0x0f
|
||||
|
||||
static unsigned char *cptr( void (*label)() )
|
||||
{
|
||||
return (unsigned char *)(unsigned long)label;
|
||||
}
|
||||
|
||||
|
||||
static void do_realloc( struct x86_function *p )
|
||||
{
|
||||
if (p->size == 0) {
|
||||
p->size = 1024;
|
||||
p->store = _mesa_exec_malloc(p->size);
|
||||
p->csr = p->store;
|
||||
}
|
||||
else {
|
||||
unsigned used = p->csr - p->store;
|
||||
unsigned char *tmp = p->store;
|
||||
p->size *= 2;
|
||||
p->store = _mesa_exec_malloc(p->size);
|
||||
memcpy(p->store, tmp, used);
|
||||
p->csr = p->store + used;
|
||||
_mesa_exec_free(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit bytes to the instruction stream:
|
||||
*/
|
||||
static void emit_1b( struct x86_function *p, GLbyte b0 )
|
||||
static unsigned char *reserve( struct x86_function *p, int bytes )
|
||||
{
|
||||
*(GLbyte *)(p->csr++) = b0;
|
||||
}
|
||||
if (p->csr + bytes - p->store > p->size)
|
||||
do_realloc(p);
|
||||
|
||||
static void emit_1i( struct x86_function *p, GLint i0 )
|
||||
{
|
||||
*(GLint *)(p->csr) = i0;
|
||||
p->csr += 4;
|
||||
}
|
||||
|
||||
static void disassem( struct x86_function *p, const char *fn )
|
||||
{
|
||||
#if DISASSEM && 0
|
||||
if (fn && fn != p->fn) {
|
||||
_mesa_printf("0x%x: %s\n", p->csr, fn);
|
||||
p->fn = fn;
|
||||
{
|
||||
unsigned char *csr = p->csr;
|
||||
p->csr += bytes;
|
||||
return csr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void emit_1ub_fn( struct x86_function *p, GLubyte b0, const char *fn )
|
||||
|
||||
|
||||
static void emit_1b( struct x86_function *p, char b0 )
|
||||
{
|
||||
disassem(p, fn);
|
||||
*(p->csr++) = b0;
|
||||
char *csr = (char *)reserve(p, 1);
|
||||
*csr = b0;
|
||||
}
|
||||
|
||||
static void emit_2ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, const char *fn )
|
||||
static void emit_1i( struct x86_function *p, int i0 )
|
||||
{
|
||||
disassem(p, fn);
|
||||
*(p->csr++) = b0;
|
||||
*(p->csr++) = b1;
|
||||
int *icsr = (int *)reserve(p, sizeof(i0));
|
||||
*icsr = i0;
|
||||
}
|
||||
|
||||
static void emit_3ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, GLubyte b2, const char *fn )
|
||||
static void emit_1ub( struct x86_function *p, unsigned char b0 )
|
||||
{
|
||||
disassem(p, fn);
|
||||
*(p->csr++) = b0;
|
||||
*(p->csr++) = b1;
|
||||
*(p->csr++) = b2;
|
||||
unsigned char *csr = reserve(p, 1);
|
||||
*csr++ = b0;
|
||||
}
|
||||
|
||||
#define emit_1ub(p, b0) emit_1ub_fn(p, b0, __FUNCTION__)
|
||||
#define emit_2ub(p, b0, b1) emit_2ub_fn(p, b0, b1, __FUNCTION__)
|
||||
#define emit_3ub(p, b0, b1, b2) emit_3ub_fn(p, b0, b1, b2, __FUNCTION__)
|
||||
static void emit_2ub( struct x86_function *p, unsigned char b0, unsigned char b1 )
|
||||
{
|
||||
unsigned char *csr = reserve(p, 2);
|
||||
*csr++ = b0;
|
||||
*csr++ = b1;
|
||||
}
|
||||
|
||||
static void emit_3ub( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2 )
|
||||
{
|
||||
unsigned char *csr = reserve(p, 3);
|
||||
*csr++ = b0;
|
||||
*csr++ = b1;
|
||||
*csr++ = b2;
|
||||
}
|
||||
|
||||
|
||||
/* Build a modRM byte + possible displacement. No treatment of SIB
|
||||
@@ -63,7 +87,7 @@ static void emit_modrm( struct x86_function *p,
|
||||
struct x86_reg reg,
|
||||
struct x86_reg regmem )
|
||||
{
|
||||
GLubyte val = 0;
|
||||
unsigned char val = 0;
|
||||
|
||||
assert(reg.mod == mod_REG);
|
||||
|
||||
@@ -71,13 +95,13 @@ static void emit_modrm( struct x86_function *p,
|
||||
val |= reg.idx << 3; /* reg field */
|
||||
val |= regmem.idx; /* r/m field */
|
||||
|
||||
emit_1ub_fn(p, val, 0);
|
||||
emit_1ub(p, val);
|
||||
|
||||
/* Oh-oh we've stumbled into the SIB thing.
|
||||
*/
|
||||
if (regmem.file == file_REG32 &&
|
||||
regmem.idx == reg_SP) {
|
||||
emit_1ub_fn(p, 0x24, 0); /* simplistic! */
|
||||
emit_1ub(p, 0x24); /* simplistic! */
|
||||
}
|
||||
|
||||
switch (regmem.mod) {
|
||||
@@ -98,7 +122,7 @@ static void emit_modrm( struct x86_function *p,
|
||||
|
||||
|
||||
static void emit_modrm_noreg( struct x86_function *p,
|
||||
GLuint op,
|
||||
unsigned op,
|
||||
struct x86_reg regmem )
|
||||
{
|
||||
struct x86_reg dummy = x86_make_reg(file_REG32, op);
|
||||
@@ -111,21 +135,21 @@ static void emit_modrm_noreg( struct x86_function *p,
|
||||
* the arguments presented.
|
||||
*/
|
||||
static void emit_op_modrm( struct x86_function *p,
|
||||
GLubyte op_dst_is_reg,
|
||||
GLubyte op_dst_is_mem,
|
||||
unsigned char op_dst_is_reg,
|
||||
unsigned char op_dst_is_mem,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
switch (dst.mod) {
|
||||
case mod_REG:
|
||||
emit_1ub_fn(p, op_dst_is_reg, 0);
|
||||
emit_1ub(p, op_dst_is_reg);
|
||||
emit_modrm(p, dst, src);
|
||||
break;
|
||||
case mod_INDIRECT:
|
||||
case mod_DISP32:
|
||||
case mod_DISP8:
|
||||
assert(src.mod == mod_REG);
|
||||
emit_1ub_fn(p, op_dst_is_mem, 0);
|
||||
emit_1ub(p, op_dst_is_mem);
|
||||
emit_modrm(p, src, dst);
|
||||
break;
|
||||
default:
|
||||
@@ -156,7 +180,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file,
|
||||
}
|
||||
|
||||
struct x86_reg x86_make_disp( struct x86_reg reg,
|
||||
GLint disp )
|
||||
int disp )
|
||||
{
|
||||
assert(reg.file == file_REG32);
|
||||
|
||||
@@ -185,7 +209,7 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg )
|
||||
return x86_make_reg( reg.file, reg.idx );
|
||||
}
|
||||
|
||||
GLubyte *x86_get_label( struct x86_function *p )
|
||||
unsigned char *x86_get_label( struct x86_function *p )
|
||||
{
|
||||
return p->csr;
|
||||
}
|
||||
@@ -199,13 +223,13 @@ GLubyte *x86_get_label( struct x86_function *p )
|
||||
|
||||
void x86_jcc( struct x86_function *p,
|
||||
enum x86_cc cc,
|
||||
GLubyte *label )
|
||||
unsigned char *label )
|
||||
{
|
||||
GLint offset = label - (x86_get_label(p) + 2);
|
||||
int offset = label - (x86_get_label(p) + 2);
|
||||
|
||||
if (offset <= 127 && offset >= -128) {
|
||||
emit_1ub(p, 0x70 + cc);
|
||||
emit_1b(p, (GLbyte) offset);
|
||||
emit_1b(p, (char) offset);
|
||||
}
|
||||
else {
|
||||
offset = label - (x86_get_label(p) + 6);
|
||||
@@ -216,7 +240,7 @@ void x86_jcc( struct x86_function *p,
|
||||
|
||||
/* Always use a 32bit offset for forward jumps:
|
||||
*/
|
||||
GLubyte *x86_jcc_forward( struct x86_function *p,
|
||||
unsigned char *x86_jcc_forward( struct x86_function *p,
|
||||
enum x86_cc cc )
|
||||
{
|
||||
emit_2ub(p, 0x0f, 0x80 + cc);
|
||||
@@ -224,14 +248,14 @@ GLubyte *x86_jcc_forward( struct x86_function *p,
|
||||
return x86_get_label(p);
|
||||
}
|
||||
|
||||
GLubyte *x86_jmp_forward( struct x86_function *p)
|
||||
unsigned char *x86_jmp_forward( struct x86_function *p)
|
||||
{
|
||||
emit_1ub(p, 0xe9);
|
||||
emit_1i(p, 0);
|
||||
return x86_get_label(p);
|
||||
}
|
||||
|
||||
GLubyte *x86_call_forward( struct x86_function *p)
|
||||
unsigned char *x86_call_forward( struct x86_function *p)
|
||||
{
|
||||
emit_1ub(p, 0xe8);
|
||||
emit_1i(p, 0);
|
||||
@@ -241,28 +265,41 @@ GLubyte *x86_call_forward( struct x86_function *p)
|
||||
/* Fixup offset from forward jump:
|
||||
*/
|
||||
void x86_fixup_fwd_jump( struct x86_function *p,
|
||||
GLubyte *fixup )
|
||||
unsigned char *fixup )
|
||||
{
|
||||
*(int *)(fixup - 4) = x86_get_label(p) - fixup;
|
||||
}
|
||||
|
||||
void x86_jmp( struct x86_function *p, GLubyte *label)
|
||||
void x86_jmp( struct x86_function *p, unsigned char *label)
|
||||
{
|
||||
emit_1ub(p, 0xe9);
|
||||
emit_1i(p, label - x86_get_label(p) - 4);
|
||||
}
|
||||
|
||||
void x86_call( struct x86_function *p, GLubyte *label)
|
||||
#if 0
|
||||
/* This doesn't work once we start reallocating & copying the
|
||||
* generated code on buffer fills, because the call is relative to the
|
||||
* current pc.
|
||||
*/
|
||||
void x86_call( struct x86_function *p, void (*label)())
|
||||
{
|
||||
emit_1ub(p, 0xe8);
|
||||
emit_1i(p, label - x86_get_label(p) - 4);
|
||||
emit_1i(p, cptr(label) - x86_get_label(p) - 4);
|
||||
}
|
||||
#else
|
||||
void x86_call( struct x86_function *p, struct x86_reg reg)
|
||||
{
|
||||
emit_1ub(p, 0xff);
|
||||
emit_modrm(p, reg, reg);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* michal:
|
||||
* Temporary. As I need immediate operands, and dont want to mess with the codegen,
|
||||
* I load the immediate into general purpose register and use it.
|
||||
*/
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm )
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm )
|
||||
{
|
||||
assert(dst.mod == mod_REG);
|
||||
emit_1ub(p, 0xb8 + dst.idx);
|
||||
@@ -502,6 +539,14 @@ void sse_addss( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_andnps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x55);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_andps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
@@ -510,6 +555,13 @@ void sse_andps( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_rsqrtps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x52);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_rsqrtss( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
@@ -538,6 +590,21 @@ void sse_movlhps( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_orps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x56);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_xorps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x57);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_cvtps2pi( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
@@ -559,7 +626,7 @@ void sse_cvtps2pi( struct x86_function *p,
|
||||
void sse_shufps( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg arg0,
|
||||
GLubyte shuf)
|
||||
unsigned char shuf)
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0xC6);
|
||||
emit_modrm(p, dest, arg0);
|
||||
@@ -569,13 +636,21 @@ void sse_shufps( struct x86_function *p,
|
||||
void sse_cmpps( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg arg0,
|
||||
GLubyte cc)
|
||||
unsigned char cc)
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0xC2);
|
||||
emit_modrm(p, dest, arg0);
|
||||
emit_1ub(p, cc);
|
||||
}
|
||||
|
||||
void sse_pmovmskb( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg src)
|
||||
{
|
||||
emit_3ub(p, 0x66, X86_TWOB, 0xD7);
|
||||
emit_modrm(p, dest, src);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SSE2 instructions
|
||||
*/
|
||||
@@ -586,13 +661,21 @@ void sse_cmpps( struct x86_function *p,
|
||||
void sse2_pshufd( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg arg0,
|
||||
GLubyte shuf)
|
||||
unsigned char shuf)
|
||||
{
|
||||
emit_3ub(p, 0x66, X86_TWOB, 0x70);
|
||||
emit_modrm(p, dest, arg0);
|
||||
emit_1ub(p, shuf);
|
||||
}
|
||||
|
||||
void sse2_cvttps2dq( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_3ub( p, 0xF3, X86_TWOB, 0x5B );
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse2_cvtps2dq( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
@@ -625,6 +708,14 @@ void sse2_packuswb( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse2_rcpps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x53);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse2_rcpss( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
@@ -712,11 +803,11 @@ void x87_fclex( struct x86_function *p )
|
||||
|
||||
|
||||
static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg,
|
||||
GLubyte dst0ub0,
|
||||
GLubyte dst0ub1,
|
||||
GLubyte arg0ub0,
|
||||
GLubyte arg0ub1,
|
||||
GLubyte argmem_noreg)
|
||||
unsigned char dst0ub0,
|
||||
unsigned char dst0ub1,
|
||||
unsigned char arg0ub0,
|
||||
unsigned char arg0ub1,
|
||||
unsigned char argmem_noreg)
|
||||
{
|
||||
assert(dst.file == file_x87);
|
||||
|
||||
@@ -729,7 +820,7 @@ static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86
|
||||
assert(0);
|
||||
}
|
||||
else if (dst.idx == 0) {
|
||||
assert(arg.file = file_REG32);
|
||||
assert(arg.file == file_REG32);
|
||||
emit_1ub(p, 0xd8);
|
||||
emit_modrm_noreg(p, argmem_noreg, arg);
|
||||
}
|
||||
@@ -1056,44 +1147,42 @@ void mmx_movq( struct x86_function *p,
|
||||
* account any push/pop activity:
|
||||
*/
|
||||
struct x86_reg x86_fn_arg( struct x86_function *p,
|
||||
GLuint arg )
|
||||
unsigned arg )
|
||||
{
|
||||
return x86_make_disp(x86_make_reg(file_REG32, reg_SP),
|
||||
p->stack_offset + arg * 4); /* ??? */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize an x86_function object, allocating space for up to
|
||||
* 'code_size' bytes of code.
|
||||
*/
|
||||
GLboolean x86_init_func( struct x86_function *p, GLuint code_size )
|
||||
void x86_init_func( struct x86_function *p )
|
||||
{
|
||||
assert(!p->store);
|
||||
p->size = 0;
|
||||
p->store = NULL;
|
||||
p->csr = p->store;
|
||||
}
|
||||
|
||||
int x86_init_func_size( struct x86_function *p, unsigned code_size )
|
||||
{
|
||||
p->size = code_size;
|
||||
p->store = _mesa_exec_malloc(code_size);
|
||||
if (p->store) {
|
||||
p->csr = p->store;
|
||||
return GL_TRUE;
|
||||
}
|
||||
else {
|
||||
p->csr = NULL;
|
||||
return GL_FALSE;
|
||||
}
|
||||
p->csr = p->store;
|
||||
return p->store != NULL;
|
||||
}
|
||||
|
||||
void x86_release_func( struct x86_function *p )
|
||||
{
|
||||
if (p->store)
|
||||
_mesa_exec_free(p->store);
|
||||
p->store = p->csr = NULL;
|
||||
_mesa_exec_free(p->store);
|
||||
p->store = NULL;
|
||||
p->csr = NULL;
|
||||
p->size = 0;
|
||||
}
|
||||
|
||||
|
||||
void (*x86_get_func( struct x86_function *p ))(void)
|
||||
{
|
||||
if (DISASSEM)
|
||||
if (DISASSEM && p->store)
|
||||
_mesa_printf("disassemble %p %p\n", p->store, p->csr);
|
||||
return (void (*)(void))p->store;
|
||||
return (void (*)(void)) (unsigned long) p->store;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -2,26 +2,25 @@
|
||||
#ifndef _X86SSE_H_
|
||||
#define _X86SSE_H_
|
||||
|
||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
||||
|
||||
#include "glheader.h"
|
||||
#if defined(__i386__) || defined(__386__)
|
||||
|
||||
/* It is up to the caller to ensure that instructions issued are
|
||||
* suitable for the host cpu. There are no checks made in this module
|
||||
* for mmx/sse/sse2 support on the cpu.
|
||||
*/
|
||||
struct x86_reg {
|
||||
GLuint file:3;
|
||||
GLuint idx:3;
|
||||
GLuint mod:2; /* mod_REG if this is just a register */
|
||||
GLint disp:24; /* only +/- 23bits of offset - should be enough... */
|
||||
unsigned file:3;
|
||||
unsigned idx:3;
|
||||
unsigned mod:2; /* mod_REG if this is just a register */
|
||||
int disp:24; /* only +/- 23bits of offset - should be enough... */
|
||||
};
|
||||
|
||||
struct x86_function {
|
||||
GLubyte *store;
|
||||
GLubyte *csr;
|
||||
GLuint stack_offset;
|
||||
GLint need_emms;
|
||||
unsigned size;
|
||||
unsigned char *store;
|
||||
unsigned char *csr;
|
||||
unsigned stack_offset;
|
||||
int need_emms;
|
||||
const char *fn;
|
||||
};
|
||||
|
||||
@@ -80,7 +79,8 @@ enum sse_cc {
|
||||
*/
|
||||
|
||||
|
||||
GLboolean x86_init_func( struct x86_function *p, GLuint code_size );
|
||||
void x86_init_func( struct x86_function *p );
|
||||
int x86_init_func_size( struct x86_function *p, unsigned code_size );
|
||||
void x86_release_func( struct x86_function *p );
|
||||
void (*x86_get_func( struct x86_function *p ))( void );
|
||||
|
||||
@@ -92,7 +92,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file,
|
||||
enum x86_reg_name idx );
|
||||
|
||||
struct x86_reg x86_make_disp( struct x86_reg reg,
|
||||
GLint disp );
|
||||
int disp );
|
||||
|
||||
struct x86_reg x86_deref( struct x86_reg reg );
|
||||
|
||||
@@ -101,31 +101,32 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg );
|
||||
|
||||
/* Labels, jumps and fixup:
|
||||
*/
|
||||
GLubyte *x86_get_label( struct x86_function *p );
|
||||
unsigned char *x86_get_label( struct x86_function *p );
|
||||
|
||||
void x86_jcc( struct x86_function *p,
|
||||
enum x86_cc cc,
|
||||
GLubyte *label );
|
||||
unsigned char *label );
|
||||
|
||||
GLubyte *x86_jcc_forward( struct x86_function *p,
|
||||
unsigned char *x86_jcc_forward( struct x86_function *p,
|
||||
enum x86_cc cc );
|
||||
|
||||
GLubyte *x86_jmp_forward( struct x86_function *p);
|
||||
unsigned char *x86_jmp_forward( struct x86_function *p);
|
||||
|
||||
GLubyte *x86_call_forward( struct x86_function *p);
|
||||
unsigned char *x86_call_forward( struct x86_function *p);
|
||||
|
||||
void x86_fixup_fwd_jump( struct x86_function *p,
|
||||
GLubyte *fixup );
|
||||
unsigned char *fixup );
|
||||
|
||||
void x86_jmp( struct x86_function *p, GLubyte *label );
|
||||
void x86_jmp( struct x86_function *p, unsigned char *label );
|
||||
|
||||
void x86_call( struct x86_function *p, GLubyte *label );
|
||||
/* void x86_call( struct x86_function *p, void (*label)() ); */
|
||||
void x86_call( struct x86_function *p, struct x86_reg reg);
|
||||
|
||||
/* michal:
|
||||
* Temporary. As I need immediate operands, and dont want to mess with the codegen,
|
||||
* I load the immediate into general purpose register and use it.
|
||||
*/
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm );
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm );
|
||||
|
||||
|
||||
/* Macro for sse_shufps() and sse2_pshufd():
|
||||
@@ -141,19 +142,24 @@ void mmx_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg sr
|
||||
void mmx_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
|
||||
void sse2_cvtps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_cvttps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf );
|
||||
void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0,
|
||||
unsigned char shuf );
|
||||
void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
|
||||
void sse_addps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_addss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_andnps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, GLubyte cc );
|
||||
void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src,
|
||||
unsigned char cc );
|
||||
void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
@@ -166,9 +172,14 @@ void sse_movss( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
|
||||
void sse_movups( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_mulps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_mulss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_orps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_xorps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_rsqrtps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf );
|
||||
void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0,
|
||||
unsigned char shuf );
|
||||
void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src );
|
||||
|
||||
void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void x86_and( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
@@ -239,7 +250,7 @@ void x87_fucom( struct x86_function *p, struct x86_reg arg );
|
||||
* account any push/pop activity. Note - doesn't track explict
|
||||
* manipulation of ESP by other instructions.
|
||||
*/
|
||||
struct x86_reg x86_fn_arg( struct x86_function *p, GLuint arg );
|
||||
struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -146,7 +146,7 @@ SOURCE=..\..\..\..\src\glut\glx\glut_ext.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\src\glut\glx\glut_fbc.c
|
||||
SOURCE=..\..\..\..\src\glut\glx\glut_fcb.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ if exist ..\..\..\..\progs\demos copy Release\GLUT32.DLL ..\..\..\..\progs\demos
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_ext.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fbc.c">
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fcb.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fullscrn.c">
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fbc.c"
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fcb.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
||||
Reference in New Issue
Block a user