Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4161830642 | ||
|
cc3fb10ab1 |
11
Makefile
11
Makefile
@@ -180,7 +180,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.8.1
|
||||
VERSION=7.8-rc1
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
DEMO_NAME = MesaDemos-$(VERSION)
|
||||
@@ -324,7 +324,6 @@ GALLIUM_FILES = \
|
||||
$(DIRECTORY)/src/gallium/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/*/Makefile.egl \
|
||||
$(DIRECTORY)/src/gallium/*/*/Makefile.template \
|
||||
$(DIRECTORY)/src/gallium/*/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/*.[ch] \
|
||||
@@ -408,14 +407,6 @@ DEMO_FILES = \
|
||||
$(DIRECTORY)/progs/demos/*.cxx \
|
||||
$(DIRECTORY)/progs/demos/*.dat \
|
||||
$(DIRECTORY)/progs/demos/README \
|
||||
$(DIRECTORY)/progs/egl/Makefile \
|
||||
$(DIRECTORY)/progs/egl/*.[ch] \
|
||||
$(DIRECTORY)/progs/es1/*/Makefile \
|
||||
$(DIRECTORY)/progs/es1/*/*.[ch] \
|
||||
$(DIRECTORY)/progs/es2/*/Makefile \
|
||||
$(DIRECTORY)/progs/es2/*/*.[ch] \
|
||||
$(DIRECTORY)/progs/openvg/*/Makefile \
|
||||
$(DIRECTORY)/progs/openvg/*/*.[ch] \
|
||||
$(DIRECTORY)/progs/fbdev/Makefile \
|
||||
$(DIRECTORY)/progs/fbdev/glfbdevtest.c \
|
||||
$(DIRECTORY)/progs/objviewer/*.[ch] \
|
||||
|
@@ -14,8 +14,6 @@ ARCH_FLAGS = @ARCH_FLAGS@
|
||||
ASM_FLAGS = @ASM_FLAGS@
|
||||
PIC_FLAGS = @PIC_FLAGS@
|
||||
DEFINES = @DEFINES@
|
||||
API_DEFINES = @API_DEFINES@
|
||||
APIS = @APIS@
|
||||
CFLAGS = @CPPFLAGS@ @CFLAGS@ \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
|
||||
@@ -26,10 +24,8 @@ RADEON_CFLAGS = @RADEON_CFLAGS@
|
||||
RADEON_LDFLAGS = @RADEON_LDFLAGS@
|
||||
INTEL_LIBS = @INTEL_LIBS@
|
||||
INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||
X11_LIBS = @X11_LIBS@
|
||||
X11_CFLAGS = @X11_CFLAGS@
|
||||
|
||||
# Source selection
|
||||
# Assembler
|
||||
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
|
||||
GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@
|
||||
|
||||
@@ -51,8 +47,6 @@ GLU_LIB = GLU
|
||||
GLUT_LIB = glut
|
||||
GLW_LIB = GLw
|
||||
OSMESA_LIB = @OSMESA_LIB@
|
||||
GLESv1_CM_LIB = GLESv1_CM
|
||||
GLESv2_LIB = GLESv2
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = @GL_LIB_NAME@
|
||||
@@ -61,8 +55,6 @@ GLUT_LIB_NAME = @GLUT_LIB_NAME@
|
||||
GLW_LIB_NAME = @GLW_LIB_NAME@
|
||||
OSMESA_LIB_NAME = @OSMESA_LIB_NAME@
|
||||
EGL_LIB_NAME = @EGL_LIB_NAME@
|
||||
GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@
|
||||
GLESv2_LIB_NAME = @GLESv2_LIB_NAME@
|
||||
|
||||
# Globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = @GL_LIB_GLOB@
|
||||
@@ -71,8 +63,6 @@ GLUT_LIB_GLOB = @GLUT_LIB_GLOB@
|
||||
GLW_LIB_GLOB = @GLW_LIB_GLOB@
|
||||
OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@
|
||||
EGL_LIB_GLOB = @EGL_LIB_GLOB@
|
||||
GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@
|
||||
GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = @LIB_DIR@
|
||||
@@ -115,8 +105,6 @@ GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \
|
||||
$(EXTRA_LIB_PATH) @GLW_LIB_DEPS@
|
||||
APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
|
||||
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_LIB_DEPS@
|
||||
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@
|
||||
|
||||
# DRI dependencies
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
|
||||
@@ -165,11 +153,6 @@ GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
|
||||
GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
|
||||
OSMESA_PC_REQ = @OSMESA_PC_REQ@
|
||||
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
|
||||
GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@
|
||||
GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
|
||||
EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
|
||||
EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
|
||||
EGL_PC_CFLAGS = @GL_PC_CFLAGS@
|
||||
|
||||
EGL_DRI2_CFLAGS = @EGL_DRI2_CFLAGS@
|
||||
EGL_DRI2_LIBS = @EGL_DRI2_LIBS@
|
||||
|
@@ -13,10 +13,7 @@ CC = gcc
|
||||
CXX = g++
|
||||
PIC_FLAGS = -fPIC
|
||||
DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
|
||||
-DGLX_ALIAS_UNSUPPORTED \
|
||||
-DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL
|
||||
|
||||
# -DGLX_INDIRECT_RENDERING \
|
||||
-DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
||||
|
||||
# -D_GNU_SOURCE - for src/mesa/main ...
|
||||
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx
|
||||
@@ -52,7 +49,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = glsl glx/apple mesa gallium glu glut/glx glew
|
||||
SRC_DIRS = glsl glx mesa gallium glu glut/glx glew
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = osmesa
|
||||
#DRIVER_DIRS = dri
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=8
|
||||
MESA_TINY=1
|
||||
MESA_TINY=0
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
@@ -119,7 +119,7 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
|
||||
|
||||
# Program dependencies - specific GL/glut libraries added in Makefiles
|
||||
APP_LIB_DEPS = -lm
|
||||
X11_LIBS = -lX11
|
||||
|
||||
|
||||
# Installation directories (for make install)
|
||||
INSTALL_DIR = /usr/local
|
||||
|
@@ -9,7 +9,7 @@ CONFIG_NAME = linux-osmesa
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -g -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
@@ -17,12 +17,12 @@ CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glsl mesa glu
|
||||
SRC_DIRS = gallium mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS = osdemos
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread -ldl
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lm -lpthread
|
||||
|
@@ -20,7 +20,7 @@ OSMESA_LIB_NAME = libOSMesa16.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glsl mesa glu
|
||||
SRC_DIRS = gallium mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
@@ -20,7 +20,7 @@ OSMESA_LIB_NAME = libOSMesa32.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glsl mesa glu
|
||||
SRC_DIRS = gallium mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
64
configure.ac
64
configure.ac
@@ -279,8 +279,6 @@ GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
|
||||
GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION}
|
||||
OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
|
||||
EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
|
||||
GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION}
|
||||
GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION}
|
||||
|
||||
GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*'
|
||||
GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*'
|
||||
@@ -288,8 +286,6 @@ GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*'
|
||||
GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*'
|
||||
OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*'
|
||||
EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*'
|
||||
GLESv1_CM_LIB_GLOB='lib$(GLESv1_CM_LIB).*'${LIB_EXTENSION}'*'
|
||||
GLESv2_LIB_GLOB='lib$(GLESv2_LIB).*'${LIB_EXTENSION}'*'
|
||||
|
||||
AC_SUBST([GL_LIB_NAME])
|
||||
AC_SUBST([GLU_LIB_NAME])
|
||||
@@ -297,8 +293,6 @@ AC_SUBST([GLUT_LIB_NAME])
|
||||
AC_SUBST([GLW_LIB_NAME])
|
||||
AC_SUBST([OSMESA_LIB_NAME])
|
||||
AC_SUBST([EGL_LIB_NAME])
|
||||
AC_SUBST([GLESv1_CM_LIB_NAME])
|
||||
AC_SUBST([GLESv2_LIB_NAME])
|
||||
|
||||
AC_SUBST([GL_LIB_GLOB])
|
||||
AC_SUBST([GLU_LIB_GLOB])
|
||||
@@ -306,8 +300,6 @@ AC_SUBST([GLUT_LIB_GLOB])
|
||||
AC_SUBST([GLW_LIB_GLOB])
|
||||
AC_SUBST([OSMESA_LIB_GLOB])
|
||||
AC_SUBST([EGL_LIB_GLOB])
|
||||
AC_SUBST([GLESv1_CM_LIB_GLOB])
|
||||
AC_SUBST([GLESv2_LIB_GLOB])
|
||||
|
||||
dnl
|
||||
dnl Arch/platform-specific settings
|
||||
@@ -555,14 +547,8 @@ else
|
||||
x11_pkgconfig=no
|
||||
fi
|
||||
dnl Use the autoconf macro if no pkg-config files
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
PKG_CHECK_MODULES([X11], [x11])
|
||||
else
|
||||
if test "$x11_pkgconfig" = no; then
|
||||
AC_PATH_XTRA
|
||||
test -z "$X11_CFLAGS" && X11_CFLAGS="$X_CFLAGS"
|
||||
test -z "$X11_LIBS" && X11_LIBS="$X_LIBS -lX11"
|
||||
AC_SUBST([X11_CFLAGS])
|
||||
AC_SUBST([X11_LIBS])
|
||||
fi
|
||||
|
||||
dnl Try to tell the user that the --x-* options are only used when
|
||||
@@ -663,10 +649,6 @@ dri)
|
||||
# need DRM libs, -lpthread, etc.
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
|
||||
GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
|
||||
GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
|
||||
GLESv1_CM_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
|
||||
GLESv2_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
|
||||
GLESv2_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
|
||||
;;
|
||||
osmesa)
|
||||
# No libGL for osmesa
|
||||
@@ -678,11 +660,6 @@ AC_SUBST([GL_PC_REQ_PRIV])
|
||||
AC_SUBST([GL_PC_LIB_PRIV])
|
||||
AC_SUBST([GL_PC_CFLAGS])
|
||||
AC_SUBST([DRI_PC_REQ_PRIV])
|
||||
AC_SUBST([GLESv1_LIB_DEPS])
|
||||
AC_SUBST([GLESv1_CM_PC_LIB_PRIV])
|
||||
AC_SUBST([GLESv2_LIB_DEPS])
|
||||
AC_SUBST([GLESv2_PC_LIB_PRIV])
|
||||
|
||||
|
||||
dnl
|
||||
dnl More X11 setup
|
||||
@@ -730,45 +707,6 @@ if test "x$with_dri_drivers" = x; then
|
||||
with_dri_drivers=no
|
||||
fi
|
||||
|
||||
dnl Determine which APIs to support
|
||||
AC_ARG_ENABLE([opengl],
|
||||
[AS_HELP_STRING([--disable-opengl],
|
||||
[disable support for standard OpenGL API @<:@default=no@:>@])],
|
||||
[enable_opengl="$enableval"],
|
||||
[enable_opengl=yes])
|
||||
AC_ARG_ENABLE([gles1],
|
||||
[AS_HELP_STRING([--enable-gles1],
|
||||
[enable support for OpenGL ES 1.x API @<:@default=no@:>@])],
|
||||
[enable_gles1="$enableval"],
|
||||
[enable_gles1=no])
|
||||
AC_ARG_ENABLE([gles2],
|
||||
[AS_HELP_STRING([--enable-gles2],
|
||||
[enable support for OpenGL ES 2.x API @<:@default=no@:>@])],
|
||||
[enable_gles2="$enableval"],
|
||||
[enable_gles2=no])
|
||||
|
||||
API_DEFINES=""
|
||||
APIS=""
|
||||
if test "x$enable_opengl" = xno; then
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_GL=0"
|
||||
else
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_GL=1"
|
||||
APIS="$APIS gl"
|
||||
fi
|
||||
if test "x$enable_gles1" = xyes; then
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_ES1=1"
|
||||
APIS="$APIS es1"
|
||||
fi
|
||||
if test "x$enable_gles2" = xyes; then
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_ES2=1"
|
||||
APIS="$APIS es2"
|
||||
fi
|
||||
if test "x$enable_gles1" = xyes -o "x$enable_gles2" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS gles"
|
||||
fi
|
||||
AC_SUBST([API_DEFINES])
|
||||
AC_SUBST([APIS])
|
||||
|
||||
dnl If $with_dri_drivers is yes, directories will be added through
|
||||
dnl platform checks
|
||||
DRI_DIRS=""
|
||||
|
@@ -13,14 +13,14 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users"
|
||||
target="_parent">mesa-users</a> - intended for end-users of Mesa and DRI
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
|
||||
target="_parent">mesa3d-users</a> - intended for end-users of Mesa and DRI
|
||||
drivers. Newbie questions are OK, but please try the general OpenGL
|
||||
resources and Mesa/DRI documentation first.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev"
|
||||
target="_parent">mesa-dev</a> - for Mesa, Gallium and DRI development
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
|
||||
target="_parent">mesa3d-dev</a> - for Mesa, Gallium and DRI development
|
||||
discussion. Not for beginners.
|
||||
</li>
|
||||
<br>
|
||||
@@ -30,8 +30,8 @@ target="_parent">mesa-commit</a> - relays git check-in messages
|
||||
In general, people should not post to this list.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-announce"
|
||||
target="_parent">mesa-announce</a> - announcements of new Mesa
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-announce"
|
||||
target="_parent">mesa3d-announce</a> - announcements of new Mesa
|
||||
versions are sent to this list. Very low traffic.
|
||||
</li>
|
||||
</ul>
|
||||
@@ -40,15 +40,6 @@ versions are sent to this list. Very low traffic.
|
||||
Follow the links above for list archives.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The old Mesa lists hosted at SourceForge are no longer in use.
|
||||
The archives are still available, however:
|
||||
<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-announce" target="_parent">mesa3d-announce</a>,
|
||||
<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-users" target="_parent">mesa3d-users</a>,
|
||||
<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-dev" target="_parent">mesa3d-dev</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<p>For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
|
||||
kernels, see the
|
||||
<a href="http://dri.freedesktop.org/wiki/MailingLists" target="_parent">
|
||||
|
@@ -10,27 +10,6 @@
|
||||
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>April 5, 2010</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.8.1.html">Mesa 7.8.1</a> is released. This is a bug-fix
|
||||
release for a few critical issues in the 7.8 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>March 28, 2010</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released. This is a bug-fix
|
||||
release fixing issues found in the 7.7 release.
|
||||
</p>
|
||||
<p>
|
||||
Also, <a href="relnotes-7.8.html">Mesa 7.8</a> is released. This is a new
|
||||
development release.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>December 21, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released. This is a bug-fix
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.7.1 Release Notes / March 28, 2010</H1>
|
||||
<H1>Mesa 7.7.1 Release Notes / date tbd</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.7.1 is a bug-fix release.
|
||||
@@ -26,18 +26,16 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
3ab0638cfa7ce8157337a229cf0db2c4 MesaLib-7.7.1.tar.gz
|
||||
46664d99e03f1e3ac078a7fea02af115 MesaLib-7.7.1.tar.bz2
|
||||
4e73ba8abb59aff79485eb95d7cefff7 MesaLib-7.7.1.zip
|
||||
bf1b108983995f7a712cf3343df1c918 MesaDemos-7.7.1.tar.gz
|
||||
aeb39645d80d656e0adebaa09e5bcd03 MesaDemos-7.7.1.tar.bz2
|
||||
01c49b7454fd292244eaf8bdc6ed8cf0 MesaDemos-7.7.1.zip
|
||||
37ec6386693dcb6dc770d1efd63a7a93 MesaGLUT-7.7.1.tar.gz
|
||||
1e16c85282f843791a21f7bc7b6a1ca8 MesaGLUT-7.7.1.tar.bz2
|
||||
d352c9e36a8e4d1059f4abc017b131e0 MesaGLUT-7.7.1.zip
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>tbd
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Assorted fixes to VMware SVGA gallium driver.
|
||||
@@ -47,12 +45,6 @@ d352c9e36a8e4d1059f4abc017b131e0 MesaGLUT-7.7.1.zip
|
||||
<li>Gallium SSE codegen for XPD didn't always work.
|
||||
<li>Fixed Windows build.
|
||||
<li>Fixed broken glMultiDrawElements().
|
||||
<li>Silence bogus GL errors generated in glxinfo.
|
||||
<li>Fixed several render to texture bugs.
|
||||
<li>Assorted bug fixes in Mesa/Gallium state tracker including
|
||||
glCopy/DrawPixels() to FBOs.
|
||||
<li>Assorted fixes to Gallium drivers.
|
||||
<li>Fixed broken glPush/PopClientAttrib() for vertex arrays in GLX code.
|
||||
</ul>
|
||||
|
||||
|
||||
|
@@ -1,62 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8.1 Release Notes / April, 5, 2010</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8.1 fixes a couple critical bugs in the recent Mesa 7.8 release. Even
|
||||
though this is a bug fix release, given its proximity to the 7.8 release, a
|
||||
new development release, it should also be considered new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release, such as 7.7.1, or wait for Mesa 7.8.2.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.8.1 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
62e8e47cbd63741b4bbe634dcdc8a56a MesaLib-7.8.1.tar.gz
|
||||
25ec15f8e41fde6d206118cc786dbac4 MesaLib-7.8.1.tar.bz2
|
||||
22b1153010ffdf513836ea9931159e80 MesaLib-7.8.1.zip
|
||||
c9c0a830923d3820807a08c09d521b3e MesaDemos-7.8.1.tar.gz
|
||||
9ef47f911869657c6bf2f43ebce86b61 MesaDemos-7.8.1.tar.bz2
|
||||
93720605eb3f784f9bcc289a4dd2ff52 MesaDemos-7.8.1.zip
|
||||
ed1d0b1e960afe6a3768eab747cbdbd3 MesaGLUT-7.8.1.tar.gz
|
||||
6bae516a44c6d26ff3152c960ab648e7 MesaGLUT-7.8.1.tar.bz2
|
||||
ba306f603ea73c30ee0e7efa14dc5581 MesaGLUT-7.8.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fix incorrect enums for GLX_INTEL_swap_event by updating glxext.h to
|
||||
version 27 from OpenGL.org.</li>
|
||||
<li>Fix compilation errors on non-GLX_DIRECT_RENDERING builds.</li>
|
||||
<li>Various fixes for building Mesa on OS X.</li>
|
||||
<li>Pass GLX drawable ID to dri2InvalidateBuffers. Fixes bug #27190.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>None.</p>
|
||||
</body>
|
||||
</html>
|
@@ -1,52 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8.2 Release Notes / April, 5, 2010</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.8.2 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Upgraded glext.h to version 61, and upgraded glxext.h
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT).
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>None.</p>
|
||||
</body>
|
||||
</html>
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8 Release Notes / March 28, 2010</H1>
|
||||
<H1>Mesa 7.8 Release Notes / date TBD</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8 is a new development release.
|
||||
@@ -28,15 +28,7 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
5fcfde5383eccb3e9fd665f08a0ea59b MesaLib-7.8.tar.gz
|
||||
85cb891eecb89aae4fdd3499cccd934b MesaLib-7.8.tar.bz2
|
||||
754f39593006effc1c8ec3c27c2f1296 MesaLib-7.8.zip
|
||||
c3869c29fa6c3dbdd763f7428d271e12 MesaDemos-7.8.tar.gz
|
||||
9fe8ec184c7f78691e43c4c0a7f97d56 MesaDemos-7.8.tar.bz2
|
||||
063a96947f7b83d4ad789c6cf291b184 MesaDemos-7.8.zip
|
||||
5f4246756b7daaddb4fb3f970cad1e28 MesaGLUT-7.8.tar.gz
|
||||
ca7048a4aa7a437dcc84cc2c7d731336 MesaGLUT-7.8.tar.bz2
|
||||
b54581aeb79b585b158d6a32f94feff2 MesaGLUT-7.8.zip
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
|
@@ -13,8 +13,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
|
||||
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
|
||||
|
@@ -14,6 +14,10 @@ This page describes the features and status of Mesa's support for the
|
||||
OpenGL Shading Language</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Last updated on 15 December 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Contents
|
||||
</p>
|
||||
|
@@ -227,25 +227,6 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLCont
|
||||
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef EGL_NOK_swap_region
|
||||
#define EGL_NOK_swap_region 1
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
|
||||
#endif
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef EGL_NOK_texture_from_pixmap
|
||||
#define EGL_NOK_texture_from_pixmap 1
|
||||
|
||||
#define EGL_Y_INVERTED_NOK 0x307F
|
||||
#endif /* EGL_NOK_texture_from_pixmap */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -393,8 +393,6 @@
|
||||
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
|
||||
#define glEdgeFlagPointer MANGLE(EdgeFlagPointer)
|
||||
#define glEdgeFlagv MANGLE(EdgeFlagv)
|
||||
#define glEGLImageTargetRenderbufferStorageOES MANGLE(EGLImageTargetRenderbufferStorageOES)
|
||||
#define glEGLImageTargetTexture2DOES MANGLE(EGLImageTargetTexture2DOES)
|
||||
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
|
||||
#define glElementPointerATI MANGLE(ElementPointerATI)
|
||||
#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)
|
||||
|
3806
include/GL/glext.h
3806
include/GL/glext.h
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2010 The Khronos Group Inc.
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
@@ -48,9 +48,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glxext.h last updated 2010/02/10 */
|
||||
/* glxext.h last updated 2009/10/08 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GLX_GLXEXT_VERSION 27
|
||||
#define GLX_GLXEXT_VERSION 25
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
@@ -124,10 +124,6 @@ extern "C" {
|
||||
#define GLX_SAMPLES_ARB 100001
|
||||
#endif
|
||||
|
||||
#ifndef GLX_ARB_vertex_buffer_object
|
||||
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
|
||||
#endif
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
|
||||
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||
@@ -400,13 +396,6 @@ extern "C" {
|
||||
#ifndef GLX_NV_copy_image
|
||||
#endif
|
||||
|
||||
#ifndef GLX_INTEL_swap_event
|
||||
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
|
||||
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
|
||||
#define GLX_COPY_COMPLETE_INTEL 0x8181
|
||||
#define GLX_FLIP_COMPLETE_INTEL 0x8182
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -488,24 +477,24 @@ typedef unsigned __int64 uint64_t;
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_VERSION_1_3 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements);
|
||||
extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
|
||||
extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
extern void glXDestroyWindow (Display *dpy, GLXWindow win);
|
||||
extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
|
||||
extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
|
||||
extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
|
||||
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
|
||||
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
|
||||
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
|
||||
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
|
||||
extern void glXDestroyWindow (Display *, GLXWindow);
|
||||
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
|
||||
extern void glXDestroyPixmap (Display *, GLXPixmap);
|
||||
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
|
||||
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
|
||||
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
|
||||
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
|
||||
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
|
||||
extern GLXDrawable glXGetCurrentReadDrawable (void);
|
||||
extern Display * glXGetCurrentDisplay (void);
|
||||
extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
extern int glXQueryContext (Display *, GLXContext, int, int *);
|
||||
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
|
||||
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
@@ -530,7 +519,7 @@ typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, un
|
||||
#ifndef GLX_VERSION_1_4
|
||||
#define GLX_VERSION_1_4 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
|
||||
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
|
||||
#endif
|
||||
@@ -538,7 +527,7 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
#define GLX_ARB_get_proc_address 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
|
||||
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
|
||||
#endif
|
||||
@@ -554,7 +543,7 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
|
||||
#ifndef GLX_ARB_create_context
|
||||
#define GLX_ARB_create_context 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
#endif
|
||||
@@ -574,7 +563,7 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBCo
|
||||
#ifndef GLX_SGI_swap_control
|
||||
#define GLX_SGI_swap_control 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXSwapIntervalSGI (int interval);
|
||||
extern int glXSwapIntervalSGI (int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||
#endif
|
||||
@@ -582,8 +571,8 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||
#ifndef GLX_SGI_video_sync
|
||||
#define GLX_SGI_video_sync 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXGetVideoSyncSGI (unsigned int *count);
|
||||
extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
|
||||
extern int glXGetVideoSyncSGI (unsigned int *);
|
||||
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
|
||||
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
|
||||
@@ -592,7 +581,7 @@ typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigne
|
||||
#ifndef GLX_SGI_make_current_read
|
||||
#define GLX_SGI_make_current_read 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
|
||||
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
@@ -603,8 +592,8 @@ typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
|
||||
#define GLX_SGIX_video_source 1
|
||||
#ifdef _VL_H
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
|
||||
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
@@ -619,10 +608,10 @@ typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSou
|
||||
#define GLX_EXT_import_context 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Display * glXGetCurrentDisplayEXT (void);
|
||||
extern int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
extern GLXContextID glXGetContextIDEXT (const GLXContext context);
|
||||
extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
|
||||
extern void glXFreeContextEXT (Display *dpy, GLXContext context);
|
||||
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
|
||||
extern GLXContextID glXGetContextIDEXT (const GLXContext);
|
||||
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
|
||||
extern void glXFreeContextEXT (Display *, GLXContext);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
|
||||
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
@@ -634,12 +623,12 @@ typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
|
||||
#ifndef GLX_SGIX_fbconfig
|
||||
#define GLX_SGIX_fbconfig 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
|
||||
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
|
||||
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
|
||||
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
|
||||
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
|
||||
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
|
||||
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
|
||||
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
@@ -652,11 +641,11 @@ typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy,
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
#define GLX_SGIX_pbuffer 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
|
||||
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
|
||||
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
|
||||
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
|
||||
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
@@ -668,7 +657,7 @@ typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable draw
|
||||
#ifndef GLX_SGI_cushion
|
||||
#define GLX_SGI_cushion 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXCushionSGI (Display *dpy, Window window, float cushion);
|
||||
extern void glXCushionSGI (Display *, Window, float);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
|
||||
#endif
|
||||
@@ -676,11 +665,11 @@ typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushi
|
||||
#ifndef GLX_SGIX_video_resize
|
||||
#define GLX_SGIX_video_resize 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
|
||||
extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
extern int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
|
||||
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
|
||||
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
|
||||
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
|
||||
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
|
||||
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
|
||||
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
@@ -693,7 +682,7 @@ typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, in
|
||||
#define GLX_SGIX_dmbuffer 1
|
||||
#ifdef _DM_BUFFER_H_
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#endif /* _DM_BUFFER_H_ */
|
||||
@@ -702,16 +691,24 @@ typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX
|
||||
#ifndef GLX_SGIX_swap_group
|
||||
#define GLX_SGIX_swap_group 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_INTEL_swap_event
|
||||
#define GLX_INTEL_swap_event
|
||||
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x10000000
|
||||
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8024
|
||||
#define GLX_BLIT_COMPLETE_INTEL 0x8025
|
||||
#define GLX_FLIP_COMPLETE_INTEL 0x8026
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_swap_barrier
|
||||
#define GLX_SGIX_swap_barrier 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
extern Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
|
||||
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
|
||||
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
|
||||
@@ -720,7 +717,7 @@ typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen,
|
||||
#ifndef GLX_SUN_get_transparent_index
|
||||
#define GLX_SUN_get_transparent_index 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||
#endif
|
||||
@@ -728,7 +725,7 @@ typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overl
|
||||
#ifndef GLX_MESA_copy_sub_buffer
|
||||
#define GLX_MESA_copy_sub_buffer 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#endif
|
||||
@@ -736,7 +733,7 @@ typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawabl
|
||||
#ifndef GLX_MESA_pixmap_colormap
|
||||
#define GLX_MESA_pixmap_colormap 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#endif
|
||||
@@ -744,7 +741,7 @@ typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo
|
||||
#ifndef GLX_MESA_release_buffers
|
||||
#define GLX_MESA_release_buffers 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
|
||||
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
|
||||
#endif
|
||||
@@ -752,7 +749,7 @@ typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawab
|
||||
#ifndef GLX_MESA_set_3dfx_mode
|
||||
#define GLX_MESA_set_3dfx_mode 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXSet3DfxModeMESA (int mode);
|
||||
extern Bool glXSet3DfxModeMESA (int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
|
||||
#endif
|
||||
@@ -768,11 +765,11 @@ typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
extern Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
extern int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
||||
extern Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
extern Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
|
||||
extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
|
||||
extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
|
||||
extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
|
||||
extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
@@ -813,14 +810,14 @@ typedef struct {
|
||||
} GLXPipeRectLimits;
|
||||
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
|
||||
extern int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
|
||||
extern int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
|
||||
extern int glXBindHyperpipeSGIX (Display *dpy, int hpId);
|
||||
extern int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
extern int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
extern int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
|
||||
extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
|
||||
extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
|
||||
extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
|
||||
extern int glXBindHyperpipeSGIX (Display *, int);
|
||||
extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
|
||||
extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
|
||||
extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
|
||||
typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
@@ -835,7 +832,7 @@ typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
#define GLX_MESA_agp_offset 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern unsigned int glXGetAGPOffsetMESA (const void *pointer);
|
||||
extern unsigned int glXGetAGPOffsetMESA (const void *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
|
||||
#endif
|
||||
@@ -851,8 +848,8 @@ typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
#define GLX_EXT_texture_from_pixmap 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
extern void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
|
||||
extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
@@ -861,8 +858,8 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawab
|
||||
#ifndef GLX_NV_present_video
|
||||
#define GLX_NV_present_video 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern unsigned int * glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
extern int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
extern unsigned int * glXEnumerateVideoDevicesNV (Display *, int, int *);
|
||||
extern int glXBindVideoDeviceNV (Display *, unsigned int, unsigned int, const int *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
@@ -871,12 +868,12 @@ typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_s
|
||||
#ifndef GLX_NV_video_output
|
||||
#define GLX_NV_video_output 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
extern int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
extern int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
extern int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
|
||||
extern int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
extern int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
extern int glXGetVideoDeviceNV (Display *, int, int, GLXVideoDeviceNV *);
|
||||
extern int glXReleaseVideoDeviceNV (Display *, int, GLXVideoDeviceNV);
|
||||
extern int glXBindVideoImageNV (Display *, GLXVideoDeviceNV, GLXPbuffer, int);
|
||||
extern int glXReleaseVideoImageNV (Display *, GLXPbuffer);
|
||||
extern int glXSendPbufferToVideoNV (Display *, GLXPbuffer, int, unsigned long *, GLboolean);
|
||||
extern int glXGetVideoInfoNV (Display *, int, GLXVideoDeviceNV, unsigned long *, unsigned long *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
@@ -889,12 +886,12 @@ typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDev
|
||||
#ifndef GLX_NV_swap_group
|
||||
#define GLX_NV_swap_group 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
extern Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
|
||||
extern Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
extern Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
extern Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
|
||||
extern Bool glXResetFrameCountNV (Display *dpy, int screen);
|
||||
extern Bool glXJoinSwapGroupNV (Display *, GLXDrawable, GLuint);
|
||||
extern Bool glXBindSwapBarrierNV (Display *, GLuint, GLuint);
|
||||
extern Bool glXQuerySwapGroupNV (Display *, GLXDrawable, GLuint *, GLuint *);
|
||||
extern Bool glXQueryMaxSwapGroupsNV (Display *, int, GLuint *, GLuint *);
|
||||
extern Bool glXQueryFrameCountNV (Display *, int, GLuint *);
|
||||
extern Bool glXResetFrameCountNV (Display *, int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
|
||||
@@ -907,11 +904,11 @@ typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
|
||||
#ifndef GLX_NV_video_capture
|
||||
#define GLX_NV_video_capture 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
extern void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
extern int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
|
||||
extern void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
extern int glXBindVideoCaptureDeviceNV (Display *, unsigned int, GLXVideoCaptureDeviceNV);
|
||||
extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *, int, int *);
|
||||
extern void glXLockVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
|
||||
extern int glXQueryVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV, int, int *);
|
||||
extern void glXReleaseVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
@@ -923,7 +920,7 @@ typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoC
|
||||
#ifndef GLX_EXT_swap_control
|
||||
#define GLX_EXT_swap_control 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
|
||||
extern int glXSwapIntervalEXT (Display *, GLXDrawable, int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
|
||||
#endif
|
||||
@@ -931,15 +928,11 @@ typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable,
|
||||
#ifndef GLX_NV_copy_image
|
||||
#define GLX_NV_copy_image 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
extern void glXCopyImageSubDataNV (Display *, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_INTEL_swap_event
|
||||
#define GLX_INTEL_swap_event 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -730,11 +730,7 @@ struct __DRIdri2LoaderExtensionRec {
|
||||
* constructors for DRI2.
|
||||
*/
|
||||
#define __DRI_DRI2 "DRI_DRI2"
|
||||
#define __DRI_DRI2_VERSION 2
|
||||
|
||||
#define __DRI_API_OPENGL 0
|
||||
#define __DRI_API_GLES 1
|
||||
#define __DRI_API_GLES2 2
|
||||
#define __DRI_DRI2_VERSION 1
|
||||
|
||||
struct __DRIdri2ExtensionRec {
|
||||
__DRIextension base;
|
||||
@@ -753,14 +749,6 @@ struct __DRIdri2ExtensionRec {
|
||||
__DRIcontext *shared,
|
||||
void *loaderPrivate);
|
||||
|
||||
/* Since version 2 */
|
||||
unsigned int (*getAPIMask)(__DRIscreen *screen);
|
||||
|
||||
__DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
|
||||
int api,
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
void *data);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -158,7 +158,7 @@ static void printhelp(void)
|
||||
glRasterPos2i(60,240);
|
||||
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"l - Increase rain length");
|
||||
glRasterPos2i(60,210);
|
||||
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"k - Decrease rain length");
|
||||
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"k - Increase rain length");
|
||||
}
|
||||
|
||||
static void drawrain(void)
|
||||
|
@@ -4,7 +4,7 @@ TOP = ../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
INCLUDE_DIRS = -I$(TOP)/include $(X11_CFLAGS)
|
||||
INCLUDE_DIRS = -I$(TOP)/include
|
||||
|
||||
HEADERS = $(TOP)/include/GLES/egl.h
|
||||
LIB_DEP = $(TOP)/$(LIB_DIR)/libEGL.so
|
||||
@@ -57,13 +57,13 @@ peglgears: peglgears.o $(HEADERS) $(LIB_DEP)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) -lm
|
||||
|
||||
xeglgears: xeglgears.o $(HEADERS) $(LIB_DEP)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
|
||||
|
||||
xeglthreads: xeglthreads.o $(HEADERS) $(LIB_DEP)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
|
||||
|
||||
xegl_tri: xegl_tri.o $(HEADERS) $(LIB_DEP)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
|
||||
|
||||
clean:
|
||||
-rm -f *.o *~
|
||||
|
@@ -5,7 +5,7 @@ include $(TOP)/configs/current
|
||||
|
||||
INCDIR = $(TOP)/include
|
||||
|
||||
OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(OSMESA_LIB) $(APP_LIB_DEPS)
|
||||
OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -l$(OSMESA_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -lOSMesa16 -l$(GLU_LIB) \
|
||||
-l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
@@ -399,11 +399,7 @@ test(GLenum type, GLint bits, const char *filename)
|
||||
|
||||
/* sanity checks */
|
||||
glGetIntegerv(GL_RED_BITS, &cBits);
|
||||
if (cBits != bits) {
|
||||
fprintf(stderr, "Unable to create %d-bit/channel renderbuffer.\n", bits);
|
||||
fprintf(stderr, "May need to recompile Mesa with CHAN_BITS=16 or 32.\n");
|
||||
return 0;
|
||||
}
|
||||
assert(cBits == bits);
|
||||
glGetIntegerv(GL_GREEN_BITS, &cBits);
|
||||
assert(cBits == bits);
|
||||
glGetIntegerv(GL_BLUE_BITS, &cBits);
|
||||
|
@@ -41,7 +41,6 @@ SOURCES = \
|
||||
copypixrate.c \
|
||||
crossbar.c \
|
||||
cva.c \
|
||||
cva_huge.c \
|
||||
cylwrap.c \
|
||||
drawbuffers.c \
|
||||
drawbuffers2.c \
|
||||
|
@@ -9,6 +9,7 @@ glx_progs = [
|
||||
'getprocaddress',
|
||||
'jkrahntest',
|
||||
'sharedtex',
|
||||
'texcompress2',
|
||||
'texobjshare',
|
||||
]
|
||||
|
||||
@@ -44,7 +45,6 @@ progs = [
|
||||
'copypixrate',
|
||||
'crossbar',
|
||||
'cva',
|
||||
'cva_huge',
|
||||
'cylwrap',
|
||||
'drawbuffers',
|
||||
'drawbuffers2',
|
||||
|
@@ -1,232 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2010 Pauli Nieminen
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Test case for huge cva arrays. Mesa code has to split this to multiple VBOs
|
||||
* which had memory access error.
|
||||
* This test case doesn't render incorrectly but valgrind showed the memory
|
||||
* access error.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h> /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#define GL_GLEXT_LEGACY
|
||||
#include <GL/glut.h>
|
||||
|
||||
GLfloat *verts;
|
||||
|
||||
GLubyte *color;
|
||||
|
||||
GLuint *indices;
|
||||
|
||||
#define rows 1000 /* Create 1000x1000 vertex grid */
|
||||
#define row_width 5000.0
|
||||
#define grid_depth -50.0
|
||||
GLuint nr_verts_in_row = rows;
|
||||
GLuint nr_indices_in_strip = rows * 2;
|
||||
|
||||
GLboolean double_buffer;
|
||||
GLboolean compiled = GL_TRUE;
|
||||
|
||||
static void generate_verts( void )
|
||||
{
|
||||
unsigned x, y;
|
||||
GLfloat step = row_width /(GLfloat)(nr_verts_in_row - 1);
|
||||
verts = malloc(sizeof(verts[0]) * 4 * nr_verts_in_row * nr_verts_in_row);
|
||||
|
||||
for (y = 0; y < nr_verts_in_row; ++y) {
|
||||
for (x = 0; x < nr_verts_in_row; ++x) {
|
||||
unsigned idx = 4*(x + y * nr_verts_in_row);
|
||||
verts[idx + 0] = step * x - row_width/2.0;
|
||||
verts[idx + 1] = step * y - row_width/2.0;
|
||||
/* deep enough not to be vissible */
|
||||
verts[idx + 2] = grid_depth;
|
||||
verts[idx + 3] = 0.0;
|
||||
}
|
||||
}
|
||||
glVertexPointer( 3, GL_FLOAT, sizeof(verts[0])*4, verts );
|
||||
}
|
||||
|
||||
static void generate_colors( void )
|
||||
{
|
||||
unsigned x, y;
|
||||
GLfloat step = 255.0/(GLfloat)(nr_verts_in_row - 1);
|
||||
color = malloc(sizeof(color[0]) * 4 * nr_verts_in_row * nr_verts_in_row);
|
||||
|
||||
for (y = 0; y < nr_verts_in_row; ++y) {
|
||||
for (x = 0; x < nr_verts_in_row; ++x) {
|
||||
unsigned idx = 4*(x + y * nr_verts_in_row);
|
||||
color[idx + 0] = (GLubyte)(step * x);
|
||||
color[idx + 1] = 0x00;
|
||||
color[idx + 2] = (GLubyte)(step * y);
|
||||
color[idx + 3] = 0x00;
|
||||
}
|
||||
}
|
||||
glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
|
||||
}
|
||||
|
||||
static void generate_indices( void )
|
||||
{
|
||||
unsigned strip, i;
|
||||
|
||||
/* indice size * number of strips * number of indices in strip */
|
||||
indices = malloc(sizeof(indices[0]) * (nr_verts_in_row - 1) *
|
||||
(nr_indices_in_strip));
|
||||
|
||||
for (strip = 0; strip < nr_verts_in_row - 1; strip += 2) {
|
||||
for (i = 0; i < nr_indices_in_strip; i+=2) {
|
||||
unsigned idx = i + strip * nr_indices_in_strip;
|
||||
unsigned idx2 = (nr_indices_in_strip - i - 2) + (strip +
|
||||
1) * (nr_indices_in_strip);
|
||||
indices[idx + 1] = i/2 + strip*nr_verts_in_row;
|
||||
indices[idx] = i/2 + (strip + 1)*nr_verts_in_row;
|
||||
if (strip + 1 < nr_verts_in_row - 1) {
|
||||
indices[idx2] = i/2 + (strip + 1)*nr_verts_in_row;
|
||||
indices[idx2 + 1] = i/2 + (strip + 2)*nr_verts_in_row;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void init( void )
|
||||
{
|
||||
|
||||
|
||||
generate_verts();
|
||||
generate_colors();
|
||||
generate_indices();
|
||||
|
||||
glClearColor( 0.0, 0.0, 0.0, 0.0 );
|
||||
glShadeModel( GL_SMOOTH );
|
||||
|
||||
glEnableClientState( GL_VERTEX_ARRAY );
|
||||
glEnableClientState( GL_COLOR_ARRAY );
|
||||
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glFrustum( -100.0, 100.0, -100.0, 100.0, 1.0, 100.0 );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
|
||||
#ifdef GL_EXT_compiled_vertex_array
|
||||
if ( compiled ) {
|
||||
glLockArraysEXT( 0, rows * rows );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void display( void )
|
||||
{
|
||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
|
||||
glDrawElements( GL_TRIANGLE_STRIP, nr_indices_in_strip * (nr_verts_in_row - 1) , GL_UNSIGNED_INT, indices );
|
||||
|
||||
if ( double_buffer )
|
||||
glutSwapBuffers();
|
||||
else
|
||||
glFlush();
|
||||
}
|
||||
|
||||
static void keyboard( unsigned char key, int x, int y )
|
||||
{
|
||||
switch ( key ) {
|
||||
case 27:
|
||||
exit( 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
static GLboolean args( int argc, char **argv )
|
||||
{
|
||||
GLint i;
|
||||
|
||||
double_buffer = GL_TRUE;
|
||||
|
||||
for ( i = 1 ; i < argc ; i++ ) {
|
||||
if ( strcmp( argv[i], "-sb" ) == 0 ) {
|
||||
double_buffer = GL_FALSE;
|
||||
} else if ( strcmp( argv[i], "-db" ) == 0 ) {
|
||||
double_buffer = GL_TRUE;
|
||||
} else {
|
||||
fprintf( stderr, "%s (Bad option).\n", argv[i] );
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
GLenum type;
|
||||
char *string;
|
||||
double version;
|
||||
|
||||
glutInit( &argc, argv );
|
||||
|
||||
if ( args( argc, argv ) == GL_FALSE ) {
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
type = GLUT_RGB | GLUT_DEPTH;
|
||||
type |= ( double_buffer ) ? GLUT_DOUBLE : GLUT_SINGLE;
|
||||
|
||||
glutInitDisplayMode( type );
|
||||
glutInitWindowSize( 250, 250 );
|
||||
glutInitWindowPosition( 100, 100 );
|
||||
glutCreateWindow( "CVA Test" );
|
||||
|
||||
/* Make sure the server supports GL 1.2 vertex arrays.
|
||||
*/
|
||||
string = (char *) glGetString( GL_VERSION );
|
||||
|
||||
version = atof(string);
|
||||
if ( version < 1.2 ) {
|
||||
fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
|
||||
exit( -1 );
|
||||
}
|
||||
|
||||
/* See if the server supports compiled vertex arrays.
|
||||
*/
|
||||
string = (char *) glGetString( GL_EXTENSIONS );
|
||||
|
||||
if ( !strstr( string, "GL_EXT_compiled_vertex_array" ) ) {
|
||||
fprintf( stderr, "Compiled vertex arrays not supported by this renderer.\n" );
|
||||
compiled = GL_FALSE;
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
glutDisplayFunc( display );
|
||||
glutKeyboardFunc( keyboard );
|
||||
glutMainLoop();
|
||||
|
||||
return 0;
|
||||
}
|
@@ -102,19 +102,6 @@ static void Display(void)
|
||||
|
||||
/* read back scaled depth image */
|
||||
glReadPixels(100, 0, 400, 400, GL_DEPTH_COMPONENT, GL_FLOAT, depth2);
|
||||
|
||||
/* debug */
|
||||
if (0) {
|
||||
int i;
|
||||
float *z = depth2 + 400 * 200;
|
||||
printf("z at y=200:\n");
|
||||
for (i = 0; i < 400; i++) {
|
||||
printf("%5.3f ", z[i]);
|
||||
if ((i + 1) % 12 == 0)
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* draw as luminance */
|
||||
glPixelZoom(1.0, 1.0);
|
||||
glWindowPos2i(100, 0);
|
||||
|
@@ -9,9 +9,9 @@ INCDIR = $(TOP)/include
|
||||
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
# Add X11 and pthread libs to satisfy GNU gold.
|
||||
APP_LIB_DEPS += $(X11_LIBS) -lpthread
|
||||
APP_LIB_DEPS += -lX11 -lpthread
|
||||
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(libdir) $(APP_LIB_DEPS)
|
||||
|
||||
PROGS = \
|
||||
corender \
|
||||
@@ -53,18 +53,17 @@ EXTRA_PROGS = \
|
||||
|
||||
##### RULES #####
|
||||
|
||||
.o: $(LIB_DEP)
|
||||
$(APP_CC) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c
|
||||
|
||||
.c.o:
|
||||
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< -c -o $@
|
||||
.c: $(LIB_DEP)
|
||||
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
|
||||
|
||||
|
||||
##### TARGETS #####
|
||||
|
||||
default: $(PROGS)
|
||||
|
||||
$(PROGS): $(PROGS:%=%.o)
|
||||
|
||||
extra: $(EXTRA_PROGS)
|
||||
|
||||
@@ -75,29 +74,45 @@ clean:
|
||||
|
||||
|
||||
# special cases
|
||||
pbutil.o: pbutil.h
|
||||
pbinfo.o: pbutil.h
|
||||
pbinfo: pbinfo.o pbutil.o
|
||||
$(APP_CC) $(CFLAGS) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
|
||||
|
||||
pbdemo.o: pbutil.h
|
||||
pbdemo: pbdemo.o pbutil.o
|
||||
$(APP_CC) $(CFLAGS) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
|
||||
|
||||
glxgears_fbconfig.o: pbutil.h
|
||||
pbinfo.o: pbinfo.c pbutil.h
|
||||
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
|
||||
|
||||
pbdemo.o: pbdemo.c pbutil.h
|
||||
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbdemo.c
|
||||
|
||||
pbutil.o: pbutil.c pbutil.h
|
||||
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
|
||||
|
||||
glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
|
||||
$(APP_CC) $(CFLAGS) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
|
||||
|
||||
xuserotfont.o: xuserotfont.h
|
||||
xrotfontdemo.o: xuserotfont.h
|
||||
glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
|
||||
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
|
||||
|
||||
xrotfontdemo: xrotfontdemo.o xuserotfont.o
|
||||
$(APP_CC) $(CFLAGS) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
|
||||
|
||||
ipc.o: ipc.h
|
||||
corender.o: ipc.h
|
||||
xuserotfont.o: xuserotfont.c xuserotfont.h
|
||||
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
|
||||
|
||||
xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
|
||||
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
|
||||
|
||||
corender: corender.o ipc.o
|
||||
$(APP_CC) $(CFLAGS) $(LDFLAGS) corender.o ipc.o $(LIBS) -o $@
|
||||
|
||||
yuvrect_client: yuvrect_client.o
|
||||
$(APP_CC) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
|
||||
corender.o: corender.c ipc.h
|
||||
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c
|
||||
|
||||
ipc.o: ipc.c ipc.h
|
||||
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) ipc.c
|
||||
|
||||
yuvrect_client: yuvrect_client.c
|
||||
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
|
||||
|
||||
|
@@ -51,13 +51,9 @@
|
||||
#include "eglsurface.h"
|
||||
#include "eglimage.h"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
struct dri2_egl_driver
|
||||
{
|
||||
_EGLDriver base;
|
||||
|
||||
void (*glFlush)(void);
|
||||
};
|
||||
|
||||
struct dri2_egl_display
|
||||
@@ -165,7 +161,7 @@ EGLint dri2_to_egl_attribute_map[] = {
|
||||
0, /* __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA */
|
||||
0, /* __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE */
|
||||
0, /* __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS */
|
||||
EGL_Y_INVERTED_NOK, /* __DRI_ATTRIB_YINVERTED */
|
||||
0, /* __DRI_ATTRIB_YINVERTED */
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -256,8 +252,9 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
_eglSetConfigKey(&base,
|
||||
EGL_BIND_TO_TEXTURE_RGBA, bind_to_texture_rgba);
|
||||
|
||||
_eglSetConfigKey(&base, EGL_RENDERABLE_TYPE, disp->ClientAPIsMask);
|
||||
_eglSetConfigKey(&base, EGL_CONFORMANT, disp->ClientAPIsMask);
|
||||
/* EGL_OPENGL_ES_BIT, EGL_OPENVG_BIT, EGL_OPENGL_ES2_BIT */
|
||||
_eglSetConfigKey(&base, EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT);
|
||||
_eglSetConfigKey(&base, EGL_CONFORMANT, EGL_OPENGL_BIT);
|
||||
|
||||
if (!_eglValidateConfig(&base, EGL_FALSE)) {
|
||||
_eglLog(_EGL_DEBUG, "DRI2: failed to validate config %d", id);
|
||||
@@ -644,7 +641,6 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
const __DRIextension **extensions;
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
char path[PATH_MAX], *search_paths, *p, *next, *end;
|
||||
unsigned int api_mask;
|
||||
|
||||
dri2_dpy = malloc(sizeof *dri2_dpy);
|
||||
if (!dri2_dpy)
|
||||
@@ -687,12 +683,10 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
snprintf(path, sizeof path,
|
||||
dri_driver_format, (int) (next - p), p, dri2_dpy->driver_name);
|
||||
dri2_dpy->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
|
||||
if (dri2_dpy->driver == NULL)
|
||||
_eglLog(_EGL_DEBUG, "failed to open %s: %s\n", path, dlerror());
|
||||
}
|
||||
|
||||
if (dri2_dpy->driver == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
_eglLog(_EGL_FATAL,
|
||||
"DRI2: failed to open any driver (search paths %s)",
|
||||
search_paths);
|
||||
goto cleanup_conn;
|
||||
@@ -701,7 +695,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
|
||||
extensions = dlsym(dri2_dpy->driver, __DRI_DRIVER_EXTENSIONS);
|
||||
if (extensions == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
_eglLog(_EGL_FATAL,
|
||||
"DRI2: driver exports no extensions (%s)", dlerror());
|
||||
goto cleanup_driver;
|
||||
}
|
||||
@@ -711,9 +705,8 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
|
||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
|
||||
if (dri2_dpy->fd == -1) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"DRI2: could not open %s (%s)", dri2_dpy->device_name,
|
||||
strerror(errno));
|
||||
_eglLog(_EGL_FATAL,
|
||||
"DRI2: could not open %s (%s)", path, strerror(errno));
|
||||
goto cleanup_driver;
|
||||
}
|
||||
|
||||
@@ -750,7 +743,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
&dri2_dpy->driver_configs, dri2_dpy);
|
||||
|
||||
if (dri2_dpy->dri_screen == NULL) {
|
||||
_eglLog(_EGL_WARNING, "DRI2: failed to create dri screen");
|
||||
_eglLog(_EGL_FATAL, "DRI2: failed to create dri screen");
|
||||
goto cleanup_fd;
|
||||
}
|
||||
|
||||
@@ -758,30 +751,15 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
if (!dri2_bind_extensions(dri2_dpy, dri2_core_extensions, extensions))
|
||||
goto cleanup_dri_screen;
|
||||
|
||||
if (dri2_dpy->dri2->base.version >= 2)
|
||||
api_mask = dri2_dpy->dri2->getAPIMask(dri2_dpy->dri_screen);
|
||||
else
|
||||
api_mask = __DRI_API_OPENGL;
|
||||
|
||||
disp->ClientAPIsMask = 0;
|
||||
if (api_mask & (1 <<__DRI_API_OPENGL))
|
||||
disp->ClientAPIsMask |= EGL_OPENGL_BIT;
|
||||
if (api_mask & (1 <<__DRI_API_GLES))
|
||||
disp->ClientAPIsMask |= EGL_OPENGL_ES_BIT;
|
||||
if (api_mask & (1 << __DRI_API_GLES2))
|
||||
disp->ClientAPIsMask |= EGL_OPENGL_ES2_BIT;
|
||||
|
||||
if (dri2_dpy->conn) {
|
||||
if (!dri2_add_configs_for_visuals(dri2_dpy, disp))
|
||||
goto cleanup_configs;
|
||||
}
|
||||
|
||||
disp->ClientAPIsMask = EGL_OPENGL_BIT;
|
||||
disp->Extensions.KHR_image_base = EGL_TRUE;
|
||||
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
|
||||
disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
|
||||
disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
|
||||
disp->Extensions.NOK_swap_region = EGL_TRUE;
|
||||
disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE;
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
*major = 1;
|
||||
@@ -840,7 +818,6 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_context *dri2_ctx_shared = dri2_egl_context(share_list);
|
||||
struct dri2_egl_config *dri2_config = dri2_egl_config(conf);
|
||||
int api;
|
||||
|
||||
dri2_ctx = malloc(sizeof *dri2_ctx);
|
||||
if (!dri2_ctx) {
|
||||
@@ -851,46 +828,12 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
if (!_eglInitContext(&dri2_ctx->base, disp, conf, attrib_list))
|
||||
goto cleanup;
|
||||
|
||||
switch (dri2_ctx->base.ClientAPI) {
|
||||
case EGL_OPENGL_ES_API:
|
||||
switch (dri2_ctx->base.ClientVersion) {
|
||||
case 1:
|
||||
api = __DRI_API_GLES;
|
||||
break;
|
||||
case 2:
|
||||
api = __DRI_API_GLES2;
|
||||
break;
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "eglCreateContext");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case EGL_OPENGL_API:
|
||||
api = __DRI_API_OPENGL;
|
||||
break;
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "eglCreateContext");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri2->base.version >= 2) {
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->dri2->createNewContextForAPI(dri2_dpy->dri_screen,
|
||||
api,
|
||||
dri2_config->dri_config,
|
||||
dri2_ctx_shared ?
|
||||
dri2_ctx_shared->dri_context : NULL,
|
||||
dri2_ctx);
|
||||
} else if (api == __DRI_API_OPENGL) {
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->dri2->createNewContext(dri2_dpy->dri_screen,
|
||||
dri2_config->dri_config,
|
||||
dri2_ctx_shared ?
|
||||
dri2_ctx_shared->dri_context : NULL,
|
||||
dri2_ctx);
|
||||
} else {
|
||||
/* fail */
|
||||
}
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->dri2->createNewContext(dri2_dpy->dri_screen,
|
||||
dri2_config->dri_config,
|
||||
dri2_ctx_shared ?
|
||||
dri2_ctx_shared->dri_context : NULL,
|
||||
dri2_ctx);
|
||||
|
||||
if (!dri2_ctx->dri_context)
|
||||
goto cleanup;
|
||||
@@ -930,7 +873,6 @@ static EGLBoolean
|
||||
dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
|
||||
_EGLSurface *rsurf, _EGLContext *ctx)
|
||||
{
|
||||
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_dsurf = dri2_egl_surface(dsurf);
|
||||
struct dri2_egl_surface *dri2_rsurf = dri2_egl_surface(rsurf);
|
||||
@@ -942,10 +884,6 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
|
||||
if (!_eglBindContext(&ctx, &dsurf, &rsurf))
|
||||
return EGL_FALSE;
|
||||
|
||||
/* flush before context switch */
|
||||
if (ctx && dri2_drv->glFlush)
|
||||
dri2_drv->glFlush();
|
||||
|
||||
ddraw = (dri2_dsurf) ? dri2_dsurf->dri_drawable : NULL;
|
||||
rdraw = (dri2_rsurf) ? dri2_rsurf->dri_drawable : NULL;
|
||||
cctx = (dri2_ctx) ? dri2_ctx->dri_context : NULL;
|
||||
@@ -1071,21 +1009,12 @@ dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLSurface *draw, xcb_xfixes_region_t region)
|
||||
dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
{
|
||||
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
_EGLContext *ctx;
|
||||
xcb_dri2_copy_region_cookie_t cookie;
|
||||
|
||||
if (dri2_drv->glFlush) {
|
||||
ctx = _eglGetCurrentContext();
|
||||
if (ctx && ctx->DrawSurface == &dri2_surf->base)
|
||||
dri2_drv->glFlush();
|
||||
}
|
||||
|
||||
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
|
||||
|
||||
#if 0
|
||||
@@ -1104,7 +1033,7 @@ dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
|
||||
cookie = xcb_dri2_copy_region_unchecked(dri2_dpy->conn,
|
||||
dri2_surf->drawable,
|
||||
region,
|
||||
dri2_surf->region,
|
||||
XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT,
|
||||
XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT);
|
||||
free(xcb_dri2_copy_region_reply(dri2_dpy->conn, cookie, NULL));
|
||||
@@ -1112,44 +1041,6 @@ dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
|
||||
return dri2_copy_region(drv, disp, draw, dri2_surf->region);
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
|
||||
EGLint numRects, const EGLint *rects)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
EGLBoolean ret;
|
||||
xcb_xfixes_region_t region;
|
||||
xcb_rectangle_t rectangles[16];
|
||||
int i;
|
||||
|
||||
if (numRects > ARRAY_SIZE(rectangles))
|
||||
return dri2_copy_region(drv, disp, draw, dri2_surf->region);
|
||||
|
||||
/* FIXME: Invert y here? */
|
||||
for (i = 0; i < numRects; i++) {
|
||||
rectangles[i].x = rects[i * 4];
|
||||
rectangles[i].y = rects[i * 4 + 1];
|
||||
rectangles[i].width = rects[i * 4 + 2];
|
||||
rectangles[i].height = rects[i * 4 + 3];
|
||||
}
|
||||
|
||||
region = xcb_generate_id(dri2_dpy->conn);
|
||||
xcb_xfixes_create_region(dri2_dpy->conn, region, numRects, rectangles);
|
||||
ret = dri2_copy_region(drv, disp, draw, region);
|
||||
xcb_xfixes_destroy_region(dri2_dpy->conn, region);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called from eglGetProcAddress() via drv->API.GetProcAddress().
|
||||
*/
|
||||
@@ -1230,8 +1121,19 @@ dri2_bind_tex_image(_EGLDriver *drv,
|
||||
ctx = _eglGetCurrentContext();
|
||||
dri2_ctx = dri2_egl_context(ctx);
|
||||
|
||||
if (!_eglBindTexImage(drv, disp, surf, buffer))
|
||||
if (buffer != EGL_BACK_BUFFER) {
|
||||
_eglError(EGL_BAD_PARAMETER, "eglBindTexImage");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
/* We allow binding pixmaps too... Not conformat, but we can do it
|
||||
* for free and it's useful for X compositors. Supposedly there's
|
||||
* a EGL_NOKIA_texture_from_pixmap extension that allows that, but
|
||||
* I couldn't find it at this time. */
|
||||
if ((dri2_surf->base.Type & (EGL_PBUFFER_BIT | EGL_PIXMAP_BIT)) == 0) {
|
||||
_eglError(EGL_BAD_SURFACE, "eglBindTexImage");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
switch (dri2_surf->base.TextureFormat) {
|
||||
case EGL_TEXTURE_RGB:
|
||||
@@ -1241,7 +1143,8 @@ dri2_bind_tex_image(_EGLDriver *drv,
|
||||
format = __DRI_TEXTURE_FORMAT_RGBA;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
_eglError(EGL_BAD_MATCH, "eglBindTexImage");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
switch (dri2_surf->base.TextureTarget) {
|
||||
@@ -1249,14 +1152,15 @@ dri2_bind_tex_image(_EGLDriver *drv,
|
||||
target = GL_TEXTURE_2D;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
_eglError(EGL_BAD_PARAMETER, "eglBindTexImage");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
(*dri2_dpy->tex_buffer->setTexBuffer2)(dri2_ctx->dri_context,
|
||||
target, format,
|
||||
dri2_surf->dri_drawable);
|
||||
|
||||
return EGL_TRUE;
|
||||
return dri2_surf->base.BoundToTexture = EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
@@ -1426,7 +1330,6 @@ _eglMain(const char *args)
|
||||
if (!dri2_drv)
|
||||
return NULL;
|
||||
|
||||
memset(dri2_drv, 0, sizeof *dri2_drv);
|
||||
_eglInitDriverFallbacks(&dri2_drv->base);
|
||||
dri2_drv->base.API.Initialize = dri2_initialize;
|
||||
dri2_drv->base.API.Terminate = dri2_terminate;
|
||||
@@ -1445,13 +1348,9 @@ _eglMain(const char *args)
|
||||
dri2_drv->base.API.ReleaseTexImage = dri2_release_tex_image;
|
||||
dri2_drv->base.API.CreateImageKHR = dri2_create_image_khr;
|
||||
dri2_drv->base.API.DestroyImageKHR = dri2_destroy_image_khr;
|
||||
dri2_drv->base.API.SwapBuffersRegionNOK = dri2_swap_buffers_region;
|
||||
|
||||
dri2_drv->base.Name = "DRI2";
|
||||
dri2_drv->base.Unload = dri2_unload;
|
||||
|
||||
dri2_drv->glFlush =
|
||||
(void (*)(void)) dri2_get_proc_address(&dri2_drv->base, "glFlush");
|
||||
|
||||
return &dri2_drv->base;
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ EGL_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/egl/main
|
||||
|
||||
EGL_CFLAGS = $(X11_CFLAGS)
|
||||
EGL_LIBS = $(X11_LIBS) -lGL
|
||||
EGL_CFLAGS =
|
||||
EGL_LIBS = -lX11 -lGL
|
||||
|
||||
include ../Makefile.template
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include "eglconfigutil.h"
|
||||
#include "eglconfig.h"
|
||||
#include "eglcontext.h"
|
||||
#include "egldefines.h"
|
||||
#include "egldisplay.h"
|
||||
#include "egldriver.h"
|
||||
#include "eglcurrent.h"
|
||||
@@ -49,6 +48,7 @@
|
||||
#include "eglsurface.h"
|
||||
|
||||
#define CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T))
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
#ifndef GLX_VERSION_1_4
|
||||
#error "GL/glx.h must be equal to or greater than GLX 1.4"
|
||||
|
@@ -7,7 +7,7 @@ include $(TOP)/configs/current
|
||||
EGL_MAJOR = 1
|
||||
EGL_MINOR = 0
|
||||
|
||||
INCLUDE_DIRS = -I$(TOP)/include $(X11_CFLAGS)
|
||||
INCLUDE_DIRS = -I$(TOP)/include
|
||||
|
||||
HEADERS = \
|
||||
eglcompiler.h \
|
||||
@@ -82,27 +82,10 @@ install-headers:
|
||||
$(INSTALL) -m 644 $(TOP)/include/EGL/*.h \
|
||||
$(DESTDIR)$(INSTALL_INC_DIR)/EGL
|
||||
|
||||
PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
|
||||
|
||||
gl_pcedit = sed \
|
||||
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
||||
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
|
||||
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
|
||||
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
|
||||
-e 's,@EGL_PC_REQ_PRIV@,$(EGL_PC_REQ_PRIV),' \
|
||||
-e 's,@EGL_PC_LIB_PRIV@,$(EGL_PC_LIB_PRIV),' \
|
||||
-e 's,@EGL_PC_CFLAGS@,$(EGL_PC_CFLAGS),' \
|
||||
-e 's,@EGL_LIB@,$(EGL_LIB),'
|
||||
|
||||
egl.pc: egl.pc.in
|
||||
$(gl_pcedit) $< > $@
|
||||
|
||||
install: default install-headers egl.pc
|
||||
install: default install-headers
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(EGL_LIB_GLOB) \
|
||||
$(DESTDIR)$(INSTALL_LIB_DIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
|
||||
$(INSTALL) -m 644 egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
|
||||
|
||||
clean:
|
||||
-rm -f *.o
|
||||
|
@@ -1,12 +0,0 @@
|
||||
prefix=@INSTALL_DIR@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@INSTALL_LIB_DIR@
|
||||
includedir=@INSTALL_INC_DIR@
|
||||
|
||||
Name: egl
|
||||
Description: Mesa EGL library
|
||||
Requires.private: @EGL_PC_REQ_PRIV@
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -l@EGL_LIB@
|
||||
Libs.private: @EGL_PC_LIB_PRIV@
|
||||
Cflags: -I${includedir} @EGL_PC_CFLAGS@
|
@@ -261,7 +261,7 @@ EGLBoolean EGLAPIENTRY
|
||||
eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
|
||||
{
|
||||
_EGLDisplay *disp = _eglLockDisplay(dpy);
|
||||
EGLint major_int = 0, minor_int = 0;
|
||||
EGLint major_int, minor_int;
|
||||
|
||||
if (!disp)
|
||||
RETURN_EGL_ERROR(NULL, EGL_BAD_DISPLAY, EGL_FALSE);
|
||||
@@ -272,15 +272,13 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
|
||||
if (!drv) {
|
||||
_eglPreloadDrivers();
|
||||
drv = _eglMatchDriver(disp);
|
||||
/* Initialize the particular display now */
|
||||
if (drv && !drv->API.Initialize(drv, disp, &major_int, &minor_int))
|
||||
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
|
||||
if (!drv)
|
||||
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
|
||||
}
|
||||
if (!drv)
|
||||
/* Load and initialize the first default driver that works */
|
||||
drv = _eglLoadDefaultDriver(disp, &major_int, &minor_int);
|
||||
if (!drv)
|
||||
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
|
||||
|
||||
/* Initialize the particular display now */
|
||||
if (!drv->API.Initialize(drv, disp, &major_int, &minor_int))
|
||||
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
|
||||
|
||||
disp->APImajor = major_int;
|
||||
disp->APIminor = minor_int;
|
||||
@@ -838,9 +836,6 @@ eglGetProcAddress(const char *procname)
|
||||
{ "eglCreateImageKHR", (_EGLProc) eglCreateImageKHR },
|
||||
{ "eglDestroyImageKHR", (_EGLProc) eglDestroyImageKHR },
|
||||
#endif /* EGL_KHR_image_base */
|
||||
#ifdef EGL_NOK_swap_region
|
||||
{ "eglSwapBuffersRegionNOK", (_EGLProc) eglSwapBuffersRegionNOK },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
EGLint i;
|
||||
@@ -1249,32 +1244,3 @@ eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
|
||||
|
||||
|
||||
#endif /* EGL_KHR_image_base */
|
||||
|
||||
|
||||
#ifdef EGL_NOK_swap_region
|
||||
|
||||
EGLBoolean
|
||||
eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLint numRects, const EGLint *rects)
|
||||
{
|
||||
_EGLContext *ctx = _eglGetCurrentContext();
|
||||
_EGLDisplay *disp = _eglLockDisplay(dpy);
|
||||
_EGLSurface *surf = _eglLookupSurface(surface, disp);
|
||||
_EGLDriver *drv;
|
||||
EGLBoolean ret;
|
||||
|
||||
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
|
||||
|
||||
/* surface must be bound to current context in EGL 1.4 */
|
||||
if (!ctx || !_eglIsContextLinked(ctx) || surf != ctx->DrawSurface)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
||||
|
||||
if (drv->API.SwapBuffersRegionNOK)
|
||||
ret = drv->API.SwapBuffersRegionNOK(drv, disp, surf, numRects, rects);
|
||||
else
|
||||
ret = drv->API.SwapBuffers(drv, disp, surf);
|
||||
|
||||
RETURN_EGL_EVAL(disp, ret);
|
||||
}
|
||||
|
||||
#endif /* EGL_NOK_swap_region */
|
||||
|
@@ -76,9 +76,6 @@ typedef _EGLImage *(*CreateImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLCo
|
||||
typedef EGLBoolean (*DestroyImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image);
|
||||
#endif /* EGL_KHR_image_base */
|
||||
|
||||
#ifdef EGL_NOK_swap_region
|
||||
typedef EGLBoolean (*SwapBuffersRegionNOK_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint numRects, const EGLint *rects);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The API dispatcher jumps through these functions
|
||||
@@ -137,10 +134,6 @@ struct _egl_api
|
||||
CreateImageKHR_t CreateImageKHR;
|
||||
DestroyImageKHR_t DestroyImageKHR;
|
||||
#endif /* EGL_KHR_image_base */
|
||||
|
||||
#ifdef EGL_NOK_swap_region
|
||||
SwapBuffersRegionNOK_t SwapBuffersRegionNOK;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* EGLAPI_INCLUDED */
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
|
||||
#define MIN2(A, B) (((A) < (B)) ? (A) : (B))
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
|
||||
/**
|
||||
@@ -223,12 +224,7 @@ static const struct {
|
||||
0 },
|
||||
{ EGL_NONE, ATTRIB_TYPE_PSEUDO,
|
||||
ATTRIB_CRITERION_IGNORE,
|
||||
0 },
|
||||
|
||||
{ EGL_Y_INVERTED_NOK, ATTRIB_TYPE_BOOLEAN,
|
||||
ATTRIB_CRITERION_EXACT,
|
||||
EGL_DONT_CARE },
|
||||
|
||||
0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -483,28 +479,6 @@ _eglMatchConfig(const _EGLConfig *conf, const _EGLConfig *criteria)
|
||||
return matched;
|
||||
}
|
||||
|
||||
static INLINE EGLBoolean
|
||||
_eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
|
||||
{
|
||||
if (_eglIndexConfig(conf, attr) < 0)
|
||||
return EGL_FALSE;
|
||||
|
||||
/* there are some holes in the range */
|
||||
switch (attr) {
|
||||
case 0x3030 /* a gap before EGL_SAMPLES */:
|
||||
case EGL_NONE:
|
||||
#ifdef EGL_VERSION_1_4
|
||||
case EGL_MATCH_NATIVE_PIXMAP:
|
||||
#endif
|
||||
return EGL_FALSE;
|
||||
case EGL_Y_INVERTED_NOK:
|
||||
return conf->Display->Extensions.NOK_texture_from_pixmap;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a criteria config from the given attribute list.
|
||||
@@ -527,13 +501,15 @@ _eglParseConfigAttribList(_EGLConfig *conf, const EGLint *attrib_list)
|
||||
|
||||
/* parse the list */
|
||||
for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i += 2) {
|
||||
EGLint idx;
|
||||
|
||||
attr = attrib_list[i];
|
||||
val = attrib_list[i + 1];
|
||||
|
||||
if (!_eglIsConfigAttribValid(conf, attr))
|
||||
return EGL_FALSE;
|
||||
|
||||
SET_CONFIG_ATTRIB(conf, attr, val);
|
||||
idx = _eglIndexConfig(conf, attr);
|
||||
if (idx < 0)
|
||||
return EGL_FALSE;
|
||||
conf->Storage[idx] = val;
|
||||
|
||||
/* rememeber some attributes for post-processing */
|
||||
switch (attr) {
|
||||
@@ -806,6 +782,28 @@ _eglChooseConfig(_EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list,
|
||||
}
|
||||
|
||||
|
||||
static INLINE EGLBoolean
|
||||
_eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
|
||||
{
|
||||
if (_eglIndexConfig(conf, attr) < 0)
|
||||
return EGL_FALSE;
|
||||
|
||||
/* there are some holes in the range */
|
||||
switch (attr) {
|
||||
case 0x3030 /* a gap before EGL_SAMPLES */:
|
||||
case EGL_NONE:
|
||||
#ifdef EGL_VERSION_1_4
|
||||
case EGL_MATCH_NATIVE_PIXMAP:
|
||||
#endif
|
||||
return EGL_FALSE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fallback for eglGetConfigAttrib.
|
||||
*/
|
||||
|
@@ -8,24 +8,16 @@
|
||||
|
||||
#define _EGL_CONFIG_FIRST_ATTRIB EGL_BUFFER_SIZE
|
||||
#define _EGL_CONFIG_LAST_ATTRIB EGL_CONFORMANT
|
||||
#define _EGL_CONFIG_NUM_CONTIGUOUS_ATTRIBS \
|
||||
#define _EGL_CONFIG_NUM_ATTRIBS \
|
||||
(_EGL_CONFIG_LAST_ATTRIB - _EGL_CONFIG_FIRST_ATTRIB + 1)
|
||||
|
||||
/* Attributes outside the contiguous block:
|
||||
*
|
||||
* EGL_Y_INVERTED_NOK
|
||||
*/
|
||||
#define _EGL_CONFIG_FIRST_EXTRA_ATTRIB _EGL_CONFIG_NUM_CONTIGUOUS_ATTRIBS
|
||||
#define _EGL_CONFIG_NUM_EXTRA_ATTRIBS 1
|
||||
|
||||
#define _EGL_CONFIG_NUM_ATTRIBS \
|
||||
_EGL_CONFIG_NUM_CONTIGUOUS_ATTRIBS + _EGL_CONFIG_NUM_EXTRA_ATTRIBS
|
||||
#define _EGL_CONFIG_STORAGE_SIZE _EGL_CONFIG_NUM_ATTRIBS
|
||||
|
||||
|
||||
struct _egl_config
|
||||
{
|
||||
_EGLDisplay *Display;
|
||||
EGLint Storage[_EGL_CONFIG_NUM_ATTRIBS];
|
||||
EGLint Storage[_EGL_CONFIG_STORAGE_SIZE];
|
||||
};
|
||||
|
||||
|
||||
@@ -45,15 +37,10 @@ _eglIndexConfig(const _EGLConfig *conf, EGLint key)
|
||||
{
|
||||
(void) conf;
|
||||
if (key >= _EGL_CONFIG_FIRST_ATTRIB &&
|
||||
key < _EGL_CONFIG_FIRST_ATTRIB + _EGL_CONFIG_NUM_CONTIGUOUS_ATTRIBS)
|
||||
key < _EGL_CONFIG_FIRST_ATTRIB + _EGL_CONFIG_NUM_ATTRIBS)
|
||||
return key - _EGL_CONFIG_FIRST_ATTRIB;
|
||||
|
||||
switch (key) {
|
||||
case EGL_Y_INVERTED_NOK:
|
||||
return _EGL_CONFIG_FIRST_EXTRA_ATTRIB;
|
||||
default:
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -40,7 +40,6 @@
|
||||
|
||||
#define _EGL_VENDOR_STRING "Mesa Project"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
|
||||
#endif /* EGLDEFINES_INCLUDED */
|
||||
|
@@ -46,8 +46,6 @@ struct _egl_extensions
|
||||
EGLBoolean KHR_gl_texture_cubemap_image;
|
||||
EGLBoolean KHR_gl_texture_3D_image;
|
||||
EGLBoolean KHR_gl_renderbuffer_image;
|
||||
EGLBoolean NOK_swap_region;
|
||||
EGLBoolean NOK_texture_from_pixmap;
|
||||
|
||||
char String[_EGL_MAX_EXTENSIONS_LEN];
|
||||
};
|
||||
|
@@ -36,9 +36,7 @@
|
||||
|
||||
|
||||
/* XXX Need to decide how to do dynamic name lookup on Windows */
|
||||
static const char DefaultDriverNames[] = {
|
||||
"TBD",
|
||||
};
|
||||
static const char DefaultDriverName[] = "TBD";
|
||||
|
||||
typedef HMODULE lib_handle;
|
||||
|
||||
@@ -65,10 +63,7 @@ library_suffix(void)
|
||||
#elif defined(_EGL_PLATFORM_POSIX)
|
||||
|
||||
|
||||
static const char *DefaultDriverNames[] = {
|
||||
"egl_dri2",
|
||||
"egl_glx"
|
||||
};
|
||||
static const char DefaultDriverName[] = "egl_glx";
|
||||
|
||||
typedef void * lib_handle;
|
||||
|
||||
@@ -92,6 +87,32 @@ library_suffix(void)
|
||||
}
|
||||
|
||||
|
||||
#else /* _EGL_PLATFORM_NO_OS */
|
||||
|
||||
|
||||
static const char DefaultDriverName[] = "builtin";
|
||||
|
||||
typedef void *lib_handle;
|
||||
|
||||
static INLINE void *
|
||||
open_library(const char *filename)
|
||||
{
|
||||
return (void *) filename;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
close_library(void *lib)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
library_suffix(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -136,6 +157,12 @@ _eglOpenLibrary(const char *driverPath, lib_handle *handle)
|
||||
else {
|
||||
error = dlerror();
|
||||
}
|
||||
#else /* _EGL_PLATFORM_NO_OS */
|
||||
/* must be the default driver name */
|
||||
if (strcmp(driverPath, DefaultDriverName) == 0)
|
||||
mainFunc = (_EGLMain_t) _eglMain;
|
||||
else
|
||||
error = "not builtin driver";
|
||||
#endif
|
||||
|
||||
if (!lib) {
|
||||
@@ -266,9 +293,9 @@ _eglLoaderFile(const char *dir, size_t len, void *loader_data)
|
||||
len += flen;
|
||||
path[len] = '\0';
|
||||
|
||||
if (library_suffix() == NULL || strstr(path, library_suffix()))
|
||||
drv = _eglLoadDriver(path, NULL);
|
||||
else {
|
||||
drv = _eglLoadDriver(path, NULL);
|
||||
/* fix the path and load again */
|
||||
if (!drv && library_suffix()) {
|
||||
const char *suffix = library_suffix();
|
||||
size_t slen = strlen(suffix);
|
||||
const char *p;
|
||||
@@ -279,8 +306,6 @@ _eglLoaderFile(const char *dir, size_t len, void *loader_data)
|
||||
if (need_suffix && len + slen + 1 <= sizeof(path)) {
|
||||
strcpy(path + len, suffix);
|
||||
drv = _eglLoadDriver(path, NULL);
|
||||
} else {
|
||||
drv = NULL;
|
||||
}
|
||||
}
|
||||
if (!drv)
|
||||
@@ -492,6 +517,17 @@ _eglPreloadDisplayDrivers(void)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Preload the default driver.
|
||||
*/
|
||||
static EGLBoolean
|
||||
_eglPreloadDefaultDriver(void)
|
||||
{
|
||||
return (_eglPreloadForEach(_eglGetSearchPath(),
|
||||
_eglLoaderFile, (void *) DefaultDriverName) > 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Preload drivers.
|
||||
*
|
||||
@@ -513,13 +549,15 @@ _eglPreloadDrivers(void)
|
||||
}
|
||||
|
||||
loaded = (_eglPreloadUserDriver() ||
|
||||
_eglPreloadDisplayDrivers());
|
||||
_eglPreloadDisplayDrivers() ||
|
||||
_eglPreloadDefaultDriver());
|
||||
|
||||
_eglUnlockMutex(_eglGlobal.Mutex);
|
||||
|
||||
return loaded;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unload preloaded drivers.
|
||||
*/
|
||||
@@ -550,30 +588,6 @@ _eglUnloadDrivers(void)
|
||||
_eglGlobal.NumDrivers = 0;
|
||||
}
|
||||
|
||||
_EGLDriver *
|
||||
_eglLoadDefaultDriver(EGLDisplay dpy, EGLint *major, EGLint *minor)
|
||||
{
|
||||
_EGLDriver *drv = NULL;
|
||||
int i;
|
||||
|
||||
_eglLockMutex(_eglGlobal.Mutex);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(DefaultDriverNames); i++) {
|
||||
_eglPreloadForEach(_eglGetSearchPath(),
|
||||
_eglLoaderFile, (void *) DefaultDriverNames[i]);
|
||||
if (_eglGlobal.NumDrivers == 0)
|
||||
continue;
|
||||
drv = _eglGlobal.Drivers[0];
|
||||
if (drv->API.Initialize(drv, dpy, major, minor))
|
||||
break;
|
||||
_eglUnloadDrivers();
|
||||
}
|
||||
|
||||
_eglUnlockMutex(_eglGlobal.Mutex);
|
||||
|
||||
return drv;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Plug all the available fallback routines into the given driver's
|
||||
|
@@ -84,10 +84,6 @@ extern void
|
||||
_eglUnloadDrivers(void);
|
||||
|
||||
|
||||
extern _EGLDriver *
|
||||
_eglLoadDefaultDriver(EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||
|
||||
|
||||
PUBLIC void
|
||||
_eglInitDriverFallbacks(_EGLDriver *drv);
|
||||
|
||||
|
@@ -6,6 +6,9 @@
|
||||
#include "eglmutex.h"
|
||||
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
|
||||
static _EGL_DECLARE_MUTEX(_eglGlobalMutex);
|
||||
struct _egl_global _eglGlobal =
|
||||
{
|
||||
|
@@ -96,8 +96,6 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
|
||||
_EGL_CHECK_EXTENSION(KHR_gl_texture_3D_image);
|
||||
_EGL_CHECK_EXTENSION(KHR_gl_renderbuffer_image);
|
||||
|
||||
_EGL_CHECK_EXTENSION(NOK_swap_region);
|
||||
_EGL_CHECK_EXTENSION(NOK_texture_from_pixmap);
|
||||
#undef _EGL_CHECK_EXTENSION
|
||||
}
|
||||
|
||||
|
@@ -36,17 +36,12 @@ _eglClampSwapInterval(_EGLSurface *surf, EGLint interval)
|
||||
static EGLint
|
||||
_eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
|
||||
{
|
||||
_EGLDisplay *dpy = surf->Resource.Display;
|
||||
EGLint type = surf->Type;
|
||||
EGLint texture_type = EGL_PBUFFER_BIT;
|
||||
EGLint i, err = EGL_SUCCESS;
|
||||
|
||||
if (!attrib_list)
|
||||
return EGL_SUCCESS;
|
||||
|
||||
if (dpy->Extensions.NOK_texture_from_pixmap)
|
||||
texture_type |= EGL_PIXMAP_BIT;
|
||||
|
||||
for (i = 0; attrib_list[i] != EGL_NONE; i++) {
|
||||
EGLint attr = attrib_list[i++];
|
||||
EGLint val = attrib_list[i];
|
||||
@@ -130,7 +125,7 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
|
||||
surf->LargestPbuffer = !!val;
|
||||
break;
|
||||
case EGL_TEXTURE_FORMAT:
|
||||
if (!(type & texture_type)) {
|
||||
if (type != EGL_PBUFFER_BIT) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
@@ -148,7 +143,7 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
|
||||
surf->TextureFormat = val;
|
||||
break;
|
||||
case EGL_TEXTURE_TARGET:
|
||||
if (!(type & texture_type)) {
|
||||
if (type != EGL_PBUFFER_BIT) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
@@ -165,7 +160,7 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
|
||||
surf->TextureTarget = val;
|
||||
break;
|
||||
case EGL_MIPMAP_TEXTURE:
|
||||
if (!(type & texture_type)) {
|
||||
if (type != EGL_PBUFFER_BIT) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
@@ -457,16 +452,11 @@ EGLBoolean
|
||||
_eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
|
||||
EGLint buffer)
|
||||
{
|
||||
EGLint texture_type = EGL_PBUFFER_BIT;
|
||||
|
||||
/* Just do basic error checking and return success/fail.
|
||||
* Drivers must implement the real stuff.
|
||||
*/
|
||||
|
||||
if (dpy->Extensions.NOK_texture_from_pixmap)
|
||||
texture_type |= EGL_PIXMAP_BIT;
|
||||
|
||||
if (!(surface->Type & texture_type)) {
|
||||
if (surface->Type != EGL_PBUFFER_BIT) {
|
||||
_eglError(EGL_BAD_SURFACE, "eglBindTexImage");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
@@ -476,11 +466,6 @@ _eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (surface->TextureTarget == EGL_NO_TEXTURE) {
|
||||
_eglError(EGL_BAD_MATCH, "eglBindTexImage");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (buffer != EGL_BACK_BUFFER) {
|
||||
_eglError(EGL_BAD_PARAMETER, "eglBindTexImage");
|
||||
return EGL_FALSE;
|
||||
|
@@ -83,7 +83,7 @@ extern EGLBoolean
|
||||
_eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint attribute, EGLint value);
|
||||
|
||||
|
||||
PUBLIC extern EGLBoolean
|
||||
extern EGLBoolean
|
||||
_eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint buffer);
|
||||
|
||||
|
||||
|
@@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_math.h"
|
||||
#include "draw_context.h"
|
||||
@@ -39,7 +38,7 @@
|
||||
#include "draw_gs.h"
|
||||
|
||||
|
||||
struct draw_context *draw_create( struct pipe_context *pipe )
|
||||
struct draw_context *draw_create( void )
|
||||
{
|
||||
struct draw_context *draw = CALLOC_STRUCT( draw_context );
|
||||
if (draw == NULL)
|
||||
@@ -69,8 +68,6 @@ struct draw_context *draw_create( struct pipe_context *pipe )
|
||||
if (!draw_gs_init( draw ))
|
||||
goto fail;
|
||||
|
||||
draw->pipe = pipe;
|
||||
|
||||
return draw;
|
||||
|
||||
fail:
|
||||
@@ -81,21 +78,10 @@ fail:
|
||||
|
||||
void draw_destroy( struct draw_context *draw )
|
||||
{
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
int i, j;
|
||||
|
||||
if (!draw)
|
||||
return;
|
||||
|
||||
/* free any rasterizer CSOs that we may have created.
|
||||
*/
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
if (draw->rasterizer_no_cull[i][j]) {
|
||||
pipe->delete_rasterizer_state(pipe, draw->rasterizer_no_cull[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Not so fast -- we're just borrowing this at the moment.
|
||||
*
|
||||
@@ -137,17 +123,12 @@ void draw_set_mrd(struct draw_context *draw, double mrd)
|
||||
* This causes the drawing pipeline to be rebuilt.
|
||||
*/
|
||||
void draw_set_rasterizer_state( struct draw_context *draw,
|
||||
const struct pipe_rasterizer_state *raster,
|
||||
void *rast_handle )
|
||||
const struct pipe_rasterizer_state *raster )
|
||||
{
|
||||
if (!draw->suspend_flushing) {
|
||||
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
|
||||
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
|
||||
|
||||
draw->rasterizer = raster;
|
||||
draw->rast_handle = rast_handle;
|
||||
|
||||
draw->bypass_clipping = draw->driver.bypass_clipping;
|
||||
}
|
||||
draw->rasterizer = raster;
|
||||
draw->bypass_clipping = draw->driver.bypass_clipping;
|
||||
}
|
||||
|
||||
|
||||
@@ -500,37 +481,3 @@ draw_current_shader_position_output(const struct draw_context *draw)
|
||||
return draw->gs.position_output;
|
||||
return draw->vs.position_output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a pointer/handle for a driver/CSO rasterizer object which
|
||||
* disabled culling, stippling, unfilled tris, etc.
|
||||
* This is used by some pipeline stages (such as wide_point, aa_line
|
||||
* and aa_point) which convert points/lines into triangles. In those
|
||||
* cases we don't want to accidentally cull the triangles.
|
||||
*
|
||||
* \param scissor should the rasterizer state enable scissoring?
|
||||
* \param flatshade should the rasterizer state use flat shading?
|
||||
* \return rasterizer CSO handle
|
||||
*/
|
||||
void *
|
||||
draw_get_rasterizer_no_cull( struct draw_context *draw,
|
||||
boolean scissor,
|
||||
boolean flatshade )
|
||||
{
|
||||
if (!draw->rasterizer_no_cull[scissor][flatshade]) {
|
||||
/* create now */
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
struct pipe_rasterizer_state rast;
|
||||
|
||||
memset(&rast, 0, sizeof(rast));
|
||||
rast.scissor = scissor;
|
||||
rast.flatshade = flatshade;
|
||||
rast.front_winding = PIPE_WINDING_CCW;
|
||||
rast.gl_rasterization_rules = draw->rasterizer->gl_rasterization_rules;
|
||||
|
||||
draw->rasterizer_no_cull[scissor][flatshade] =
|
||||
pipe->create_rasterizer_state(pipe, &rast);
|
||||
}
|
||||
return draw->rasterizer_no_cull[scissor][flatshade];
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ struct draw_geometry_shader;
|
||||
struct tgsi_sampler;
|
||||
|
||||
|
||||
struct draw_context *draw_create( struct pipe_context *pipe );
|
||||
struct draw_context *draw_create( void );
|
||||
|
||||
void draw_destroy( struct draw_context *draw );
|
||||
|
||||
@@ -60,8 +60,7 @@ void draw_set_clip_state( struct draw_context *pipe,
|
||||
const struct pipe_clip_state *clip );
|
||||
|
||||
void draw_set_rasterizer_state( struct draw_context *draw,
|
||||
const struct pipe_rasterizer_state *raster,
|
||||
void *rast_handle );
|
||||
const struct pipe_rasterizer_state *raster );
|
||||
|
||||
void draw_set_rasterize_stage( struct draw_context *draw,
|
||||
struct draw_stage *stage );
|
||||
|
@@ -113,6 +113,8 @@ struct aaline_stage
|
||||
void **);
|
||||
void (*driver_set_sampler_textures)(struct pipe_context *, unsigned,
|
||||
struct pipe_texture **);
|
||||
|
||||
struct pipe_context *pipe;
|
||||
};
|
||||
|
||||
|
||||
@@ -337,7 +339,6 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
|
||||
static boolean
|
||||
generate_aaline_fs(struct aaline_stage *aaline)
|
||||
{
|
||||
struct pipe_context *pipe = aaline->stage.draw->pipe;
|
||||
const struct pipe_shader_state *orig_fs = &aaline->fs->state;
|
||||
struct pipe_shader_state aaline_fs;
|
||||
struct aa_transform_context transform;
|
||||
@@ -370,7 +371,7 @@ generate_aaline_fs(struct aaline_stage *aaline)
|
||||
aaline->fs->sampler_unit = transform.freeSampler;
|
||||
|
||||
aaline->fs->aaline_fs
|
||||
= aaline->driver_create_fs_state(pipe, &aaline_fs);
|
||||
= aaline->driver_create_fs_state(aaline->pipe, &aaline_fs);
|
||||
if (aaline->fs->aaline_fs == NULL)
|
||||
goto fail;
|
||||
|
||||
@@ -390,7 +391,7 @@ fail:
|
||||
static boolean
|
||||
aaline_create_texture(struct aaline_stage *aaline)
|
||||
{
|
||||
struct pipe_context *pipe = aaline->stage.draw->pipe;
|
||||
struct pipe_context *pipe = aaline->pipe;
|
||||
struct pipe_screen *screen = pipe->screen;
|
||||
struct pipe_texture texTemp;
|
||||
uint level;
|
||||
@@ -463,7 +464,7 @@ static boolean
|
||||
aaline_create_sampler(struct aaline_stage *aaline)
|
||||
{
|
||||
struct pipe_sampler_state sampler;
|
||||
struct pipe_context *pipe = aaline->stage.draw->pipe;
|
||||
struct pipe_context *pipe = aaline->pipe;
|
||||
|
||||
memset(&sampler, 0, sizeof(sampler));
|
||||
sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
|
||||
@@ -492,14 +493,13 @@ static boolean
|
||||
bind_aaline_fragment_shader(struct aaline_stage *aaline)
|
||||
{
|
||||
struct draw_context *draw = aaline->stage.draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
|
||||
if (!aaline->fs->aaline_fs &&
|
||||
!generate_aaline_fs(aaline))
|
||||
return FALSE;
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
aaline->driver_bind_fs_state(pipe, aaline->fs->aaline_fs);
|
||||
aaline->driver_bind_fs_state(aaline->pipe, aaline->fs->aaline_fs);
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
return TRUE;
|
||||
@@ -639,10 +639,8 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
|
||||
{
|
||||
auto struct aaline_stage *aaline = aaline_stage(stage);
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
struct pipe_context *pipe = aaline->pipe;
|
||||
uint num_samplers;
|
||||
void *r;
|
||||
|
||||
assert(draw->rasterizer->line_smooth);
|
||||
|
||||
@@ -681,11 +679,6 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
|
||||
draw->suspend_flushing = TRUE;
|
||||
aaline->driver_bind_sampler_states(pipe, num_samplers, aaline->state.sampler);
|
||||
aaline->driver_set_sampler_textures(pipe, num_samplers, aaline->state.texture);
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
/* now really draw first line */
|
||||
@@ -699,7 +692,7 @@ aaline_flush(struct draw_stage *stage, unsigned flags)
|
||||
{
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct aaline_stage *aaline = aaline_stage(stage);
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
struct pipe_context *pipe = aaline->pipe;
|
||||
|
||||
stage->line = aaline_first_line;
|
||||
stage->next->flush( stage->next, flags );
|
||||
@@ -711,12 +704,6 @@ aaline_flush(struct draw_stage *stage, unsigned flags)
|
||||
aaline->state.sampler);
|
||||
aaline->driver_set_sampler_textures(pipe, aaline->num_textures,
|
||||
aaline->state.texture);
|
||||
|
||||
/* restore original rasterizer state */
|
||||
if (draw->rast_handle) {
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
}
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
draw->extra_shader_outputs.slot = 0;
|
||||
@@ -734,7 +721,6 @@ static void
|
||||
aaline_destroy(struct draw_stage *stage)
|
||||
{
|
||||
struct aaline_stage *aaline = aaline_stage(stage);
|
||||
struct pipe_context *pipe = stage->draw->pipe;
|
||||
uint i;
|
||||
|
||||
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
|
||||
@@ -742,7 +728,7 @@ aaline_destroy(struct draw_stage *stage)
|
||||
}
|
||||
|
||||
if (aaline->sampler_cso)
|
||||
pipe->delete_sampler_state(pipe, aaline->sampler_cso);
|
||||
aaline->pipe->delete_sampler_state(aaline->pipe, aaline->sampler_cso);
|
||||
|
||||
if (aaline->texture)
|
||||
pipe_texture_reference(&aaline->texture, NULL);
|
||||
@@ -801,14 +787,13 @@ aaline_create_fs_state(struct pipe_context *pipe,
|
||||
{
|
||||
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
|
||||
struct aaline_fragment_shader *aafs = CALLOC_STRUCT(aaline_fragment_shader);
|
||||
|
||||
if (aafs == NULL)
|
||||
return NULL;
|
||||
|
||||
aafs->state = *fs;
|
||||
|
||||
/* pass-through */
|
||||
aafs->driver_fs = aaline->driver_create_fs_state(pipe, fs);
|
||||
aafs->driver_fs = aaline->driver_create_fs_state(aaline->pipe, fs);
|
||||
|
||||
return aafs;
|
||||
}
|
||||
@@ -823,7 +808,8 @@ aaline_bind_fs_state(struct pipe_context *pipe, void *fs)
|
||||
/* save current */
|
||||
aaline->fs = aafs;
|
||||
/* pass-through */
|
||||
aaline->driver_bind_fs_state(pipe, (aafs ? aafs->driver_fs : NULL));
|
||||
aaline->driver_bind_fs_state(aaline->pipe,
|
||||
(aafs ? aafs->driver_fs : NULL));
|
||||
}
|
||||
|
||||
|
||||
@@ -832,12 +818,11 @@ aaline_delete_fs_state(struct pipe_context *pipe, void *fs)
|
||||
{
|
||||
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
|
||||
struct aaline_fragment_shader *aafs = (struct aaline_fragment_shader *) fs;
|
||||
|
||||
/* pass-through */
|
||||
aaline->driver_delete_fs_state(pipe, aafs->driver_fs);
|
||||
aaline->driver_delete_fs_state(aaline->pipe, aafs->driver_fs);
|
||||
|
||||
if (aafs->aaline_fs)
|
||||
aaline->driver_delete_fs_state(pipe, aafs->aaline_fs);
|
||||
aaline->driver_delete_fs_state(aaline->pipe, aafs->aaline_fs);
|
||||
|
||||
FREE(aafs);
|
||||
}
|
||||
@@ -854,7 +839,7 @@ aaline_bind_sampler_states(struct pipe_context *pipe,
|
||||
aaline->num_samplers = num;
|
||||
|
||||
/* pass-through */
|
||||
aaline->driver_bind_sampler_states(pipe, num, sampler);
|
||||
aaline->driver_bind_sampler_states(aaline->pipe, num, sampler);
|
||||
}
|
||||
|
||||
|
||||
@@ -875,7 +860,7 @@ aaline_set_sampler_textures(struct pipe_context *pipe,
|
||||
aaline->num_textures = num;
|
||||
|
||||
/* pass-through */
|
||||
aaline->driver_set_sampler_textures(pipe, num, texture);
|
||||
aaline->driver_set_sampler_textures(aaline->pipe, num, texture);
|
||||
}
|
||||
|
||||
|
||||
@@ -898,6 +883,8 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
|
||||
if (!aaline)
|
||||
goto fail;
|
||||
|
||||
aaline->pipe = pipe;
|
||||
|
||||
/* create special texture, sampler state */
|
||||
if (!aaline_create_texture(aaline))
|
||||
goto fail;
|
||||
|
@@ -107,6 +107,8 @@ struct aapoint_stage
|
||||
const struct pipe_shader_state *);
|
||||
void (*driver_bind_fs_state)(struct pipe_context *, void *);
|
||||
void (*driver_delete_fs_state)(struct pipe_context *, void *);
|
||||
|
||||
struct pipe_context *pipe;
|
||||
};
|
||||
|
||||
|
||||
@@ -497,7 +499,6 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
|
||||
struct pipe_shader_state aapoint_fs;
|
||||
struct aa_transform_context transform;
|
||||
const uint newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS;
|
||||
struct pipe_context *pipe = aapoint->stage.draw->pipe;
|
||||
|
||||
aapoint_fs = *orig_fs; /* copy to init */
|
||||
aapoint_fs.tokens = tgsi_alloc_tokens(newLen);
|
||||
@@ -526,7 +527,7 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
|
||||
#endif
|
||||
|
||||
aapoint->fs->aapoint_fs
|
||||
= aapoint->driver_create_fs_state(pipe, &aapoint_fs);
|
||||
= aapoint->driver_create_fs_state(aapoint->pipe, &aapoint_fs);
|
||||
if (aapoint->fs->aapoint_fs == NULL)
|
||||
goto fail;
|
||||
|
||||
@@ -548,14 +549,13 @@ static boolean
|
||||
bind_aapoint_fragment_shader(struct aapoint_stage *aapoint)
|
||||
{
|
||||
struct draw_context *draw = aapoint->stage.draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
|
||||
if (!aapoint->fs->aapoint_fs &&
|
||||
!generate_aapoint_fs(aapoint))
|
||||
return FALSE;
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
aapoint->driver_bind_fs_state(pipe, aapoint->fs->aapoint_fs);
|
||||
aapoint->driver_bind_fs_state(aapoint->pipe, aapoint->fs->aapoint_fs);
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
return TRUE;
|
||||
@@ -679,9 +679,6 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header)
|
||||
{
|
||||
auto struct aapoint_stage *aapoint = aapoint_stage(stage);
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
void *r;
|
||||
|
||||
assert(draw->rasterizer->point_smooth);
|
||||
|
||||
@@ -719,14 +716,6 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header)
|
||||
}
|
||||
}
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
/* now really draw first point */
|
||||
stage->point = aapoint_point;
|
||||
stage->point(stage, header);
|
||||
@@ -738,7 +727,7 @@ aapoint_flush(struct draw_stage *stage, unsigned flags)
|
||||
{
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct aapoint_stage *aapoint = aapoint_stage(stage);
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
struct pipe_context *pipe = aapoint->pipe;
|
||||
|
||||
stage->point = aapoint_first_point;
|
||||
stage->next->flush( stage->next, flags );
|
||||
@@ -746,12 +735,6 @@ aapoint_flush(struct draw_stage *stage, unsigned flags)
|
||||
/* restore original frag shader */
|
||||
draw->suspend_flushing = TRUE;
|
||||
aapoint->driver_bind_fs_state(pipe, aapoint->fs->driver_fs);
|
||||
|
||||
/* restore original rasterizer state */
|
||||
if (draw->rast_handle) {
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
}
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
draw->extra_shader_outputs.slot = 0;
|
||||
@@ -828,7 +811,7 @@ aapoint_create_fs_state(struct pipe_context *pipe,
|
||||
aafs->state = *fs;
|
||||
|
||||
/* pass-through */
|
||||
aafs->driver_fs = aapoint->driver_create_fs_state(pipe, fs);
|
||||
aafs->driver_fs = aapoint->driver_create_fs_state(aapoint->pipe, fs);
|
||||
|
||||
return aafs;
|
||||
}
|
||||
@@ -842,7 +825,7 @@ aapoint_bind_fs_state(struct pipe_context *pipe, void *fs)
|
||||
/* save current */
|
||||
aapoint->fs = aafs;
|
||||
/* pass-through */
|
||||
aapoint->driver_bind_fs_state(pipe,
|
||||
aapoint->driver_bind_fs_state(aapoint->pipe,
|
||||
(aafs ? aafs->driver_fs : NULL));
|
||||
}
|
||||
|
||||
@@ -854,10 +837,10 @@ aapoint_delete_fs_state(struct pipe_context *pipe, void *fs)
|
||||
struct aapoint_fragment_shader *aafs = (struct aapoint_fragment_shader *) fs;
|
||||
|
||||
/* pass-through */
|
||||
aapoint->driver_delete_fs_state(pipe, aafs->driver_fs);
|
||||
aapoint->driver_delete_fs_state(aapoint->pipe, aafs->driver_fs);
|
||||
|
||||
if (aafs->aapoint_fs)
|
||||
aapoint->driver_delete_fs_state(pipe, aafs->aapoint_fs);
|
||||
aapoint->driver_delete_fs_state(aapoint->pipe, aafs->aapoint_fs);
|
||||
|
||||
FREE(aafs);
|
||||
}
|
||||
@@ -874,6 +857,8 @@ draw_install_aapoint_stage(struct draw_context *draw,
|
||||
{
|
||||
struct aapoint_stage *aapoint;
|
||||
|
||||
pipe->draw = (void *) draw;
|
||||
|
||||
/*
|
||||
* Create / install AA point drawing / prim stage
|
||||
*/
|
||||
@@ -881,6 +866,8 @@ draw_install_aapoint_stage(struct draw_context *draw,
|
||||
if (aapoint == NULL)
|
||||
return FALSE;
|
||||
|
||||
aapoint->pipe = pipe;
|
||||
|
||||
/* save original driver functions */
|
||||
aapoint->driver_create_fs_state = pipe->create_fs_state;
|
||||
aapoint->driver_bind_fs_state = pipe->bind_fs_state;
|
||||
|
@@ -28,7 +28,6 @@
|
||||
/* Authors: Keith Whitwell <keith@tungstengraphics.com>
|
||||
*/
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "pipe/p_shader_tokens.h"
|
||||
#include "util/u_math.h"
|
||||
@@ -143,40 +142,9 @@ static void wideline_line( struct draw_stage *stage,
|
||||
}
|
||||
|
||||
|
||||
static void wideline_first_line( struct draw_stage *stage,
|
||||
struct prim_header *header )
|
||||
{
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
void *r;
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
|
||||
draw->suspend_flushing = TRUE;
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
stage->line = wideline_line;
|
||||
|
||||
wideline_line(stage, header);
|
||||
}
|
||||
|
||||
|
||||
static void wideline_flush( struct draw_stage *stage, unsigned flags )
|
||||
{
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
|
||||
stage->line = wideline_first_line;
|
||||
stage->next->flush( stage->next, flags );
|
||||
|
||||
/* restore original rasterizer state */
|
||||
if (draw->rast_handle) {
|
||||
draw->suspend_flushing = TRUE;
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
draw->suspend_flushing = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +171,7 @@ struct draw_stage *draw_wide_line_stage( struct draw_context *draw )
|
||||
wide->stage.name = "wide-line";
|
||||
wide->stage.next = NULL;
|
||||
wide->stage.point = draw_pipe_passthrough_point;
|
||||
wide->stage.line = wideline_first_line;
|
||||
wide->stage.line = wideline_line;
|
||||
wide->stage.tri = draw_pipe_passthrough_tri;
|
||||
wide->stage.flush = wideline_flush;
|
||||
wide->stage.reset_stipple_counter = wideline_reset_stipple_counter;
|
||||
|
@@ -52,7 +52,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "pipe/p_defines.h"
|
||||
@@ -214,9 +213,6 @@ static void widepoint_first_point( struct draw_stage *stage,
|
||||
{
|
||||
struct widepoint_stage *wide = widepoint_stage(stage);
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
void *r;
|
||||
|
||||
wide->half_point_size = 0.5f * draw->rasterizer->point_size;
|
||||
wide->xbias = 0.0;
|
||||
@@ -226,12 +222,6 @@ static void widepoint_first_point( struct draw_stage *stage,
|
||||
wide->xbias = 0.125;
|
||||
}
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
|
||||
draw->suspend_flushing = TRUE;
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
draw->suspend_flushing = FALSE;
|
||||
|
||||
/* XXX we won't know the real size if it's computed by the vertex shader! */
|
||||
if ((draw->rasterizer->point_size > draw->pipeline.wide_point_threshold) ||
|
||||
(draw->rasterizer->sprite_coord_enable && draw->pipeline.point_sprite)) {
|
||||
@@ -287,19 +277,9 @@ static void widepoint_first_point( struct draw_stage *stage,
|
||||
|
||||
static void widepoint_flush( struct draw_stage *stage, unsigned flags )
|
||||
{
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct pipe_context *pipe = draw->pipe;
|
||||
|
||||
stage->point = widepoint_first_point;
|
||||
stage->next->flush( stage->next, flags );
|
||||
stage->draw->extra_shader_outputs.slot = 0;
|
||||
|
||||
/* restore original rasterizer state */
|
||||
if (draw->rast_handle) {
|
||||
draw->suspend_flushing = TRUE;
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
draw->suspend_flushing = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -82,8 +82,6 @@ struct vertex_header {
|
||||
*/
|
||||
struct draw_context
|
||||
{
|
||||
struct pipe_context *pipe;
|
||||
|
||||
/** Drawing/primitive pipeline stages */
|
||||
struct {
|
||||
struct draw_stage *first; /**< one of the following */
|
||||
@@ -176,14 +174,8 @@ struct draw_context
|
||||
|
||||
double mrd; /**< minimum resolvable depth value, for polygon offset */
|
||||
|
||||
/** Current rasterizer state given to us by the driver */
|
||||
/* pipe state that we need: */
|
||||
const struct pipe_rasterizer_state *rasterizer;
|
||||
/** Driver CSO handle for the current rasterizer state */
|
||||
void *rast_handle;
|
||||
|
||||
/** Rasterizer CSOs without culling/stipple/etc */
|
||||
void *rasterizer_no_cull[2][2];
|
||||
|
||||
struct pipe_viewport_state viewport;
|
||||
boolean identity_viewport;
|
||||
|
||||
@@ -353,10 +345,5 @@ void draw_do_flush( struct draw_context *draw, unsigned flags );
|
||||
|
||||
|
||||
|
||||
void *
|
||||
draw_get_rasterizer_no_cull( struct draw_context *draw,
|
||||
boolean scissor,
|
||||
boolean flatshade );
|
||||
|
||||
|
||||
#endif /* DRAW_PRIVATE_H */
|
||||
|
2
src/gallium/auxiliary/indices/.gitignore
vendored
2
src/gallium/auxiliary/indices/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
u_indices_gen.c
|
||||
u_unfilled_gen.c
|
5129
src/gallium/auxiliary/indices/u_indices_gen.c
Normal file
5129
src/gallium/auxiliary/indices/u_indices_gen.c
Normal file
File diff suppressed because it is too large
Load Diff
992
src/gallium/auxiliary/indices/u_unfilled_gen.c
Normal file
992
src/gallium/auxiliary/indices/u_unfilled_gen.c
Normal file
@@ -0,0 +1,992 @@
|
||||
/* File automatically generated by u_unfilled_gen.py */
|
||||
|
||||
/*
|
||||
* Copyright 2009 VMware, Inc.
|
||||
* 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
|
||||
* on 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
|
||||
* VMWARE 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Functions to translate and generate index lists
|
||||
*/
|
||||
|
||||
#include "indices/u_indices.h"
|
||||
#include "indices/u_indices_priv.h"
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
|
||||
static unsigned out_size_idx( unsigned index_size )
|
||||
{
|
||||
switch (index_size) {
|
||||
case 4: return OUT_UINT;
|
||||
case 2: return OUT_USHORT;
|
||||
default: assert(0); return OUT_USHORT;
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned in_size_idx( unsigned index_size )
|
||||
{
|
||||
switch (index_size) {
|
||||
case 4: return IN_UINT;
|
||||
case 2: return IN_USHORT;
|
||||
case 1: return IN_UBYTE;
|
||||
default: assert(0); return IN_UBYTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static u_generate_func generate_line[OUT_COUNT][PRIM_COUNT];
|
||||
static u_translate_func translate_line[IN_COUNT][OUT_COUNT][PRIM_COUNT];
|
||||
|
||||
|
||||
static void generate_tris_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)(i);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(i);
|
||||
}
|
||||
}
|
||||
static void generate_tristrip_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)(i);
|
||||
(out+j)[1] = (ushort)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[0] = (ushort)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[1] = (ushort)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[0] = (ushort)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[1] = (ushort)(i);
|
||||
}
|
||||
}
|
||||
static void generate_trifan_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)(0);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(0);
|
||||
}
|
||||
}
|
||||
static void generate_quads_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)(i+0);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(i+3);
|
||||
(out+j+6)[0] = (ushort)(i+3);
|
||||
(out+j+6)[1] = (ushort)(i+0);
|
||||
}
|
||||
}
|
||||
static void generate_quadstrip_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)(i+2);
|
||||
(out+j)[1] = (ushort)(i+0);
|
||||
(out+j+2)[0] = (ushort)(i+0);
|
||||
(out+j+2)[1] = (ushort)(i+1);
|
||||
(out+j+4)[0] = (ushort)(i+1);
|
||||
(out+j+4)[1] = (ushort)(i+3);
|
||||
(out+j+6)[0] = (ushort)(i+3);
|
||||
(out+j+6)[1] = (ushort)(i+2);
|
||||
}
|
||||
}
|
||||
static void generate_polygon_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)(0);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(0);
|
||||
}
|
||||
}
|
||||
static void generate_tris_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)(i);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(i);
|
||||
}
|
||||
}
|
||||
static void generate_tristrip_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)(i);
|
||||
(out+j)[1] = (uint)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[0] = (uint)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[1] = (uint)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[0] = (uint)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[1] = (uint)(i);
|
||||
}
|
||||
}
|
||||
static void generate_trifan_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)(0);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(0);
|
||||
}
|
||||
}
|
||||
static void generate_quads_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)(i+0);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(i+3);
|
||||
(out+j+6)[0] = (uint)(i+3);
|
||||
(out+j+6)[1] = (uint)(i+0);
|
||||
}
|
||||
}
|
||||
static void generate_quadstrip_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)(i+2);
|
||||
(out+j)[1] = (uint)(i+0);
|
||||
(out+j+2)[0] = (uint)(i+0);
|
||||
(out+j+2)[1] = (uint)(i+1);
|
||||
(out+j+4)[0] = (uint)(i+1);
|
||||
(out+j+4)[1] = (uint)(i+3);
|
||||
(out+j+6)[0] = (uint)(i+3);
|
||||
(out+j+6)[1] = (uint)(i+2);
|
||||
}
|
||||
}
|
||||
static void generate_polygon_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)(0);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(0);
|
||||
}
|
||||
}
|
||||
static void translate_tris_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)in[i+0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)in[i+2];
|
||||
(out+j)[1] = (ushort)in[i+0];
|
||||
(out+j+2)[0] = (ushort)in[i+0];
|
||||
(out+j+2)[1] = (ushort)in[i+1];
|
||||
(out+j+4)[0] = (ushort)in[i+1];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)in[i+0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)in[i+2];
|
||||
(out+j)[1] = (uint)in[i+0];
|
||||
(out+j+2)[0] = (uint)in[i+0];
|
||||
(out+j+2)[1] = (uint)in[i+1];
|
||||
(out+j+4)[0] = (uint)in[i+1];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)in[i+0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)in[i+2];
|
||||
(out+j)[1] = (ushort)in[i+0];
|
||||
(out+j+2)[0] = (ushort)in[i+0];
|
||||
(out+j+2)[1] = (ushort)in[i+1];
|
||||
(out+j+4)[0] = (ushort)in[i+1];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)in[i+0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)in[i+2];
|
||||
(out+j)[1] = (uint)in[i+0];
|
||||
(out+j+2)[0] = (uint)in[i+0];
|
||||
(out+j+2)[1] = (uint)in[i+1];
|
||||
(out+j+4)[0] = (uint)in[i+1];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)in[i+0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)in[i+2];
|
||||
(out+j)[1] = (ushort)in[i+0];
|
||||
(out+j+2)[0] = (ushort)in[i+0];
|
||||
(out+j+2)[1] = (ushort)in[i+1];
|
||||
(out+j+4)[0] = (ushort)in[i+1];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)in[i+0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)in[i+2];
|
||||
(out+j)[1] = (uint)in[i+0];
|
||||
(out+j+2)[0] = (uint)in[i+0];
|
||||
(out+j+2)[1] = (uint)in[i+1];
|
||||
(out+j+4)[0] = (uint)in[i+1];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
void u_unfilled_init( void )
|
||||
{
|
||||
static int firsttime = 1;
|
||||
if (!firsttime) return;
|
||||
firsttime = 0;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLES] = generate_tris_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_QUADS] = generate_quads_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_POLYGON] = generate_polygon_ushort;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_TRIANGLES] = generate_tris_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_QUADS] = generate_quads_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_POLYGON] = generate_polygon_uint;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint;
|
||||
}
|
||||
#include "indices/u_unfilled_indices.c"
|
@@ -29,7 +29,7 @@
|
||||
#define PIPE_ATOMIC_ASM_MSVC_X86
|
||||
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
|
||||
#define PIPE_ATOMIC_ASM_GCC_X86
|
||||
#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
|
||||
#elif defined(PIPE_CC_GCC)
|
||||
#define PIPE_ATOMIC_GCC_INTRINSIC
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
|
@@ -95,8 +95,6 @@ cell_get_param(struct pipe_screen *screen, int param)
|
||||
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
|
||||
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
|
||||
return 0;
|
||||
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@@ -136,16 +134,12 @@ cell_is_format_supported( struct pipe_screen *screen,
|
||||
unsigned tex_usage,
|
||||
unsigned geom_flags )
|
||||
{
|
||||
/* only a few formats are known to work at this time */
|
||||
switch (format) {
|
||||
case PIPE_FORMAT_Z24S8_UNORM:
|
||||
case PIPE_FORMAT_Z24X8_UNORM:
|
||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||
case PIPE_FORMAT_I8_UNORM:
|
||||
return TRUE;
|
||||
default:
|
||||
/* cell supports most formats, XXX for now anyway */
|
||||
if (format == PIPE_FORMAT_DXT5_RGBA ||
|
||||
format == PIPE_FORMAT_A8B8G8R8_SRGB)
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -210,7 +210,7 @@ i915_create_context(struct pipe_screen *screen, void *priv)
|
||||
/*
|
||||
* Create drawing context and plug our rendering stage into it.
|
||||
*/
|
||||
i915->draw = draw_create(&i915->base);
|
||||
i915->draw = draw_create();
|
||||
assert(i915->draw);
|
||||
if (!debug_get_bool_option("I915_NO_VBUF", FALSE)) {
|
||||
draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915));
|
||||
|
@@ -243,7 +243,7 @@ uint i915_emit_texld( struct i915_fp_compile *p,
|
||||
}
|
||||
else {
|
||||
assert(GET_UREG_TYPE(dest) != REG_TYPE_CONST);
|
||||
assert(dest == UREG(GET_UREG_TYPE(dest), GET_UREG_NR(dest)));
|
||||
assert(dest = UREG(GET_UREG_TYPE(dest), GET_UREG_NR(dest)));
|
||||
|
||||
/* is the sampler coord a texcoord input reg? */
|
||||
if (GET_UREG_TYPE(coord) != REG_TYPE_T) {
|
||||
|
@@ -714,8 +714,7 @@ static void i915_bind_rasterizer_state( struct pipe_context *pipe,
|
||||
|
||||
/* pass-through to draw module */
|
||||
draw_set_rasterizer_state(i915->draw,
|
||||
(i915->rasterizer ? i915->rasterizer->templ : NULL),
|
||||
raster);
|
||||
(i915->rasterizer ? i915->rasterizer->templ : NULL));
|
||||
|
||||
i915->dirty |= I915_NEW_RASTERIZER;
|
||||
}
|
||||
|
@@ -58,7 +58,6 @@ i965 = env.ConvenienceLibrary(
|
||||
'brw_vs_emit.c',
|
||||
'brw_vs_state.c',
|
||||
'brw_vs_surface_state.c',
|
||||
'brw_winsys_debug.c',
|
||||
'brw_wm.c',
|
||||
# 'brw_wm_constant_buffer.c',
|
||||
'brw_wm_debug.c',
|
||||
|
@@ -5,10 +5,9 @@ env = env.Clone()
|
||||
identity = env.ConvenienceLibrary(
|
||||
target = 'identity',
|
||||
source = [
|
||||
'id_context.c',
|
||||
'id_drm.c',
|
||||
'id_objects.c',
|
||||
'id_screen.c',
|
||||
'id_context.c',
|
||||
'id_objects.c',
|
||||
])
|
||||
|
||||
Export('identity')
|
||||
|
@@ -174,7 +174,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
|
||||
/*
|
||||
* Create drawing context and plug our rendering stage into it.
|
||||
*/
|
||||
llvmpipe->draw = draw_create(&llvmpipe->pipe);
|
||||
llvmpipe->draw = draw_create();
|
||||
if (!llvmpipe->draw)
|
||||
goto fail;
|
||||
|
||||
|
@@ -38,26 +38,19 @@ void *
|
||||
llvmpipe_create_rasterizer_state(struct pipe_context *pipe,
|
||||
const struct pipe_rasterizer_state *rast)
|
||||
{
|
||||
/* We do nothing special with rasterizer state.
|
||||
* The CSO handle is just a pointer to a pipe_rasterizer_state object.
|
||||
*/
|
||||
return mem_dup(rast, sizeof(*rast));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle)
|
||||
void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe,
|
||||
void *rasterizer)
|
||||
{
|
||||
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
|
||||
const struct pipe_rasterizer_state *rasterizer =
|
||||
(const struct pipe_rasterizer_state *) handle;
|
||||
|
||||
if (llvmpipe->rasterizer == rasterizer)
|
||||
return;
|
||||
|
||||
/* pass-through to draw module */
|
||||
draw_set_rasterizer_state(llvmpipe->draw, rasterizer, handle);
|
||||
draw_set_rasterizer_state(llvmpipe->draw, rasterizer);
|
||||
|
||||
llvmpipe->rasterizer = rasterizer;
|
||||
|
||||
@@ -75,7 +68,6 @@ llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle)
|
||||
llvmpipe->dirty |= LP_NEW_RASTERIZER;
|
||||
}
|
||||
|
||||
|
||||
void llvmpipe_delete_rasterizer_state(struct pipe_context *pipe,
|
||||
void *rasterizer)
|
||||
{
|
||||
|
@@ -76,7 +76,7 @@ nv30_create(struct pipe_screen *pscreen, void *priv)
|
||||
nv30_init_state_functions(nv30);
|
||||
|
||||
/* Create, configure, and install fallback swtnl path */
|
||||
nv30->draw = draw_create(&nv30->pipe);
|
||||
nv30->draw = draw_create();
|
||||
draw_wide_point_threshold(nv30->draw, 9999999.0);
|
||||
draw_wide_line_threshold(nv30->draw, 9999999.0);
|
||||
draw_enable_line_stipple(nv30->draw, FALSE);
|
||||
|
@@ -76,7 +76,7 @@ nv40_create(struct pipe_screen *pscreen, void *priv)
|
||||
nv40_init_state_functions(nv40);
|
||||
|
||||
/* Create, configure, and install fallback swtnl path */
|
||||
nv40->draw = draw_create(&nv40->pipe);
|
||||
nv40->draw = draw_create();
|
||||
draw_wide_point_threshold(nv40->draw, 9999999.0);
|
||||
draw_wide_line_threshold(nv40->draw, 9999999.0);
|
||||
draw_enable_line_stipple(nv40->draw, FALSE);
|
||||
|
@@ -164,7 +164,7 @@ nv40_state_validate_swtnl(struct nv40_context *nv40)
|
||||
draw_bind_vertex_shader(draw, nv40->vertprog->draw);
|
||||
|
||||
if (nv40->draw_dirty & NV40_NEW_RAST)
|
||||
draw_set_rasterizer_state(draw, &nv40->rasterizer->pipe, nv40->rasterizer);
|
||||
draw_set_rasterizer_state(draw, &nv40->rasterizer->pipe);
|
||||
|
||||
if (nv40->draw_dirty & NV40_NEW_UCP)
|
||||
draw_set_clip_state(draw, &nv40->clip);
|
||||
|
@@ -129,7 +129,7 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
|
||||
nv50_init_state_functions(nv50);
|
||||
nv50_init_query_functions(nv50);
|
||||
|
||||
nv50->draw = draw_create(&nv50->pipe);
|
||||
nv50->draw = draw_create();
|
||||
assert(nv50->draw);
|
||||
draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
|
||||
|
||||
|
@@ -181,7 +181,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
||||
r300->context.draw_range_elements = r300_swtcl_draw_range_elements;
|
||||
|
||||
/* Create a Draw. This is used for SW TCL. */
|
||||
r300->draw = draw_create(&r300->context);
|
||||
r300->draw = draw_create();
|
||||
/* Enable our renderer. */
|
||||
draw_set_rasterize_stage(r300->draw, r300_draw_stage(r300));
|
||||
/* Enable Draw's clipping. */
|
||||
|
@@ -810,7 +810,7 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
|
||||
|
||||
if (r300->draw) {
|
||||
draw_flush(r300->draw);
|
||||
draw_set_rasterizer_state(r300->draw, &rs->rs, state);
|
||||
draw_set_rasterizer_state(r300->draw, &rs->rs);
|
||||
}
|
||||
|
||||
if (rs) {
|
||||
|
@@ -453,6 +453,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
|
||||
static INLINE uint16_t
|
||||
r300_translate_vertex_data_swizzle(enum pipe_format format) {
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
unsigned swizzle[4], i;
|
||||
|
||||
assert(format);
|
||||
|
||||
@@ -462,10 +463,25 @@ r300_translate_vertex_data_swizzle(enum pipe_format format) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ((desc->swizzle[0] << R300_SWIZZLE_SELECT_X_SHIFT) |
|
||||
(desc->swizzle[1] << R300_SWIZZLE_SELECT_Y_SHIFT) |
|
||||
(desc->swizzle[2] << R300_SWIZZLE_SELECT_Z_SHIFT) |
|
||||
(desc->swizzle[3] << R300_SWIZZLE_SELECT_W_SHIFT) |
|
||||
/* Swizzles for 8bits formats are in the reversed order, not sure why. */
|
||||
if (desc->channel[0].size == 8) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (desc->swizzle[i] <= 3) {
|
||||
swizzle[i] = 3 - desc->swizzle[i];
|
||||
} else {
|
||||
swizzle[i] = desc->swizzle[i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 4; i++) {
|
||||
swizzle[i] = desc->swizzle[i];
|
||||
}
|
||||
}
|
||||
|
||||
return ((swizzle[0] << R300_SWIZZLE_SELECT_X_SHIFT) |
|
||||
(swizzle[1] << R300_SWIZZLE_SELECT_Y_SHIFT) |
|
||||
(swizzle[2] << R300_SWIZZLE_SELECT_Z_SHIFT) |
|
||||
(swizzle[3] << R300_SWIZZLE_SELECT_W_SHIFT) |
|
||||
(0xf << R300_WRITE_ENA_SHIFT));
|
||||
}
|
||||
|
||||
|
@@ -298,7 +298,7 @@ softpipe_create_context( struct pipe_screen *screen,
|
||||
/*
|
||||
* Create drawing context and plug our rendering stage into it.
|
||||
*/
|
||||
softpipe->draw = draw_create(&softpipe->pipe);
|
||||
softpipe->draw = draw_create();
|
||||
if (!softpipe->draw)
|
||||
goto fail;
|
||||
|
||||
|
@@ -744,8 +744,6 @@ blend_fallback(struct quad_stage *qs,
|
||||
|
||||
for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++)
|
||||
{
|
||||
/* which blend/mask state index to use: */
|
||||
const uint blend_buf = blend->independent_blend_enable ? cbuf : 0;
|
||||
float dest[4][QUAD_SIZE];
|
||||
struct softpipe_cached_tile *tile
|
||||
= sp_get_cached_tile(softpipe->cbuf_cache[cbuf],
|
||||
@@ -773,11 +771,11 @@ blend_fallback(struct quad_stage *qs,
|
||||
if (blend->logicop_enable) {
|
||||
logicop_quad( qs, quadColor, dest );
|
||||
}
|
||||
else if (blend->rt[blend_buf].blend_enable) {
|
||||
else if (blend->rt[cbuf].blend_enable) {
|
||||
blend_quad( qs, quadColor, dest, cbuf );
|
||||
}
|
||||
|
||||
if (blend->rt[blend_buf].colormask != 0xf)
|
||||
if (blend->rt[cbuf].colormask != 0xf)
|
||||
colormask_quad( blend->rt[cbuf].colormask, quadColor, dest);
|
||||
|
||||
/* Output color values
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2010 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -19,7 +18,7 @@
|
||||
* 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 THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
* IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS 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.
|
||||
@@ -27,7 +26,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
/**
|
||||
* \brief Quad depth / stencil testing
|
||||
* \brief Quad depth testing
|
||||
*/
|
||||
|
||||
#include "pipe/p_defines.h"
|
||||
@@ -97,9 +96,7 @@ get_depth_stencil_values( struct depth_data *data,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If the shader has not been run, interpolate the depth values
|
||||
/* If the shader has not been run, interpolate the depth values
|
||||
* ourselves.
|
||||
*/
|
||||
static void
|
||||
@@ -118,9 +115,6 @@ interpolate_quad_depth( struct quad_header *quad )
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compute the depth_data::qzzzz[] values from the float fragment Z values.
|
||||
*/
|
||||
static void
|
||||
convert_quad_depth( struct depth_data *data,
|
||||
const struct quad_header *quad )
|
||||
@@ -179,9 +173,6 @@ convert_quad_depth( struct depth_data *data,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Write data->bzzzz[] values and data->stencilVals into the Z/stencil buffer.
|
||||
*/
|
||||
static void
|
||||
write_depth_stencil_values( struct depth_data *data,
|
||||
struct quad_header *quad )
|
||||
@@ -234,6 +225,7 @@ write_depth_stencil_values( struct depth_data *data,
|
||||
|
||||
|
||||
|
||||
|
||||
/** Only 8-bit stencil supported */
|
||||
#define STENCIL_MAX 0xff
|
||||
|
||||
@@ -416,11 +408,12 @@ apply_stencil_op(struct depth_data *data,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* To increase efficiency, we should probably have multiple versions
|
||||
* of this function that are specifically for Z16, Z32 and FP Z buffers.
|
||||
* Try to effectively do that with codegen...
|
||||
*/
|
||||
|
||||
static boolean
|
||||
depth_test_quad(struct quad_stage *qs,
|
||||
struct depth_data *data,
|
||||
@@ -530,6 +523,7 @@ depth_stencil_test_quad(struct quad_stage *qs,
|
||||
wrtMask = softpipe->depth_stencil->stencil[face].writemask;
|
||||
valMask = softpipe->depth_stencil->stencil[face].valuemask;
|
||||
|
||||
|
||||
/* do the stencil test first */
|
||||
{
|
||||
unsigned passMask, failMask;
|
||||
@@ -569,7 +563,7 @@ depth_stencil_test_quad(struct quad_stage *qs,
|
||||
|
||||
|
||||
#define ALPHATEST( FUNC, COMP ) \
|
||||
static int \
|
||||
static int \
|
||||
alpha_test_quads_##FUNC( struct quad_stage *qs, \
|
||||
struct quad_header *quads[], \
|
||||
unsigned nr ) \
|
||||
@@ -635,7 +629,6 @@ alpha_test_quads(struct quad_stage *qs,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static unsigned mask_count[16] =
|
||||
{
|
||||
0, /* 0x0 */
|
||||
@@ -672,9 +665,6 @@ get_depth_bits(struct quad_stage *qs)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* General depth/stencil test function. Used when there's no fast-path.
|
||||
*/
|
||||
static void
|
||||
depth_test_quads_fallback(struct quad_stage *qs,
|
||||
struct quad_header *quads[],
|
||||
@@ -722,6 +712,7 @@ depth_test_quads_fallback(struct quad_stage *qs,
|
||||
write_depth_stencil_values(&data, quads[i]);
|
||||
}
|
||||
|
||||
|
||||
quads[pass++] = quads[i];
|
||||
}
|
||||
|
||||
@@ -739,36 +730,169 @@ depth_test_quads_fallback(struct quad_stage *qs,
|
||||
|
||||
|
||||
/**
|
||||
* Special-case Z testing for 16-bit Zbuffer and Z buffer writes enabled.
|
||||
* Special-case Z testing for 16-bit Zbuffer, PIPE_FUNC_LESS and
|
||||
* Z buffer writes enabled.
|
||||
*
|
||||
* NOTE: there's no guarantee that the quads are sequentially side by
|
||||
* side. The fragment shader may have culled some quads, etc. Sliver
|
||||
* triangles may generate non-sequential quads.
|
||||
*/
|
||||
static void
|
||||
depth_interp_z16_less_write(struct quad_stage *qs,
|
||||
struct quad_header *quads[],
|
||||
unsigned nr)
|
||||
{
|
||||
unsigned i, pass = 0;
|
||||
const unsigned ix = quads[0]->input.x0;
|
||||
const unsigned iy = quads[0]->input.y0;
|
||||
const float fx = (float) ix;
|
||||
const float fy = (float) iy;
|
||||
const float dzdx = quads[0]->posCoef->dadx[2];
|
||||
const float dzdy = quads[0]->posCoef->dady[2];
|
||||
const float z0 = quads[0]->posCoef->a0[2] + dzdx * fx + dzdy * fy;
|
||||
struct softpipe_cached_tile *tile;
|
||||
ushort (*depth16)[TILE_SIZE];
|
||||
ushort init_idepth[4], idepth[4], depth_step;
|
||||
const float scale = 65535.0;
|
||||
|
||||
#define NAME depth_interp_z16_less_write
|
||||
#define OPERATOR <
|
||||
#include "sp_quad_depth_test_tmp.h"
|
||||
/* compute scaled depth of the four pixels in first quad */
|
||||
init_idepth[0] = (ushort)((z0) * scale);
|
||||
init_idepth[1] = (ushort)((z0 + dzdx) * scale);
|
||||
init_idepth[2] = (ushort)((z0 + dzdy) * scale);
|
||||
init_idepth[3] = (ushort)((z0 + dzdx + dzdy) * scale);
|
||||
|
||||
#define NAME depth_interp_z16_equal_write
|
||||
#define OPERATOR ==
|
||||
#include "sp_quad_depth_test_tmp.h"
|
||||
depth_step = (ushort)(dzdx * scale);
|
||||
|
||||
#define NAME depth_interp_z16_lequal_write
|
||||
#define OPERATOR <=
|
||||
#include "sp_quad_depth_test_tmp.h"
|
||||
tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, ix, iy);
|
||||
|
||||
#define NAME depth_interp_z16_greater_write
|
||||
#define OPERATOR >
|
||||
#include "sp_quad_depth_test_tmp.h"
|
||||
for (i = 0; i < nr; i++) {
|
||||
const unsigned outmask = quads[i]->inout.mask;
|
||||
const int dx = quads[i]->input.x0 - ix;
|
||||
unsigned mask = 0;
|
||||
|
||||
#define NAME depth_interp_z16_notequal_write
|
||||
#define OPERATOR !=
|
||||
#include "sp_quad_depth_test_tmp.h"
|
||||
/* compute depth for this quad */
|
||||
idepth[0] = init_idepth[0] + dx * depth_step;
|
||||
idepth[1] = init_idepth[1] + dx * depth_step;
|
||||
idepth[2] = init_idepth[2] + dx * depth_step;
|
||||
idepth[3] = init_idepth[3] + dx * depth_step;
|
||||
|
||||
depth16 = (ushort (*)[TILE_SIZE])
|
||||
&tile->data.depth16[iy % TILE_SIZE][(ix + dx)% TILE_SIZE];
|
||||
|
||||
if ((outmask & 1) && idepth[0] < depth16[0][0]) {
|
||||
depth16[0][0] = idepth[0];
|
||||
mask |= (1 << 0);
|
||||
}
|
||||
|
||||
if ((outmask & 2) && idepth[1] < depth16[0][1]) {
|
||||
depth16[0][1] = idepth[1];
|
||||
mask |= (1 << 1);
|
||||
}
|
||||
|
||||
if ((outmask & 4) && idepth[2] < depth16[1][0]) {
|
||||
depth16[1][0] = idepth[2];
|
||||
mask |= (1 << 2);
|
||||
}
|
||||
|
||||
if ((outmask & 8) && idepth[3] < depth16[1][1]) {
|
||||
depth16[1][1] = idepth[3];
|
||||
mask |= (1 << 3);
|
||||
}
|
||||
|
||||
quads[i]->inout.mask = mask;
|
||||
if (quads[i]->inout.mask)
|
||||
quads[pass++] = quads[i];
|
||||
}
|
||||
|
||||
if (pass)
|
||||
qs->next->run(qs->next, quads, pass);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Special-case Z testing for 16-bit Zbuffer, PIPE_FUNC_LEQUAL and
|
||||
* Z buffer writes enabled.
|
||||
*
|
||||
* NOTE: there's no guarantee that the quads are sequentially side by
|
||||
* side. The fragment shader may have culled some quads, etc. Sliver
|
||||
* triangles may generate non-sequential quads.
|
||||
*/
|
||||
static void
|
||||
depth_interp_z16_lequal_write(struct quad_stage *qs,
|
||||
struct quad_header *quads[],
|
||||
unsigned nr)
|
||||
{
|
||||
unsigned i, pass = 0;
|
||||
const unsigned ix = quads[0]->input.x0;
|
||||
const unsigned iy = quads[0]->input.y0;
|
||||
const float fx = (float) ix;
|
||||
const float fy = (float) iy;
|
||||
const float dzdx = quads[0]->posCoef->dadx[2];
|
||||
const float dzdy = quads[0]->posCoef->dady[2];
|
||||
const float z0 = quads[0]->posCoef->a0[2] + dzdx * fx + dzdy * fy;
|
||||
struct softpipe_cached_tile *tile;
|
||||
ushort (*depth16)[TILE_SIZE];
|
||||
ushort init_idepth[4], idepth[4], depth_step;
|
||||
const float scale = 65535.0;
|
||||
|
||||
/* compute scaled depth of the four pixels in first quad */
|
||||
init_idepth[0] = (ushort)((z0) * scale);
|
||||
init_idepth[1] = (ushort)((z0 + dzdx) * scale);
|
||||
init_idepth[2] = (ushort)((z0 + dzdy) * scale);
|
||||
init_idepth[3] = (ushort)((z0 + dzdx + dzdy) * scale);
|
||||
|
||||
depth_step = (ushort)(dzdx * scale);
|
||||
|
||||
tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, ix, iy);
|
||||
|
||||
for (i = 0; i < nr; i++) {
|
||||
const unsigned outmask = quads[i]->inout.mask;
|
||||
const int dx = quads[i]->input.x0 - ix;
|
||||
unsigned mask = 0;
|
||||
|
||||
/* compute depth for this quad */
|
||||
idepth[0] = init_idepth[0] + dx * depth_step;
|
||||
idepth[1] = init_idepth[1] + dx * depth_step;
|
||||
idepth[2] = init_idepth[2] + dx * depth_step;
|
||||
idepth[3] = init_idepth[3] + dx * depth_step;
|
||||
|
||||
depth16 = (ushort (*)[TILE_SIZE])
|
||||
&tile->data.depth16[iy % TILE_SIZE][(ix + dx)% TILE_SIZE];
|
||||
|
||||
if ((outmask & 1) && idepth[0] <= depth16[0][0]) {
|
||||
depth16[0][0] = idepth[0];
|
||||
mask |= (1 << 0);
|
||||
}
|
||||
|
||||
if ((outmask & 2) && idepth[1] <= depth16[0][1]) {
|
||||
depth16[0][1] = idepth[1];
|
||||
mask |= (1 << 1);
|
||||
}
|
||||
|
||||
if ((outmask & 4) && idepth[2] <= depth16[1][0]) {
|
||||
depth16[1][0] = idepth[2];
|
||||
mask |= (1 << 2);
|
||||
}
|
||||
|
||||
if ((outmask & 8) && idepth[3] <= depth16[1][1]) {
|
||||
depth16[1][1] = idepth[3];
|
||||
mask |= (1 << 3);
|
||||
}
|
||||
|
||||
depth16 = (ushort (*)[TILE_SIZE]) &depth16[0][2];
|
||||
|
||||
quads[i]->inout.mask = mask;
|
||||
if (quads[i]->inout.mask)
|
||||
quads[pass++] = quads[i];
|
||||
}
|
||||
|
||||
if (pass)
|
||||
qs->next->run(qs->next, quads, pass);
|
||||
|
||||
}
|
||||
|
||||
#define NAME depth_interp_z16_gequal_write
|
||||
#define OPERATOR >=
|
||||
#include "sp_quad_depth_test_tmp.h"
|
||||
|
||||
#define NAME depth_interp_z16_always_write
|
||||
#define ALWAYS 1
|
||||
#include "sp_quad_depth_test_tmp.h"
|
||||
|
||||
|
||||
|
||||
@@ -802,10 +926,6 @@ choose_depth_test(struct quad_stage *qs,
|
||||
|
||||
boolean occlusion = qs->softpipe->active_query_count;
|
||||
|
||||
/* default */
|
||||
qs->run = depth_test_quads_fallback;
|
||||
|
||||
/* look for special cases */
|
||||
if (!alpha &&
|
||||
!depth &&
|
||||
!stencil) {
|
||||
@@ -818,62 +938,57 @@ choose_depth_test(struct quad_stage *qs,
|
||||
!occlusion &&
|
||||
!stencil)
|
||||
{
|
||||
if (qs->softpipe->framebuffer.zsbuf->format == PIPE_FORMAT_Z16_UNORM) {
|
||||
switch (depthfunc) {
|
||||
case PIPE_FUNC_NEVER:
|
||||
qs->run = depth_test_quads_fallback;
|
||||
break;
|
||||
case PIPE_FUNC_LESS:
|
||||
switch (depthfunc) {
|
||||
case PIPE_FUNC_LESS:
|
||||
switch (qs->softpipe->framebuffer.zsbuf->format) {
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
qs->run = depth_interp_z16_less_write;
|
||||
break;
|
||||
case PIPE_FUNC_EQUAL:
|
||||
qs->run = depth_interp_z16_equal_write;
|
||||
break;
|
||||
case PIPE_FUNC_LEQUAL:
|
||||
qs->run = depth_interp_z16_lequal_write;
|
||||
break;
|
||||
case PIPE_FUNC_GREATER:
|
||||
qs->run = depth_interp_z16_greater_write;
|
||||
break;
|
||||
case PIPE_FUNC_NOTEQUAL:
|
||||
qs->run = depth_interp_z16_notequal_write;
|
||||
break;
|
||||
case PIPE_FUNC_GEQUAL:
|
||||
qs->run = depth_interp_z16_gequal_write;
|
||||
break;
|
||||
case PIPE_FUNC_ALWAYS:
|
||||
qs->run = depth_interp_z16_always_write;
|
||||
break;
|
||||
default:
|
||||
qs->run = depth_test_quads_fallback;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PIPE_FUNC_LEQUAL:
|
||||
switch (qs->softpipe->framebuffer.zsbuf->format) {
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
qs->run = depth_interp_z16_lequal_write;
|
||||
break;
|
||||
default:
|
||||
qs->run = depth_test_quads_fallback;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
qs->run = depth_test_quads_fallback;
|
||||
}
|
||||
}
|
||||
else {
|
||||
qs->run = depth_test_quads_fallback;
|
||||
}
|
||||
|
||||
|
||||
/* next quad/fragment stage */
|
||||
qs->run( qs, quads, nr );
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
depth_test_begin(struct quad_stage *qs)
|
||||
|
||||
|
||||
static void depth_test_begin(struct quad_stage *qs)
|
||||
{
|
||||
qs->run = choose_depth_test;
|
||||
qs->next->begin(qs->next);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
depth_test_destroy(struct quad_stage *qs)
|
||||
static void depth_test_destroy(struct quad_stage *qs)
|
||||
{
|
||||
FREE( qs );
|
||||
}
|
||||
|
||||
|
||||
struct quad_stage *
|
||||
sp_quad_depth_test_stage(struct softpipe_context *softpipe)
|
||||
struct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe )
|
||||
{
|
||||
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
|
||||
|
||||
|
@@ -1,147 +0,0 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2010 VMware, Inc. 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 THE AUTHORS AND/OR ITS 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* Template for generating Z test functions
|
||||
* Only PIPE_FORMAT_Z16_UNORM supported at this time.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef NAME
|
||||
#error "NAME is not defined!"
|
||||
#endif
|
||||
|
||||
#if !defined(OPERATOR) && !defined(ALWAYS)
|
||||
#error "neither OPERATOR nor ALWAYS is defined!"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* NOTE: there's no guarantee that the quads are sequentially side by
|
||||
* side. The fragment shader may have culled some quads, etc. Sliver
|
||||
* triangles may generate non-sequential quads.
|
||||
*/
|
||||
static void
|
||||
NAME(struct quad_stage *qs,
|
||||
struct quad_header *quads[],
|
||||
unsigned nr)
|
||||
{
|
||||
unsigned i, pass = 0;
|
||||
const unsigned ix = quads[0]->input.x0;
|
||||
const unsigned iy = quads[0]->input.y0;
|
||||
const float fx = (float) ix;
|
||||
const float fy = (float) iy;
|
||||
const float dzdx = quads[0]->posCoef->dadx[2];
|
||||
const float dzdy = quads[0]->posCoef->dady[2];
|
||||
const float z0 = quads[0]->posCoef->a0[2] + dzdx * fx + dzdy * fy;
|
||||
struct softpipe_cached_tile *tile;
|
||||
ushort (*depth16)[TILE_SIZE];
|
||||
ushort init_idepth[4], idepth[4], depth_step;
|
||||
const float scale = 65535.0;
|
||||
|
||||
/* compute scaled depth of the four pixels in first quad */
|
||||
init_idepth[0] = (ushort)((z0) * scale);
|
||||
init_idepth[1] = (ushort)((z0 + dzdx) * scale);
|
||||
init_idepth[2] = (ushort)((z0 + dzdy) * scale);
|
||||
init_idepth[3] = (ushort)((z0 + dzdx + dzdy) * scale);
|
||||
|
||||
depth_step = (ushort)(dzdx * scale);
|
||||
|
||||
tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, ix, iy);
|
||||
|
||||
for (i = 0; i < nr; i++) {
|
||||
const unsigned outmask = quads[i]->inout.mask;
|
||||
const int dx = quads[i]->input.x0 - ix;
|
||||
unsigned mask = 0;
|
||||
|
||||
/* compute depth for this quad */
|
||||
idepth[0] = init_idepth[0] + dx * depth_step;
|
||||
idepth[1] = init_idepth[1] + dx * depth_step;
|
||||
idepth[2] = init_idepth[2] + dx * depth_step;
|
||||
idepth[3] = init_idepth[3] + dx * depth_step;
|
||||
|
||||
depth16 = (ushort (*)[TILE_SIZE])
|
||||
&tile->data.depth16[iy % TILE_SIZE][(ix + dx)% TILE_SIZE];
|
||||
|
||||
#ifdef ALWAYS
|
||||
if (outmask & 1) {
|
||||
depth16[0][0] = idepth[0];
|
||||
mask |= (1 << 0);
|
||||
}
|
||||
|
||||
if (outmask & 2) {
|
||||
depth16[0][1] = idepth[1];
|
||||
mask |= (1 << 1);
|
||||
}
|
||||
|
||||
if (outmask & 4) {
|
||||
depth16[1][0] = idepth[2];
|
||||
mask |= (1 << 2);
|
||||
}
|
||||
|
||||
if (outmask & 8) {
|
||||
depth16[1][1] = idepth[3];
|
||||
mask |= (1 << 3);
|
||||
}
|
||||
#else
|
||||
/* Note: OPERATOR appears here: */
|
||||
if ((outmask & 1) && (idepth[0] OPERATOR depth16[0][0])) {
|
||||
depth16[0][0] = idepth[0];
|
||||
mask |= (1 << 0);
|
||||
}
|
||||
|
||||
if ((outmask & 2) && (idepth[1] OPERATOR depth16[0][1])) {
|
||||
depth16[0][1] = idepth[1];
|
||||
mask |= (1 << 1);
|
||||
}
|
||||
|
||||
if ((outmask & 4) && (idepth[2] OPERATOR depth16[1][0])) {
|
||||
depth16[1][0] = idepth[2];
|
||||
mask |= (1 << 2);
|
||||
}
|
||||
|
||||
if ((outmask & 8) && (idepth[3] OPERATOR depth16[1][1])) {
|
||||
depth16[1][1] = idepth[3];
|
||||
mask |= (1 << 3);
|
||||
}
|
||||
#endif
|
||||
|
||||
depth16 = (ushort (*)[TILE_SIZE]) &depth16[0][2];
|
||||
|
||||
quads[i]->inout.mask = mask;
|
||||
if (quads[i]->inout.mask)
|
||||
quads[pass++] = quads[i];
|
||||
}
|
||||
|
||||
if (pass)
|
||||
qs->next->run(qs->next, quads, pass);
|
||||
}
|
||||
|
||||
|
||||
#undef NAME
|
||||
#undef OPERATOR
|
||||
#undef ALWAYS
|
@@ -669,17 +669,17 @@ static void setup_tri_edges( struct setup_context *setup )
|
||||
|
||||
setup->emaj.sy = ceilf(vmin_y);
|
||||
setup->emaj.lines = (int) ceilf(vmax_y - setup->emaj.sy);
|
||||
setup->emaj.dxdy = setup->emaj.dy ? setup->emaj.dx / setup->emaj.dy : .0f;
|
||||
setup->emaj.dxdy = setup->emaj.dx / setup->emaj.dy;
|
||||
setup->emaj.sx = vmin_x + (setup->emaj.sy - vmin_y) * setup->emaj.dxdy;
|
||||
|
||||
setup->etop.sy = ceilf(vmid_y);
|
||||
setup->etop.lines = (int) ceilf(vmax_y - setup->etop.sy);
|
||||
setup->etop.dxdy = setup->etop.dy ? setup->etop.dx / setup->etop.dy : .0f;
|
||||
setup->etop.dxdy = setup->etop.dx / setup->etop.dy;
|
||||
setup->etop.sx = vmid_x + (setup->etop.sy - vmid_y) * setup->etop.dxdy;
|
||||
|
||||
setup->ebot.sy = ceilf(vmin_y);
|
||||
setup->ebot.lines = (int) ceilf(vmid_y - setup->ebot.sy);
|
||||
setup->ebot.dxdy = setup->ebot.dy ? setup->ebot.dx / setup->ebot.dy : .0f;
|
||||
setup->ebot.dxdy = setup->ebot.dx / setup->ebot.dy;
|
||||
setup->ebot.sx = vmin_x + (setup->ebot.sy - vmin_y) * setup->ebot.dxdy;
|
||||
}
|
||||
|
||||
|
@@ -49,7 +49,7 @@ void softpipe_bind_rasterizer_state(struct pipe_context *pipe,
|
||||
return;
|
||||
|
||||
/* pass-through to draw module */
|
||||
draw_set_rasterizer_state(softpipe->draw, rasterizer, rasterizer);
|
||||
draw_set_rasterizer_state(softpipe->draw, rasterizer);
|
||||
|
||||
softpipe->rasterizer = rasterizer;
|
||||
|
||||
|
@@ -222,8 +222,7 @@ static void svga_bind_rasterizer_state( struct pipe_context *pipe,
|
||||
|
||||
svga->curr.rast = raster;
|
||||
|
||||
draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL,
|
||||
state);
|
||||
draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL);
|
||||
|
||||
svga->dirty |= SVGA_NEW_RAST;
|
||||
}
|
||||
|
@@ -134,7 +134,7 @@ boolean svga_init_swtnl( struct svga_context *svga )
|
||||
/*
|
||||
* Create drawing context and plug our rendering stage into it.
|
||||
*/
|
||||
svga->swtnl.draw = draw_create(&svga->pipe);
|
||||
svga->swtnl.draw = draw_create();
|
||||
if (svga->swtnl.draw == NULL)
|
||||
goto fail;
|
||||
|
||||
|
@@ -113,8 +113,7 @@ static int update_swtnl_draw( struct svga_context *svga,
|
||||
|
||||
if (dirty & SVGA_NEW_RAST)
|
||||
draw_set_rasterizer_state(svga->swtnl.draw,
|
||||
&svga->curr.rast->templ,
|
||||
(void *) svga->curr.rast);
|
||||
&svga->curr.rast->templ);
|
||||
|
||||
if (dirty & SVGA_NEW_FRAME_BUFFER)
|
||||
draw_set_mrd(svga->swtnl.draw,
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#include "util/u_memory.h"
|
||||
|
||||
GLboolean
|
||||
dri_create_context(gl_api api, const __GLcontextModes * visual,
|
||||
dri_create_context(const __GLcontextModes * visual,
|
||||
__DRIcontext * cPriv, void *sharedContextPrivate)
|
||||
{
|
||||
__DRIscreen *sPriv = cPriv->driScreenPriv;
|
||||
|
@@ -35,8 +35,6 @@
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "drm.h"
|
||||
#include "dri_util.h"
|
||||
#include "dri_wrapper.h"
|
||||
#include "main/mtypes.h"
|
||||
|
||||
struct pipe_context;
|
||||
struct pipe_fence;
|
||||
@@ -111,8 +109,7 @@ dri_make_current(__DRIcontext * driContextPriv,
|
||||
__DRIdrawable * driReadPriv);
|
||||
|
||||
boolean
|
||||
dri_create_context(gl_api api,
|
||||
const __GLcontextModes * visual,
|
||||
dri_create_context(const __GLcontextModes * visual,
|
||||
__DRIcontext * driContextPriv,
|
||||
void *sharedContextPrivate);
|
||||
|
||||
|
@@ -16,7 +16,6 @@ x11_INCLUDES = \
|
||||
-I$(TOP)/src/gallium/drivers \
|
||||
-I$(TOP)/src/glx \
|
||||
-I$(TOP)/src/mesa \
|
||||
$(X11_CFLAGS) \
|
||||
$(shell pkg-config --cflags-only-I libdrm)
|
||||
|
||||
x11_SOURCES = $(wildcard x11/*.c) \
|
||||
|
@@ -5,8 +5,7 @@ LIBNAME = xlib
|
||||
|
||||
LIBRARY_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/mesa \
|
||||
$(X11_CFLAGS)
|
||||
-I$(TOP)/src/mesa
|
||||
|
||||
C_SOURCES = \
|
||||
glx_api.c \
|
||||
|
@@ -324,7 +324,7 @@ choose_pixel_format(XMesaVisual v)
|
||||
* at least matches the given depthBits and stencilBits.
|
||||
*/
|
||||
static void
|
||||
xmesa_choose_z_stencil_format(int depth, int stencil,
|
||||
xmesa_choose_z_stencil_format(int depthBits, int stencilBits,
|
||||
enum pipe_format *depthFormat,
|
||||
enum pipe_format *stencilFormat)
|
||||
{
|
||||
@@ -332,28 +332,20 @@ xmesa_choose_z_stencil_format(int depth, int stencil,
|
||||
const unsigned tex_usage = PIPE_TEXTURE_USAGE_DEPTH_STENCIL;
|
||||
const unsigned geom_flags = (PIPE_TEXTURE_GEOM_NON_SQUARE |
|
||||
PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO);
|
||||
enum pipe_format formats[8];
|
||||
int count, i;
|
||||
static enum pipe_format formats[] = {
|
||||
PIPE_FORMAT_S8Z24_UNORM,
|
||||
PIPE_FORMAT_Z24S8_UNORM,
|
||||
PIPE_FORMAT_Z16_UNORM,
|
||||
PIPE_FORMAT_Z32_UNORM
|
||||
};
|
||||
int i;
|
||||
|
||||
count = 0;
|
||||
assert(screen);
|
||||
|
||||
if (depth <= 16 && stencil == 0) {
|
||||
formats[count++] = PIPE_FORMAT_Z16_UNORM;
|
||||
}
|
||||
if (depth <= 24 && stencil == 0) {
|
||||
formats[count++] = PIPE_FORMAT_X8Z24_UNORM;
|
||||
formats[count++] = PIPE_FORMAT_Z24X8_UNORM;
|
||||
}
|
||||
if (depth <= 24 && stencil <= 8) {
|
||||
formats[count++] = PIPE_FORMAT_S8Z24_UNORM;
|
||||
formats[count++] = PIPE_FORMAT_Z24S8_UNORM;
|
||||
}
|
||||
if (depth <= 32 && stencil == 0) {
|
||||
formats[count++] = PIPE_FORMAT_Z32_UNORM;
|
||||
}
|
||||
*depthFormat = *stencilFormat = PIPE_FORMAT_NONE;
|
||||
|
||||
*depthFormat = PIPE_FORMAT_NONE;
|
||||
for (i = 0; i < count; i++) {
|
||||
/* search for supported format */
|
||||
for (i = 0; i < Elements(formats); i++) {
|
||||
if (screen->is_format_supported(screen, formats[i],
|
||||
target, tex_usage, geom_flags)) {
|
||||
*depthFormat = formats[i];
|
||||
@@ -361,12 +353,13 @@ xmesa_choose_z_stencil_format(int depth, int stencil,
|
||||
}
|
||||
}
|
||||
|
||||
if (stencil) {
|
||||
if (stencilBits) {
|
||||
*stencilFormat = *depthFormat;
|
||||
}
|
||||
else {
|
||||
*stencilFormat = PIPE_FORMAT_NONE;
|
||||
}
|
||||
|
||||
/* XXX we should check that he chosen format has at least as many bits
|
||||
* as what was requested.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
@@ -42,8 +42,7 @@ VG_SOURCES = \
|
||||
|
||||
VG_OBJECTS = $(VG_SOURCES:.c=.o)
|
||||
|
||||
VG_LIBS = $(GALLIUM_AUXILIARIES)
|
||||
VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lm
|
||||
VG_LIBS = $(GALLIUM_AUXILIARIES) -lm
|
||||
|
||||
### Include directories
|
||||
|
||||
@@ -65,7 +64,7 @@ $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VG_OBJECTS) $(VG_LIBS)
|
||||
-minor $(VG_MINOR) \
|
||||
-patch $(VG_TINY) \
|
||||
-install $(TOP)/$(LIB_DIR) \
|
||||
$(VG_OBJECTS) $(VG_LIBS) $(VG_LIB_DEPS)
|
||||
$(VG_OBJECTS) $(VG_LIBS)
|
||||
|
||||
######################################################################
|
||||
# Generic stuff
|
||||
|
@@ -20,8 +20,7 @@ INCLUDE_DIRS = \
|
||||
-I$(TOP)/src/gallium/include \
|
||||
-I$(TOP)/src/gallium/drivers \
|
||||
-I$(TOP)/src/gallium/state_trackers/glx/xlib \
|
||||
-I$(TOP)/src/gallium/auxiliary \
|
||||
$(X11_CFLAGS)
|
||||
-I$(TOP)/src/gallium/auxiliary
|
||||
|
||||
DEFINES += \
|
||||
-DGALLIUM_SOFTPIPE
|
||||
|
@@ -1,70 +0,0 @@
|
||||
TOP = ../..
|
||||
MESA = $(TOP)/src/mesa
|
||||
include $(TOP)/configs/current
|
||||
include $(MESA)/sources.mak
|
||||
|
||||
GLESv1_CM_ASM := $(addprefix $(MESA)/es/glapi/glapi-es1/,$(GLAPI_ASM_SOURCES))
|
||||
GLESv2_ASM := $(addprefix $(MESA)/es/glapi/glapi-es2/,$(GLAPI_ASM_SOURCES))
|
||||
API_SOURCES := $(addprefix $(MESA)/,$(GLAPI_SOURCES))
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : PREFIX = es1
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : NAME = GLESv1_CM
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : PREFIX = es2
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : NAME = GLESv2
|
||||
|
||||
INCLUDES = -I$(TOP)/include -I$(MESA)/es/glapi/glapi-$(PREFIX) -I$(MESA)
|
||||
|
||||
OBJECTS = \
|
||||
$(notdir $(GLAPI_ASM_SOURCES:%.S=%.o)) \
|
||||
$(notdir $(GLAPI_SOURCES:%.c=%.o))
|
||||
|
||||
GLESv1_CM_OBJECTS = $(addprefix es1-,$(OBJECTS))
|
||||
GLESv2_OBJECTS = $(addprefix es2-,$(OBJECTS))
|
||||
|
||||
es1-%.o: $(dir $(GLESv1_CM_ASM))%.S
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
es1-%.o: $(MESA)/glapi/%.c
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
|
||||
es2-%.o: $(dir $(GLESv2_ASM))%.S
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
es2-%.o: $(MESA)/glapi/%.c
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
|
||||
default: depend \
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) \
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME)
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : $(GLESv1_CM_OBJECTS)
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : $(GLESv2_OBJECTS)
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) \
|
||||
$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : Makefile
|
||||
$(MKLIB) -o $($(NAME)_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
-major 1 -minor 2 $(MKLIB_OPTIONS) \
|
||||
-install $(TOP)/$(LIB_DIR) -id \
|
||||
$(INSTALL_LIB_DIR)/lib$($(NAME)_LIB).1.dylib \
|
||||
$($(NAME)_LIB_DEPS) $($(NAME)_OBJECTS)
|
||||
|
||||
depend: Makefile
|
||||
rm -f depend
|
||||
touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(API_SOURCES) \
|
||||
$(ES1_API_ASM) $(ES2_API_ASM)
|
||||
|
||||
# Emacs tags
|
||||
tags:
|
||||
etags `find . -name \*.[ch]` `find $(TOP)/include`
|
||||
|
||||
install: $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME)
|
||||
$(MAKE) -C $(TOP)/src/mesa install-es2 install-es1
|
||||
|
||||
# Remove .o and backup files
|
||||
clean:
|
||||
-rm -f $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_GLOB)
|
||||
-rm -f $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_GLOB)
|
||||
-rm -f *.o *~
|
||||
-rm -f depend depend.bak
|
||||
|
||||
-include depend
|
@@ -90,7 +90,7 @@ install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
# Remove .o and backup files
|
||||
clean:
|
||||
-rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB)
|
||||
-rm -f $(TOP)/$(LIB_DIR)/libGL.so*
|
||||
-rm -f *.o *~
|
||||
-rm -f depend depend.bak
|
||||
|
||||
|
@@ -36,7 +36,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
/* THIS IS NOT AN X CONSORTIUM STANDARD */
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
#define NEED_REPLIES
|
||||
#include <X11/Xlibint.h>
|
||||
|
4
src/glx/apple/.gitignore
vendored
4
src/glx/apple/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
apple_xgl_api.[hc]
|
||||
exports.list
|
||||
stage.[1234]
|
||||
|
@@ -1,10 +0,0 @@
|
||||
#GL_EXT_texture_object
|
||||
alias AreTexturesResidentEXT AreTexturesResident
|
||||
alias BindTextureEXT BindTexture
|
||||
alias DeleteTexturesEXT DeleteTextures
|
||||
alias GenTexturesEXT GenTextures
|
||||
alias IsTextureEXT IsTexture
|
||||
alias PrioritizeTexturesEXT PrioritizeTextures
|
||||
|
||||
# Due to type conflicts, we handle this differently
|
||||
#alias TexImage3DEXT TexImage3D
|
@@ -1,106 +0,0 @@
|
||||
extension ARB_transpose_matrix
|
||||
extension ARB_vertex_program
|
||||
extension ARB_vertex_blend
|
||||
extension ARB_window_pos
|
||||
extension ARB_shader_objects
|
||||
extension ARB_vertex_shader
|
||||
extension ARB_shading_language_100
|
||||
extension ARB_imaging
|
||||
extension ARB_point_parameters
|
||||
extension ARB_texture_env_crossbar
|
||||
extension ARB_texture_border_clamp
|
||||
extension ARB_multitexture
|
||||
extension ARB_texture_env_add
|
||||
extension ARB_texture_cube_map
|
||||
extension ARB_texture_env_dot3
|
||||
extension ARB_multisample
|
||||
extension ARB_texture_env_combine
|
||||
extension ARB_texture_compression
|
||||
extension ARB_texture_mirrored_repeat
|
||||
extension ARB_shadow
|
||||
extension ARB_depth_texture
|
||||
extension ARB_shadow_ambient
|
||||
extension ARB_fragment_program
|
||||
extension ARB_fragment_program_shadow
|
||||
extension ARB_fragment_shader
|
||||
extension ARB_occlusion_query
|
||||
extension ARB_point_sprite
|
||||
extension ARB_texture_non_power_of_two
|
||||
extension ARB_vertex_buffer_object
|
||||
extension ARB_pixel_buffer_object
|
||||
extension ARB_draw_buffers
|
||||
extension ARB_shader_texture_lod
|
||||
extension ARB_texture_rectangle
|
||||
extension ARB_texture_float
|
||||
extension ARB_half_float_pixel
|
||||
|
||||
extension EXT_multi_draw_arrays
|
||||
extension EXT_clip_volume_hint
|
||||
extension EXT_rescale_normal
|
||||
extension EXT_draw_range_elements
|
||||
extension EXT_fog_coord
|
||||
extension EXT_gpu_program_parameters
|
||||
extension EXT_geometry_shader4
|
||||
|
||||
#The gl.spec has the wrong arguments for GetTransformFeedbackVaryingEXT
|
||||
#extension EXT_transform_feedback
|
||||
extension EXT_compiled_vertex_array
|
||||
extension EXT_framebuffer_object
|
||||
extension EXT_framebuffer_blit
|
||||
extension EXT_framebuffer_multisample
|
||||
extension EXT_texture_rectangle
|
||||
extension EXT_texture_env_add
|
||||
extension EXT_blend_color
|
||||
extension EXT_blend_minmax
|
||||
extension EXT_blend_subtract
|
||||
extension EXT_texture_lod_bias
|
||||
extension EXT_abgr
|
||||
extension EXT_bgra
|
||||
extension EXT_stencil_wrap
|
||||
extension EXT_texture_filter_anisotropic
|
||||
extension EXT_separate_specular_color
|
||||
extension EXT_secondary_color
|
||||
extension EXT_blend_func_separate
|
||||
extension EXT_shadow_funcs
|
||||
extension EXT_stencil_two_side
|
||||
extension EXT_texture_compression_s3tc
|
||||
extension EXT_texture_compression_dxt1
|
||||
extension EXT_texture_sRGB
|
||||
extension EXT_blend_equation_separate
|
||||
extension EXT_texture_mirror_clamp
|
||||
extension EXT_packed_depth_stencil
|
||||
|
||||
extension APPLE_client_storage
|
||||
extension APPLE_specular_vector
|
||||
extension APPLE_transform_hint
|
||||
extension APPLE_packed_pixels
|
||||
#The gl.spec has different argument types for this:
|
||||
#extension APPLE_fence
|
||||
extension APPLE_vertex_array_object
|
||||
extension APPLE_vertex_program_evaluators
|
||||
extension APPLE_element_array
|
||||
extension APPLE_flush_render
|
||||
extension APPLE_aux_depth_stencil
|
||||
extension APPLE_flush_buffer_range
|
||||
extension APPLE_ycbcr_422
|
||||
#The gl.spec has different argument types for this:
|
||||
#extension APPLE_vertex_array_range
|
||||
extension APPLE_texture_range
|
||||
extension APPLE_float_pixels
|
||||
extension APPLE_pixel_buffer
|
||||
extension APPLE_object_purgeable
|
||||
|
||||
#The OpenGL framework has moved this to the core OpenGL, and eliminated EXT_convolution listing.
|
||||
#extension EXT_convolution
|
||||
|
||||
#Leopard supports these according to nm.
|
||||
#Applications should use the GL_EXTENSIONS list to determine capabilities.
|
||||
extension EXT_paletted_texture
|
||||
extension APPLE_fence
|
||||
extension NV_vertex_program4
|
||||
extension EXT_draw_buffers2
|
||||
extension EXT_gpu_shader4
|
||||
extension ATI_pn_triangles
|
||||
extension NV_register_combiners
|
||||
extension EXT_depth_bounds_test
|
||||
|
@@ -1,15 +0,0 @@
|
||||
#These are for compatibility with the old libGL.
|
||||
noop SGI_color_table
|
||||
noop EXT_convolution
|
||||
noop EXT_cull_vertex
|
||||
noop NV_fence
|
||||
noop SGIS_detail_texture
|
||||
noop SGIX_fragment_lighting
|
||||
noop SGIX_flush_raster
|
||||
noop EXT_vertex_array
|
||||
noop SGIX_instruments
|
||||
noop EXT_histogram
|
||||
noop NV_vertex_program
|
||||
noop PGI_misc_hints
|
||||
noop SGIS_multisample
|
||||
noop EXT_multisample
|
@@ -1,4 +0,0 @@
|
||||
promoted MESA_window_pos
|
||||
promoted ARB_window_pos
|
||||
promoted EXT_copy_texture
|
||||
promoted ARB_vertex_program
|
@@ -1,129 +0,0 @@
|
||||
TOP = ../../..
|
||||
|
||||
include $(TOP)/configs/current
|
||||
|
||||
#CC=gcc
|
||||
#GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS)
|
||||
#GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
|
||||
|
||||
TCLSH=tclsh8.5
|
||||
MKDIR=mkdir
|
||||
INSTALL=install
|
||||
LN=ln
|
||||
RM=rm
|
||||
|
||||
#INCLUDE=-I. -Iinclude -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
|
||||
|
||||
#COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
|
||||
|
||||
#The directory with the final binaries.
|
||||
BUILD_DIR=builds
|
||||
|
||||
all: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
SOURCES = \
|
||||
apple_cgl.c \
|
||||
apple_glx.c \
|
||||
apple_glx_context.c \
|
||||
apple_glx_drawable.c \
|
||||
apple_glx_pbuffer.c \
|
||||
apple_glx_pixmap.c \
|
||||
apple_glx_surface.c \
|
||||
apple_visual.c \
|
||||
apple_xgl_api.c \
|
||||
apple_xgl_api_additional.c \
|
||||
apple_xgl_api_read.c \
|
||||
apple_xgl_api_stereo.c \
|
||||
apple_xgl_api_viewport.c \
|
||||
appledri.c \
|
||||
../clientattrib.c \
|
||||
../compsize.c \
|
||||
../glcontextmodes.c \
|
||||
glx_empty.c \
|
||||
glx_error.c \
|
||||
../glx_pbuffer.c \
|
||||
../glx_query.c \
|
||||
../glxcmds.c \
|
||||
../glxcurrent.c \
|
||||
../glxext.c \
|
||||
../glxextensions.c \
|
||||
glxreply.c \
|
||||
../pixel.c \
|
||||
../xfont.c
|
||||
|
||||
include $(TOP)/src/mesa/sources.mak
|
||||
|
||||
LDFLAGS += -lXplugin -framework ApplicationServices -framework CoreFoundation
|
||||
|
||||
MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES))
|
||||
MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
|
||||
MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.o) # $(MESA_GLAPI_OBJECTS)
|
||||
|
||||
INCLUDES = -I. -Iinclude -I..\
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/include/GL/internal \
|
||||
-I$(TOP)/src/mesa \
|
||||
-I$(TOP)/src/mesa/glapi \
|
||||
$(LIBDRM_CFLAGS) \
|
||||
$(DRI2PROTO_CFLAGS) \
|
||||
$(X11_INCLUDES)
|
||||
|
||||
##### RULES #####
|
||||
|
||||
$(OBJECTS) : apple_xgl_api.h
|
||||
|
||||
apple_xgl_api.c : apple_xgl_api.h
|
||||
|
||||
apple_xgl_api.h : gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl
|
||||
$(TCLSH) gen_code.tcl
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
|
||||
|
||||
.S.o:
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
|
||||
|
||||
##### TARGETS #####
|
||||
|
||||
default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
# Make libGL
|
||||
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
|
||||
$(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
-major 1 -minor 2 $(MKLIB_OPTIONS) \
|
||||
-install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
|
||||
$(GL_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile
|
||||
rm -f depend
|
||||
touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
|
||||
$(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES)
|
||||
|
||||
# Emacs tags
|
||||
tags:
|
||||
etags `find . -name \*.[ch]` `find $(TOP)/include`
|
||||
|
||||
install_headers: include/GL/gl.h
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) -m 644 include/GL/gl.h $(DESTDIR)$(INSTALL_DIR)/include/GL
|
||||
|
||||
install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
$(MAKE) -C $(TOP)/src/mesa install-libgl
|
||||
|
||||
install: install_libraries
|
||||
|
||||
# Remove .o and backup files
|
||||
clean:
|
||||
-rm -f *.o *.a *~
|
||||
-rm -f *.c~ *.h~
|
||||
-rm -f apple_xgl_api.h apple_xgl_api.c
|
||||
-rm -f *.dylib
|
||||
-rm -f include/GL/gl.h
|
||||
-rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB)
|
||||
-rm -f *.o *~
|
||||
-rm -f depend depend.bak
|
||||
|
||||
-include depend
|
@@ -1,18 +0,0 @@
|
||||
A lot of the code is automatically generated.
|
||||
|
||||
The following are generated based on specs/gl.spec and specs/enum.spec (from OpenGL.org):
|
||||
|
||||
apple_xgl_api.h
|
||||
apple_xgl_api.c
|
||||
exports.list
|
||||
include/GL/gl.h
|
||||
include/GL/glext.h (includes the OpenGL framework glext.h)
|
||||
|
||||
The gen_code.tcl script is what executes the various gen_*.tcl scripts to produce those.
|
||||
|
||||
You will need Tcl 8.5 for the gen_code.tcl script.
|
||||
|
||||
The tests/ directory contains some tests that are built in testbuilds.
|
||||
|
||||
The tests built in testbuilds don't require installation of the library.
|
||||
|
@@ -1,8 +0,0 @@
|
||||
The design of most of this code is such that we extend the GLX structures
|
||||
with a void * named apple.
|
||||
|
||||
The GLX functions that need to do Apple-specific things are passed
|
||||
&s->apple in order to initialize the private structures.
|
||||
|
||||
Thus when updating, just run a diff against glxext.c or glxcmds.c, and
|
||||
manually merge from there as needed.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user