Compare commits
6 Commits
mesa-7.11-
...
useful
Author | SHA1 | Date | |
---|---|---|---|
|
d6db9143b6 | ||
|
9c0b233c44 | ||
|
364aa72824 | ||
|
d290ec228b | ||
|
c0906e06ee | ||
|
b6c49104ce |
45
Makefile
45
Makefile
@@ -183,7 +183,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.11-rc1
|
||||
VERSION=7.11-devel
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
GLUT_NAME = MesaGLUT-$(VERSION)
|
||||
@@ -200,9 +200,6 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/configure.ac \
|
||||
$(DIRECTORY)/acinclude.m4 \
|
||||
$(DIRECTORY)/aclocal.m4 \
|
||||
$(DIRECTORY)/SConstruct \
|
||||
$(DIRECTORY)/common.py \
|
||||
$(DIRECTORY)/scons/*py \
|
||||
$(DIRECTORY)/bin/config.guess \
|
||||
$(DIRECTORY)/bin/config.sub \
|
||||
$(DIRECTORY)/bin/extract_git_sha1 \
|
||||
@@ -230,25 +227,17 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/include/GL/vms_x_fix.h \
|
||||
$(DIRECTORY)/include/GL/wglext.h \
|
||||
$(DIRECTORY)/include/GL/wmesa.h \
|
||||
$(DIRECTORY)/include/pci_ids/*.h \
|
||||
$(DIRECTORY)/include/c99/*.h \
|
||||
$(DIRECTORY)/src/getopt/SConscript \
|
||||
$(DIRECTORY)/src/getopt/getopt*.[ch] \
|
||||
$(DIRECTORY)/src/glsl/Makefile \
|
||||
$(DIRECTORY)/src/glsl/Makefile.template \
|
||||
$(DIRECTORY)/src/glsl/SConscript \
|
||||
$(DIRECTORY)/src/glsl/*.[ch] \
|
||||
$(DIRECTORY)/src/glsl/*.ll \
|
||||
$(DIRECTORY)/src/glsl/*.yy \
|
||||
$(DIRECTORY)/src/glsl/*.[cly]pp \
|
||||
$(DIRECTORY)/src/glsl/README \
|
||||
$(DIRECTORY)/src/glsl/glcpp/*.[chly] \
|
||||
$(DIRECTORY)/src/glsl/glcpp/README \
|
||||
$(DIRECTORY)/src/glsl/builtins \
|
||||
$(DIRECTORY)/src/Makefile \
|
||||
$(DIRECTORY)/src/SConscript \
|
||||
$(DIRECTORY)/src/mesa/Makefile* \
|
||||
$(DIRECTORY)/src/mesa/SConscript \
|
||||
$(DIRECTORY)/src/mesa/sources.mak \
|
||||
$(DIRECTORY)/src/mesa/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/gl.pc.in \
|
||||
@@ -256,12 +245,12 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/depend \
|
||||
$(MAIN_ES_FILES) \
|
||||
$(DIRECTORY)/src/mesa/main/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/main/*.cpp \
|
||||
$(DIRECTORY)/src/mesa/main/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/math/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/math/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/program/*.[chly] \
|
||||
$(DIRECTORY)/src/mesa/program/*.cpp \
|
||||
$(DIRECTORY)/src/mesa/program/Makefile \
|
||||
$(DIRECTORY)/src/mesa/program/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/swrast/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/swrast/descrip.mms \
|
||||
@@ -286,9 +275,6 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/r300/compiler/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/r300/compiler/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/r300/compiler/SConscript \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
|
||||
@@ -323,10 +309,7 @@ MAPI_FILES = \
|
||||
$(DIRECTORY)/src/mapi/mapi/mapi_abi.py \
|
||||
$(DIRECTORY)/src/mapi/mapi/sources.mak \
|
||||
$(DIRECTORY)/src/mapi/mapi/*.[ch] \
|
||||
$(DIRECTORY)/src/mapi/shared-glapi/SConscript \
|
||||
$(DIRECTORY)/src/mapi/shared-glapi/Makefile \
|
||||
$(DIRECTORY)/src/mapi/vgapi/Makefile \
|
||||
$(DIRECTORY)/src/mapi/vgapi/SConscript \
|
||||
$(DIRECTORY)/src/mapi/vgapi/vgapi.csv \
|
||||
$(DIRECTORY)/src/mapi/vgapi/vg.pc.in
|
||||
|
||||
@@ -339,22 +322,9 @@ EGL_FILES = \
|
||||
$(DIRECTORY)/src/egl/*/*.[ch] \
|
||||
$(DIRECTORY)/src/egl/*/*/Makefile \
|
||||
$(DIRECTORY)/src/egl/*/*/*.[ch] \
|
||||
$(DIRECTORY)/src/egl/wayland/wayland-drm/protocol/*.xml \
|
||||
$(DIRECTORY)/src/egl/wayland/wayland-egl/*.pc.in \
|
||||
$(DIRECTORY)/src/egl/main/SConscript \
|
||||
$(DIRECTORY)/src/egl/main/*.pc.in \
|
||||
$(DIRECTORY)/src/egl/main/*.def
|
||||
|
||||
GBM_FILES = \
|
||||
$(DIRECTORY)/src/gbm/Makefile \
|
||||
$(DIRECTORY)/src/gbm/main/*.pc.in \
|
||||
$(DIRECTORY)/src/gbm/main/*.[ch] \
|
||||
$(DIRECTORY)/src/gbm/main/Makefile \
|
||||
$(DIRECTORY)/src/gbm/backends/Makefile \
|
||||
$(DIRECTORY)/src/gbm/backends/Makefile.template \
|
||||
$(DIRECTORY)/src/gbm/backends/*/*.[ch] \
|
||||
$(DIRECTORY)/src/gbm/backends/*/Makefile \
|
||||
|
||||
GALLIUM_FILES = \
|
||||
$(DIRECTORY)/src/mesa/state_tracker/*[ch] \
|
||||
$(DIRECTORY)/src/gallium/Makefile \
|
||||
@@ -376,17 +346,14 @@ GALLIUM_FILES = \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*.py
|
||||
|
||||
APPLE_DRI_FILES = \
|
||||
$(DIRECTORY)/src/glx/apple/Makefile \
|
||||
$(DIRECTORY)/src/glx/apple/*.[ch]
|
||||
|
||||
DRI_FILES = \
|
||||
$(DIRECTORY)/include/GL/internal/dri_interface.h \
|
||||
$(DIRECTORY)/include/GL/internal/sarea.h \
|
||||
$(DIRECTORY)/src/glx/Makefile \
|
||||
$(DIRECTORY)/src/glx/*.[ch] \
|
||||
$(APPLE_DRI_FILES) \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile* \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
|
||||
@@ -430,7 +397,6 @@ GLUT_FILES = \
|
||||
$(DIRECTORY)/include/GL/glut.h \
|
||||
$(DIRECTORY)/include/GL/glutf90.h \
|
||||
$(DIRECTORY)/src/glut/glx/Makefile* \
|
||||
$(DIRECTORY)/src/glut/glx/SConscript \
|
||||
$(DIRECTORY)/src/glut/glx/depend \
|
||||
$(DIRECTORY)/src/glut/glx/glut.pc.in \
|
||||
$(DIRECTORY)/src/glut/glx/*def \
|
||||
@@ -452,7 +418,6 @@ LIB_FILES = \
|
||||
$(MAPI_FILES) \
|
||||
$(ES_FILES) \
|
||||
$(EGL_FILES) \
|
||||
$(GBM_FILES) \
|
||||
$(GALLIUM_FILES) \
|
||||
$(DRI_FILES) \
|
||||
$(SGI_GLU_FILES) \
|
||||
@@ -463,7 +428,7 @@ parsers: configure
|
||||
-@touch $(TOP)/configs/current
|
||||
$(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
|
||||
$(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
|
||||
$(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
|
||||
$(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
ARCHIVES = $(LIB_NAME).tar.gz \
|
||||
|
57
SConstruct
57
SConstruct
@@ -40,8 +40,6 @@ env = Environment(
|
||||
ENV = os.environ,
|
||||
)
|
||||
|
||||
opts.Save('config.py', env)
|
||||
|
||||
# Backwards compatability with old target configuration variable
|
||||
try:
|
||||
targets = ARGUMENTS['targets']
|
||||
@@ -82,6 +80,44 @@ env.Append(CPPPATH = [
|
||||
if env['msvc']:
|
||||
env.Append(CPPPATH = ['#include/c99'])
|
||||
|
||||
# Embedded
|
||||
if env['platform'] == 'embedded':
|
||||
env.Append(CPPDEFINES = [
|
||||
'_POSIX_SOURCE',
|
||||
('_POSIX_C_SOURCE', '199309L'),
|
||||
'_SVID_SOURCE',
|
||||
'_BSD_SOURCE',
|
||||
'_GNU_SOURCE',
|
||||
|
||||
'PTHREADS',
|
||||
])
|
||||
env.Append(LIBS = [
|
||||
'm',
|
||||
'pthread',
|
||||
'dl',
|
||||
])
|
||||
|
||||
# Posix
|
||||
if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
env.Append(CPPDEFINES = [
|
||||
'_POSIX_SOURCE',
|
||||
('_POSIX_C_SOURCE', '199309L'),
|
||||
'_SVID_SOURCE',
|
||||
'_BSD_SOURCE',
|
||||
'_GNU_SOURCE',
|
||||
'PTHREADS',
|
||||
'HAVE_POSIX_MEMALIGN',
|
||||
])
|
||||
if env['gcc']:
|
||||
env.Append(CFLAGS = ['-fvisibility=hidden'])
|
||||
if env['platform'] == 'darwin':
|
||||
env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
|
||||
env.Append(LIBS = [
|
||||
'm',
|
||||
'pthread',
|
||||
'dl',
|
||||
])
|
||||
|
||||
# for debugging
|
||||
#print env.Dump()
|
||||
|
||||
@@ -94,7 +130,7 @@ if env['msvc']:
|
||||
#
|
||||
|
||||
# Create host environent
|
||||
if env['crosscompile'] and not env['embedded']:
|
||||
if env['crosscompile'] and env['platform'] != 'embedded':
|
||||
host_env = Environment(
|
||||
options = opts,
|
||||
# no tool used
|
||||
@@ -143,18 +179,3 @@ SConscript(
|
||||
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||
)
|
||||
|
||||
|
||||
########################################################################
|
||||
# List all aliases
|
||||
|
||||
try:
|
||||
from SCons.Node.Alias import default_ans
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
aliases = default_ans.keys()
|
||||
aliases.sort()
|
||||
env.Help('\n')
|
||||
env.Help('Recognized targets:\n')
|
||||
for alias in aliases:
|
||||
env.Help(' %s\n' % alias)
|
||||
|
@@ -1,20 +1,10 @@
|
||||
#!/bin/sh
|
||||
if [ ! -f src/mesa/main/git_sha1.h ]; then
|
||||
touch src/mesa/main/git_sha1.h
|
||||
fi
|
||||
|
||||
if [ ! -d .git ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
touch src/mesa/main/git_sha1.h
|
||||
if which git > /dev/null; then
|
||||
# Extract the 7-digit "short" SHA1 for the current HEAD, convert
|
||||
# it to a string, and wrap it in a #define. This is used in
|
||||
# src/mesa/main/version.c to put the GIT SHA1 in the GL_VERSION string.
|
||||
git log -n 1 --oneline |\
|
||||
sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
|
||||
> src/mesa/main/git_sha1.h.tmp
|
||||
if ! cmp -s src/mesa/main/git_sha1.h.tmp src/mesa/main/git_sha1.h; then
|
||||
mv src/mesa/main/git_sha1.h.tmp src/mesa/main/git_sha1.h
|
||||
fi
|
||||
> src/mesa/main/git_sha1.h
|
||||
fi
|
||||
|
11
bin/mklib
11
bin/mklib
@@ -767,8 +767,9 @@ case $ARCH in
|
||||
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
|
||||
fi
|
||||
|
||||
LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
|
||||
LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
|
||||
LIBNAME="lib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}"
|
||||
|
||||
# examine first object to determine ABI
|
||||
set ${OBJECTS}
|
||||
@@ -781,6 +782,9 @@ case $ARCH in
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
# XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
||||
# to OPTS here?
|
||||
|
||||
# determine linker
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK="g++"
|
||||
@@ -792,7 +796,8 @@ case $ARCH in
|
||||
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
ln -s ${LIBNAME} ${LINKNAME}
|
||||
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
|
||||
ln -s ${LIBNAME} ${LINKNAME2}
|
||||
FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@@ -79,17 +79,14 @@ def AddOptions(opts):
|
||||
from SCons.Options.EnumOption import EnumOption
|
||||
opts.Add(EnumOption('build', 'build type', 'debug',
|
||||
allowed_values=('debug', 'checked', 'profile', 'release')))
|
||||
opts.Add(BoolOption('verbose', 'verbose output', 'no'))
|
||||
opts.Add(BoolOption('quiet', 'quiet command lines', 'yes'))
|
||||
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
|
||||
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
|
||||
opts.Add(EnumOption('platform', 'target platform', host_platform,
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'cygwin', 'sunos', 'freebsd8')))
|
||||
opts.Add(BoolOption('embedded', 'embedded build', 'no'))
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos', 'freebsd8')))
|
||||
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
|
||||
opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 'no'))
|
||||
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
|
||||
opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))
|
||||
opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no'))
|
||||
opts.Add(BoolOption('quiet', 'DEPRECATED: quiet command lines', 'yes'))
|
||||
if host_platform == 'windows':
|
||||
opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
|
||||
opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
|
||||
|
@@ -26,8 +26,6 @@ LDFLAGS = @LDFLAGS@
|
||||
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
|
||||
RADEON_CFLAGS = @RADEON_CFLAGS@
|
||||
RADEON_LDFLAGS = @RADEON_LDFLAGS@
|
||||
NOUVEAU_CFLAGS = @NOUVEAU_CFLAGS@
|
||||
NOUVEAU_LIBS = @NOUVEAU_LIBS@
|
||||
INTEL_LIBS = @INTEL_LIBS@
|
||||
INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||
X11_LIBS = @X11_LIBS@
|
||||
@@ -60,10 +58,6 @@ INSTALL = @INSTALL@
|
||||
PYTHON2 = @PYTHON2@
|
||||
PYTHON_FLAGS = -t -O -O
|
||||
|
||||
# Flex and Bison for GLSL compiler
|
||||
FLEX = @FLEX@
|
||||
BISON = @BISON@
|
||||
|
||||
# Library names (base name)
|
||||
GL_LIB = GL
|
||||
GLU_LIB = GLU
|
||||
@@ -75,7 +69,6 @@ GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
GLAPI_LIB = glapi
|
||||
WAYLAND_EGL_LIB = wayland-egl
|
||||
GBM_LIB = gbm
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = @GL_LIB_NAME@
|
||||
@@ -89,7 +82,6 @@ GLESv2_LIB_NAME = @GLESv2_LIB_NAME@
|
||||
VG_LIB_NAME = @VG_LIB_NAME@
|
||||
GLAPI_LIB_NAME = @GLAPI_LIB_NAME@
|
||||
WAYLAND_EGL_LIB_NAME = @WAYLAND_EGL_LIB_NAME@
|
||||
GBM_LIB_NAME = @GBM_LIB_NAME@
|
||||
|
||||
# Globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = @GL_LIB_GLOB@
|
||||
@@ -103,7 +95,6 @@ GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@
|
||||
VG_LIB_GLOB = @VG_LIB_GLOB@
|
||||
GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@
|
||||
WAYLAND_EGL_LIB_GLOB = @WAYLAND_EGL_LIB_GLOB@
|
||||
GBM_LIB_GLOB = @GBM_LIB_GLOB@
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = @LIB_DIR@
|
||||
@@ -111,7 +102,6 @@ SRC_DIRS = @SRC_DIRS@
|
||||
GLU_DIRS = @GLU_DIRS@
|
||||
DRIVER_DIRS = @DRIVER_DIRS@
|
||||
EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@
|
||||
GBM_BACKEND_DIRS = @GBM_BACKEND_DIRS@
|
||||
GALLIUM_DIRS = @GALLIUM_DIRS@
|
||||
GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
|
||||
GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
|
||||
@@ -151,8 +141,7 @@ GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@
|
||||
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@
|
||||
VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@
|
||||
GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@
|
||||
WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @WAYLAND_EGL_LIB_DEPS@
|
||||
GBM_LIB_DEPS = $(EXTRA_LIB_PATH) @GBM_LIB_DEPS@
|
||||
WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIBPATH) @WAYLAND_EGL_LIB_DEPS@
|
||||
|
||||
# DRI dependencies
|
||||
MESA_MODULES = @MESA_MODULES@
|
||||
@@ -211,9 +200,6 @@ EGL_PC_CFLAGS = @GL_PC_CFLAGS@
|
||||
WAYLAND_EGL_PC_REQ_PRIV = @WAYLAND_EGL_PC_REQ_PRIV@
|
||||
WAYLAND_EGL_PC_LIB_PRIV = @WAYLAND_EGL_PC_LIB_PRIV@
|
||||
WAYLAND_EGL_PC_CFLAGS = @WAYLAND_EGL_PC_CFLAGS@
|
||||
GBM_PC_REQ_PRIV = @GBM_PC_REQ_PRIV@
|
||||
GBM_PC_LIB_PRIV = @GBM_PC_LIB_PRIV@
|
||||
GBM_PC_CFLAGS = @GBM_PC_CFLAGS@
|
||||
|
||||
XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
|
||||
XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
|
||||
|
@@ -25,29 +25,27 @@ DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
|
||||
|
||||
ARCH_FLAGS += $(RC_CFLAGS)
|
||||
|
||||
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fvisibility=hidden \
|
||||
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
|
||||
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing -fvisibility=hidden \
|
||||
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing \
|
||||
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = lib$(GL_LIB).dylib
|
||||
GLU_LIB_NAME = lib$(GLU_LIB).dylib
|
||||
GLUT_LIB_NAME = lib$(GLUT_LIB).dylib
|
||||
GLW_LIB_NAME = lib$(GLW_LIB).dylib
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).dylib
|
||||
VG_LIB_NAME = lib$(VG_LIB).dylib
|
||||
GL_LIB_NAME = libGL.dylib
|
||||
GLU_LIB_NAME = libGLU.dylib
|
||||
GLUT_LIB_NAME = libglut.dylib
|
||||
GLW_LIB_NAME = libGLw.dylib
|
||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = lib$(GL_LIB).*dylib
|
||||
GLU_LIB_GLOB = lib$(GLU_LIB).*dylib
|
||||
GLUT_LIB_GLOB = lib$(GLUT_LIB).*dylib
|
||||
GLW_LIB_GLOB = lib$(GLW_LIB).*dylib
|
||||
OSMESA_LIB_GLOB = lib$(OSMESA_LIB).*dylib
|
||||
VG_LIB_GLOB = lib$(VG_LIB).*dylib
|
||||
GL_LIB_GLOB = libGL.*dylib
|
||||
GLU_LIB_GLOB = libGLU.*dylib
|
||||
GLUT_LIB_GLOB = libglut.*dylib
|
||||
GLW_LIB_GLOB = libGLw.*dylib
|
||||
OSMESA_LIB_GLOB = libOSMesa.*dylib
|
||||
|
||||
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS =
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
|
||||
@@ -59,5 +57,3 @@ GLU_DIRS = sgi
|
||||
DRIVER_DIRS = osmesa
|
||||
#DRIVER_DIRS = dri
|
||||
DRI_DIRS = swrast
|
||||
GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad failover
|
||||
#GALLIUM_DRIVERS_DIRS += llvmpipe
|
||||
|
@@ -38,8 +38,6 @@ MKLIB_OPTIONS =
|
||||
MKDEP = makedepend
|
||||
MKDEP_OPTIONS = -fdepend
|
||||
MAKE = make
|
||||
FLEX = flex
|
||||
BISON = bison
|
||||
|
||||
# Use MINSTALL for installing libraries, INSTALL for everything else
|
||||
MINSTALL = $(SHELL) $(TOP)/bin/minstall
|
||||
@@ -63,7 +61,7 @@ GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
GLAPI_LIB = glapi
|
||||
WAYLAND_EGL_LIB = wayland-egl
|
||||
GBM_LIB = gbm
|
||||
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = lib$(GL_LIB).so
|
||||
@@ -77,7 +75,6 @@ GLESv2_LIB_NAME = lib$(GLESv2_LIB).so
|
||||
VG_LIB_NAME = lib$(VG_LIB).so
|
||||
GLAPI_LIB_NAME = lib$(GLAPI_LIB).so
|
||||
WAYLAND_EGL_LIB_NAME = lib$(WAYLAND_EGL_LIB).so
|
||||
GBM_LIB_NAME = lib$(GBM_LIB).so
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = $(GL_LIB_NAME)*
|
||||
@@ -91,7 +88,6 @@ GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
|
||||
VG_LIB_GLOB = $(VG_LIB_NAME)*
|
||||
GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)*
|
||||
WAYLAND_EGL_LIB_GLOB = $(WAYLAND_EGL_LIB_NAME)*
|
||||
GBM_LIB_GLOB = $(GBM_LIB_NAME)*
|
||||
|
||||
DRI_CFLAGS = $(CFLAGS)
|
||||
DRI_CXXFLAGS = $(CXXFLAGS)
|
||||
@@ -115,9 +111,6 @@ DRIVER_DIRS = x11 osmesa
|
||||
# EGL drivers to build
|
||||
EGL_DRIVERS_DIRS = glx
|
||||
|
||||
# gbm backends to build
|
||||
GBM_BACKEND_DIRS = dri
|
||||
|
||||
# Gallium directories and
|
||||
GALLIUM_DIRS = auxiliary drivers state_trackers
|
||||
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
@@ -145,7 +138,6 @@ GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
|
||||
VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
|
||||
GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
|
||||
WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -lwayland-client -ldrm
|
||||
GBM_LIB_DEPS = $(EXTRA_LIB_PATH) -ludev -ldl
|
||||
|
||||
# Program dependencies - specific GL/glut libraries added in Makefiles
|
||||
APP_LIB_DEPS = -lm
|
||||
@@ -165,9 +157,6 @@ DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||
# EGL driver install directory
|
||||
EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
|
||||
|
||||
# gbm backend install directory
|
||||
GBM_BACKEND_INSTALL_DIR = $(INSTALL_LIB_DIR)/gbm
|
||||
|
||||
# Xorg driver install directory (for xorg state-tracker)
|
||||
XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
|
||||
|
||||
@@ -200,6 +189,3 @@ VG_PC_CFLAGS =
|
||||
WAYLAND_EGL_PC_REQ_PRIV =
|
||||
WAYLAND_EGL_PC_LIB_PRIV =
|
||||
WAYLAND_EGL_PC_CFLAGS =
|
||||
GBM_PC_REQ_PRIV =
|
||||
GBM_PC_LIB_PRIV =
|
||||
GBM_PC_CFLAGS =
|
||||
|
@@ -63,16 +63,11 @@ GALLIUM_WINSYS_DIRS = sw sw/xlib drm/vmware drm/intel drm/i965
|
||||
GALLIUM_TARGET_DIRS =
|
||||
GALLIUM_STATE_TRACKERS_DIRS = egl
|
||||
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \
|
||||
savage sis tdfx unichrome swrast
|
||||
|
||||
INTEL_LIBS = $(shell pkg-config --libs libdrm_intel)
|
||||
INTEL_CFLAGS = $(shell pkg-config --cflags libdrm_intel)
|
||||
INTEL_LIBS = `pkg-config --libs libdrm_intel`
|
||||
INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
|
||||
|
||||
NOUVEAU_LIBS = $(shell pkg-config --libs libdrm_nouveau)
|
||||
NOUVEAU_CFLAGS = $(shell pkg-config --cflags libdrm_nouveau)
|
||||
|
||||
LIBDRM_RADEON_LIBS = $(shell pkg-config --libs libdrm_radeon)
|
||||
LIBDRM_RADEON_CFLAGS = $(shell pkg-config --cflags libdrm_radeon)
|
||||
RADEON_CFLAGS = "-DHAVE_LIBDRM_RADEON=1 $(LIBDRM_RADEON_CFLAGS)"
|
||||
RADEON_LDFLAGS = $(LIBDRM_RADEON_LIBS)
|
||||
RADEON_LIBS = `pkg-config --libs libdrm_radeon`
|
||||
RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon`
|
||||
|
568
configure.ac
568
configure.ac
@@ -21,7 +21,6 @@ dnl Versions for external dependencies
|
||||
LIBDRM_REQUIRED=2.4.24
|
||||
LIBDRM_RADEON_REQUIRED=2.4.24
|
||||
LIBDRM_INTEL_REQUIRED=2.4.24
|
||||
LIBDRM_NOUVEAU_REQUIRED=0.6
|
||||
DRI2PROTO_REQUIRED=2.1
|
||||
GLPROTO_REQUIRED=1.4.11
|
||||
LIBDRM_XORG_REQUIRED=2.4.24
|
||||
@@ -40,12 +39,6 @@ if test "x$MKDEP" = "x"; then
|
||||
AC_MSG_ERROR([makedepend is required to build Mesa])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG([FLEX], [flex])
|
||||
test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build Mesa])
|
||||
|
||||
AC_PATH_PROG([BISON], [bison])
|
||||
test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build Mesa])
|
||||
|
||||
dnl Our fallback install-sh is a symlink to minstall. Use the existing
|
||||
dnl configuration in that case.
|
||||
AC_PROG_INSTALL
|
||||
@@ -326,21 +319,6 @@ else
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl potentially-infringing-but-nobody-knows-for-sure stuff
|
||||
dnl
|
||||
AC_ARG_ENABLE([texture-float],
|
||||
[AS_HELP_STRING([--enable-texture-float],
|
||||
[enable floating-point textures and renderbuffers @<:@default=disabled@:>@])],
|
||||
[enable_texture_float="$enableval"],
|
||||
[enable_texture_float=no]
|
||||
)
|
||||
if test "x$enable_texture_float" = xyes; then
|
||||
AC_MSG_WARN([Floating-point textures enabled.])
|
||||
AC_MSG_WARN([Please consult docs/patents.txt with your lawyer before building Mesa.])
|
||||
DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED"
|
||||
fi
|
||||
|
||||
GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION}
|
||||
GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
|
||||
GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
|
||||
@@ -352,7 +330,6 @@ GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION}
|
||||
VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION}
|
||||
GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION}
|
||||
WAYLAND_EGL_LIB_NAME='lib$(WAYLAND_EGL_LIB).'${LIB_EXTENSION}
|
||||
GBM_LIB_NAME='lib$(GBM_LIB).'${LIB_EXTENSION}
|
||||
|
||||
GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
@@ -366,7 +343,6 @@ GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LI
|
||||
VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
WAYLAND_EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(WAYLAND_EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
GBM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GBM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
|
||||
AC_SUBST([GL_LIB_NAME])
|
||||
AC_SUBST([GLU_LIB_NAME])
|
||||
@@ -379,7 +355,6 @@ AC_SUBST([GLESv2_LIB_NAME])
|
||||
AC_SUBST([VG_LIB_NAME])
|
||||
AC_SUBST([GLAPI_LIB_NAME])
|
||||
AC_SUBST([WAYLAND_EGL_LIB_NAME])
|
||||
AC_SUBST([GBM_LIB_NAME])
|
||||
|
||||
AC_SUBST([GL_LIB_GLOB])
|
||||
AC_SUBST([GLU_LIB_GLOB])
|
||||
@@ -392,7 +367,6 @@ AC_SUBST([GLESv2_LIB_GLOB])
|
||||
AC_SUBST([VG_LIB_GLOB])
|
||||
AC_SUBST([GLAPI_LIB_GLOB])
|
||||
AC_SUBST([WAYLAND_EGL_LIB_GLOB])
|
||||
AC_SUBST([GBM_LIB_GLOB])
|
||||
|
||||
dnl
|
||||
dnl Arch/platform-specific settings
|
||||
@@ -511,7 +485,7 @@ if test "x$enable_selinux" = "xyes"; then
|
||||
DEFINES="$DEFINES -DMESA_SELINUX"
|
||||
fi
|
||||
|
||||
dnl Options for APIs
|
||||
dnl Determine which APIs to support
|
||||
AC_ARG_ENABLE([opengl],
|
||||
[AS_HELP_STRING([--disable-opengl],
|
||||
[disable support for standard OpenGL API @<:@default=no@:>@])],
|
||||
@@ -527,63 +501,32 @@ AC_ARG_ENABLE([gles2],
|
||||
[enable support for OpenGL ES 2.x API @<:@default=no@:>@])],
|
||||
[enable_gles2="$enableval"],
|
||||
[enable_gles2=no])
|
||||
AC_ARG_ENABLE([gles-overlay],
|
||||
[AS_HELP_STRING([--enable-gles-overlay],
|
||||
[DEPRECATED. Same as --enable-gles1 and --enable-gles2])],
|
||||
[enable_gles1="$enableval"; enable_gles2="$enableval"],
|
||||
[])
|
||||
|
||||
AC_ARG_ENABLE([openvg],
|
||||
[AS_HELP_STRING([--enable-openvg],
|
||||
[enable support for OpenVG API @<:@default=no@:>@])],
|
||||
[enable_openvg="$enableval"],
|
||||
[enable_openvg=no])
|
||||
AC_ARG_ENABLE([xorg],
|
||||
[AS_HELP_STRING([--enable-xorg],
|
||||
[enable support for X.Org DDX API @<:@default=no@:>@])],
|
||||
[enable_xorg="$enableval"],
|
||||
[enable_xorg=no])
|
||||
AC_ARG_ENABLE([d3d1x],
|
||||
[AS_HELP_STRING([--enable-d3d1x],
|
||||
[enable support for Direct3D 10 & 11 low-level API @<:@default=no@:>@])],
|
||||
[enable_d3d1x="$enableval"],
|
||||
[enable_d3d1x=no])
|
||||
AC_ARG_ENABLE([egl],
|
||||
[AS_HELP_STRING([--disable-egl],
|
||||
[disable EGL library @<:@default=enabled@:>@])],
|
||||
[enable_egl="$enableval"],
|
||||
[enable_egl=yes])
|
||||
AC_ARG_ENABLE([gbm],
|
||||
[AS_HELP_STRING([--enable-gbm],
|
||||
[enable gbm library @<:@default=auto@:>@])],
|
||||
[enable_gbm="$enableval"],
|
||||
[enable_gbm=auto])
|
||||
AC_ARG_ENABLE([gallium_egl],
|
||||
[AS_HELP_STRING([--enable-gallium-egl],
|
||||
[enable optional EGL state tracker (not required
|
||||
for EGL support in Gallium with OpenGL and OpenGL ES)
|
||||
@<:@default=disable@:>@])],
|
||||
[enable_gallium_egl="$enableval"],
|
||||
[enable_gallium_egl=no])
|
||||
AC_ARG_ENABLE([gallium_gbm],
|
||||
[AS_HELP_STRING([--enable-gallium-gbm],
|
||||
[enable optional gbm state tracker (not required for
|
||||
gbm support in Gallium)
|
||||
@<:@default=disable@:>@])],
|
||||
[enable_gallium_gbm="$enableval"],
|
||||
[enable_gallium_gbm=no])
|
||||
|
||||
# Option for Gallium drivers
|
||||
GALLIUM_DRIVERS_DEFAULT="r300,r600,swrast"
|
||||
|
||||
AC_ARG_WITH([gallium-drivers],
|
||||
[AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
|
||||
[comma delimited Gallium drivers list, e.g.
|
||||
"i915,i965,nouveau,r300,r600,svga,swrast"
|
||||
@<:@default=r300,r600,swrast@:>@])],
|
||||
[with_gallium_drivers="$withval"],
|
||||
[with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
|
||||
dnl smooth the transition; should be removed eventually
|
||||
if test "x$enable_openvg" = xno; then
|
||||
case "x$with_state_trackers" in
|
||||
x*vega*)
|
||||
AC_MSG_WARN([vega state tracker is enabled without --enable-openvg])
|
||||
enable_openvg=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles1" = xno -a \
|
||||
"x$enable_gles2" = xno -a \
|
||||
"x$enable_openvg" = xno -a \
|
||||
"x$enable_xorg" = xno -a \
|
||||
"x$enable_d3d1x" = xno; then
|
||||
"x$enable_openvg" = xno; then
|
||||
AC_MSG_ERROR([at least one API should be enabled])
|
||||
fi
|
||||
|
||||
@@ -692,6 +635,11 @@ if test "x$enable_gles2" = xyes; then
|
||||
CORE_DIRS="$CORE_DIRS mapi/es2api"
|
||||
fi
|
||||
|
||||
# build vgapi if OpenVG is enabled
|
||||
if test "x$enable_openvg" = xyes; then
|
||||
CORE_DIRS="$CORE_DIRS mapi/vgapi"
|
||||
fi
|
||||
|
||||
# build glsl and mesa if OpenGL or OpenGL ES is enabled
|
||||
case "x$enable_opengl$enable_gles1$enable_gles2" in
|
||||
x*yes*)
|
||||
@@ -704,14 +652,11 @@ xlib)
|
||||
DRIVER_DIRS="x11"
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib"
|
||||
GALLIUM_STATE_TRACKERS_DIRS="glx $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
;;
|
||||
dri)
|
||||
SRC_DIRS="$SRC_DIRS glx"
|
||||
DRIVER_DIRS="dri"
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib sw/dri"
|
||||
GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
HAVE_ST_DRI="yes"
|
||||
;;
|
||||
osmesa)
|
||||
DRIVER_DIRS="osmesa"
|
||||
@@ -1038,8 +983,8 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
|
||||
# the new interface. i810 are missing because there is no
|
||||
# x86-64 system where they could *ever* be used.
|
||||
if test "x$DRI_DIRS" = "xyes"; then
|
||||
DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
|
||||
radeon savage tdfx unichrome swrast"
|
||||
DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \
|
||||
savage tdfx unichrome swrast"
|
||||
fi
|
||||
;;
|
||||
powerpc*)
|
||||
@@ -1066,8 +1011,8 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
|
||||
fi
|
||||
|
||||
if test "x$DRI_DIRS" = "xyes"; then
|
||||
DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
|
||||
radeon tdfx unichrome savage sis swrast"
|
||||
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
|
||||
unichrome savage sis swrast"
|
||||
fi
|
||||
;;
|
||||
gnu*)
|
||||
@@ -1095,7 +1040,7 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
|
||||
|
||||
# default drivers
|
||||
if test "x$DRI_DIRS" = "xyes"; then
|
||||
DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \
|
||||
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \
|
||||
savage sis tdfx unichrome swrast"
|
||||
fi
|
||||
|
||||
@@ -1131,12 +1076,6 @@ case $DRI_DIRS in
|
||||
;;
|
||||
esac
|
||||
|
||||
case $DRI_DIRS in
|
||||
*nouveau*)
|
||||
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
|
||||
;;
|
||||
esac
|
||||
|
||||
case $DRI_DIRS in
|
||||
*radeon*|*r200*|*r300*|*r600*)
|
||||
if test "x$HAVE_LIBDRM_RADEON" = xyes; then
|
||||
@@ -1217,37 +1156,42 @@ AC_SUBST([OSMESA_PC_LIB_PRIV])
|
||||
dnl
|
||||
dnl EGL configuration
|
||||
dnl
|
||||
EGL_CLIENT_APIS=""
|
||||
|
||||
AC_ARG_ENABLE([egl],
|
||||
[AS_HELP_STRING([--disable-egl],
|
||||
[disable EGL library @<:@default=enabled@:>@])],
|
||||
[enable_egl="$enableval"],
|
||||
[enable_egl=yes])
|
||||
if test "x$enable_egl" = xno; then
|
||||
if test "x$mesa_driver" = xno; then
|
||||
AC_MSG_ERROR([cannot disable EGL when there is no mesa driver])
|
||||
fi
|
||||
if test "x$enable_openvg" = xyes; then
|
||||
AC_MSG_ERROR([cannot enable OpenVG without EGL])
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_egl" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS egl"
|
||||
EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
|
||||
EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread"
|
||||
EGL_DRIVERS_DIRS=""
|
||||
|
||||
if test "$enable_static" != yes; then
|
||||
# build egl_glx when libGL is built
|
||||
if test "$mesa_driver" = xlib -o "$mesa_driver" = dri; then
|
||||
EGL_DRIVERS_DIRS="glx"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
|
||||
[have_libudev=yes],[have_libudev=no])
|
||||
if test "$have_libudev" = yes; then
|
||||
DEFINES="$DEFINES -DHAVE_LIBUDEV"
|
||||
fi
|
||||
if test "$mesa_driver" = dri; then
|
||||
# build egl_dri2 when xcb-dri2 is available
|
||||
PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes],
|
||||
[have_xcb_dri2=yes],[have_xcb_dri2=no])
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
|
||||
[have_libudev=yes],[have_libudev=no])
|
||||
|
||||
if test "$have_xcb_dri2" = yes; then
|
||||
EGL_DRIVER_DRI2=dri2
|
||||
DEFINES="$DEFINES -DHAVE_XCB_DRI2"
|
||||
if test "$have_libudev" = yes; then
|
||||
DEFINES="$DEFINES -DHAVE_LIBUDEV"
|
||||
fi
|
||||
# workaround a bug in xcb-dri2 generated by xcb-proto 1.6
|
||||
AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
|
||||
[DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
|
||||
@@ -1260,123 +1204,6 @@ fi
|
||||
AC_SUBST([EGL_LIB_DEPS])
|
||||
AC_SUBST([EGL_DRIVERS_DIRS])
|
||||
|
||||
dnl
|
||||
dnl gbm configuration
|
||||
dnl
|
||||
if test "x$enable_gbm" = xauto; then
|
||||
case "$with_egl_platforms" in
|
||||
*drm*)
|
||||
enable_gbm=yes ;;
|
||||
*)
|
||||
enable_gbm=no ;;
|
||||
esac
|
||||
fi
|
||||
if test "x$enable_gbm" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS gbm"
|
||||
GBM_BACKEND_DIRS=""
|
||||
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
|
||||
AC_MSG_ERROR([gbm needs udev]))
|
||||
GBM_LIB_DEPS="$DLOPEN_LIBS $LIBUDEV_LIBS"
|
||||
|
||||
if test "$mesa_driver" = dri; then
|
||||
GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
|
||||
if test "$SHARED_GLAPI" -eq 0; then
|
||||
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([GBM_LIB_DEPS])
|
||||
AC_SUBST([GBM_BACKEND_DIRS])
|
||||
GBM_PC_REQ_PRIV="libudev"
|
||||
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
|
||||
GBM_PC_CFLAGS=
|
||||
AC_SUBST([GBM_PC_REQ_PRIV])
|
||||
AC_SUBST([GBM_PC_LIB_PRIV])
|
||||
AC_SUBST([GBM_PC_CFLAGS])
|
||||
|
||||
dnl
|
||||
dnl EGL Gallium configuration
|
||||
dnl
|
||||
if test "x$enable_gallium_egl" = xyes; then
|
||||
if test "x$with_gallium_drivers" = x; then
|
||||
AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
|
||||
fi
|
||||
if test "x$enable_egl" = xno; then
|
||||
AC_MSG_ERROR([cannot enable egl_gallium without EGL])
|
||||
fi
|
||||
|
||||
GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-static"
|
||||
HAVE_ST_EGL="yes"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl gbm Gallium configuration
|
||||
dnl
|
||||
if test "x$enable_gallium_gbm" = xyes; then
|
||||
if test "x$with_gallium_drivers" = x; then
|
||||
AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
|
||||
fi
|
||||
if test "x$enable_gbm" = xno; then
|
||||
AC_MSG_ERROR([cannot enable gbm_gallium without gbm])
|
||||
fi
|
||||
|
||||
GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
|
||||
HAVE_ST_GBM="yes"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl X.Org DDX configuration
|
||||
dnl
|
||||
if test "x$enable_xorg" = xyes; then
|
||||
PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0])
|
||||
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
|
||||
PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED])
|
||||
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
|
||||
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
|
||||
HAVE_XEXTPROTO_71="no")
|
||||
GALLIUM_STATE_TRACKERS_DIRS="xorg $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
HAVE_ST_XORG=yes
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl OpenVG configuration
|
||||
dnl
|
||||
VG_LIB_DEPS=""
|
||||
|
||||
if test "x$enable_openvg" = xyes; then
|
||||
if test "x$enable_egl" = xno; then
|
||||
AC_MSG_ERROR([cannot enable OpenVG without EGL])
|
||||
fi
|
||||
if test "x$with_gallium_drivers" = x; then
|
||||
AC_MSG_ERROR([cannot enable OpenVG without Gallium])
|
||||
fi
|
||||
if test "x$enable_gallium_egl" = xno; then
|
||||
AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
|
||||
fi
|
||||
|
||||
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
|
||||
VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS -lpthread"
|
||||
CORE_DIRS="$CORE_DIRS mapi/vgapi"
|
||||
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
HAVE_ST_VEGA=yes
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl D3D1X configuration
|
||||
dnl
|
||||
|
||||
if test "x$enable_d3d1x" = xyes; then
|
||||
if test "x$with_gallium_drivers" = x; then
|
||||
AC_MSG_ERROR([cannot enable D3D1X without Gallium])
|
||||
fi
|
||||
|
||||
GALLIUM_STATE_TRACKERS_DIRS="d3d1x $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
HAVE_ST_D3D1X=yes
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl GLU configuration
|
||||
dnl
|
||||
@@ -1593,11 +1420,17 @@ AC_SUBST([PROGRAM_DIRS])
|
||||
dnl
|
||||
dnl Gallium configuration
|
||||
dnl
|
||||
if test "x$with_gallium_drivers" != x; then
|
||||
AC_ARG_ENABLE([gallium],
|
||||
[AS_HELP_STRING([--disable-gallium],
|
||||
[build gallium @<:@default=enabled@:>@])],
|
||||
[enable_gallium="$enableval"],
|
||||
[enable_gallium=yes])
|
||||
if test "x$enable_gallium" = xno -a "x$enable_openvg" = xyes; then
|
||||
AC_MSG_ERROR([cannot enable OpenVG without Gallium])
|
||||
fi
|
||||
if test "x$enable_gallium" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
|
||||
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
|
||||
else
|
||||
LLVM_CONFIG=no
|
||||
fi
|
||||
|
||||
AC_SUBST([LLVM_CFLAGS])
|
||||
@@ -1605,23 +1438,160 @@ AC_SUBST([LLVM_LIBS])
|
||||
AC_SUBST([LLVM_LDFLAGS])
|
||||
AC_SUBST([LLVM_VERSION])
|
||||
|
||||
dnl
|
||||
dnl Gallium state trackers configuration
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE([gallium-egl],
|
||||
[AS_HELP_STRING([--enable-gallium-egl],
|
||||
[enable gallium EGL state tracker @<:@default=auto@:>@])],
|
||||
[enable_gallium_egl="$enableval"],
|
||||
[enable_gallium_egl=auto])
|
||||
if test "x$enable_gallium_egl" = xauto; then
|
||||
case "$mesa_driver" in
|
||||
dri|no)
|
||||
enable_gallium_egl=$enable_egl
|
||||
;;
|
||||
*)
|
||||
enable_gallium_egl=$enable_openvg
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case "x$enable_egl$enable_gallium_egl" in
|
||||
xnoyes)
|
||||
AC_MSG_ERROR([cannot build Gallium EGL state tracker without EGL])
|
||||
esac
|
||||
|
||||
AC_ARG_WITH([state-trackers],
|
||||
[AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@],
|
||||
[comma delimited state_trackers list, e.g.
|
||||
"egl,glx" @<:@default=auto@:>@])],
|
||||
[with_state_trackers="$withval"],
|
||||
[with_state_trackers=yes])
|
||||
|
||||
case "$with_state_trackers" in
|
||||
no)
|
||||
GALLIUM_STATE_TRACKERS_DIRS=""
|
||||
;;
|
||||
yes)
|
||||
# look at what else is built
|
||||
case "$mesa_driver" in
|
||||
xlib)
|
||||
GALLIUM_STATE_TRACKERS_DIRS=glx
|
||||
;;
|
||||
dri)
|
||||
GALLIUM_STATE_TRACKERS_DIRS="dri"
|
||||
HAVE_ST_DRI="yes"
|
||||
# Have only tested st/xorg on 1.6.0 servers
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED],
|
||||
HAVE_ST_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg",
|
||||
HAVE_ST_XORG="no")
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$enable_egl" = xyes; then
|
||||
if test "$enable_openvg" = yes; then
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vega"
|
||||
st_egl="yes"
|
||||
fi
|
||||
|
||||
if test "$enable_gallium_egl" = yes; then
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl"
|
||||
HAVE_ST_EGL="yes"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# verify the requested state tracker exist
|
||||
state_trackers=""
|
||||
_state_trackers=`IFS=', '; echo $with_state_trackers`
|
||||
for tracker in $_state_trackers; do
|
||||
case "$tracker" in
|
||||
dri)
|
||||
if test "x$mesa_driver" != xdri; then
|
||||
AC_MSG_ERROR([cannot build dri state tracker without mesa driver set to dri])
|
||||
fi
|
||||
HAVE_ST_DRI="yes"
|
||||
;;
|
||||
egl)
|
||||
if test "x$enable_egl" != xyes; then
|
||||
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
|
||||
fi
|
||||
HAVE_ST_EGL="yes"
|
||||
;;
|
||||
xorg)
|
||||
PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0])
|
||||
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
|
||||
PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED])
|
||||
HAVE_ST_XORG="yes"
|
||||
;;
|
||||
vega)
|
||||
if test "x$enable_openvg" != xyes; then
|
||||
AC_MSG_ERROR([cannot build vega state tracker without --enable-openvg])
|
||||
fi
|
||||
have_st_vega="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$tracker"; then
|
||||
test -d "$srcdir/src/gallium/state_trackers/$tracker" || \
|
||||
AC_MSG_ERROR([state tracker '$tracker' doesn't exist])
|
||||
if test -n "$state_trackers"; then
|
||||
state_trackers="$state_trackers $tracker"
|
||||
else
|
||||
state_trackers="$tracker"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
|
||||
|
||||
# append --enable-openvg/--enable-gallium-egl to --with-state-trackers
|
||||
if test "x$have_st_vega" != xyes -a "x$enable_openvg" = xyes; then
|
||||
AC_MSG_ERROR([--with-state-trackers specified but vega is missing])
|
||||
fi
|
||||
if test "x$HAVE_ST_EGL" != xyes -a "x$enable_gallium_egl" = xyes; then
|
||||
AC_MSG_ERROR([--with-state-trackers specified but egl is missing])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
EGL_CLIENT_APIS=""
|
||||
VG_LIB_DEPS=""
|
||||
|
||||
case "x$enable_opengl$enable_gles1$enable_gles2" in
|
||||
x*yes*)
|
||||
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
|
||||
;;
|
||||
esac
|
||||
if test "x$enable_openvg" = xyes; then
|
||||
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
|
||||
VG_LIB_DEPS="$VG_LIB_DEPS -lpthread"
|
||||
fi
|
||||
|
||||
AC_SUBST([VG_LIB_DEPS])
|
||||
AC_SUBST([EGL_CLIENT_APIS])
|
||||
|
||||
if test "x$HAVE_ST_EGL" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl"
|
||||
fi
|
||||
|
||||
if test "x$HAVE_ST_XORG" = xyes; then
|
||||
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
|
||||
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
|
||||
HAVE_XEXTPROTO_71="no")
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([egl-platforms],
|
||||
[AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
|
||||
[comma delimited native platforms libEGL supports, e.g.
|
||||
"x11,drm" @<:@default=auto@:>@])],
|
||||
[with_egl_platforms="$withval"],
|
||||
[with_egl_platforms=yes])
|
||||
AC_ARG_WITH([egl-displays],
|
||||
[AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@],
|
||||
[DEPRECATED. Use --with-egl-platforms instead])],
|
||||
[with_egl_platforms="$withval"])
|
||||
|
||||
EGL_PLATFORMS=""
|
||||
WAYLAND_EGL_LIB_DEPS=""
|
||||
@@ -1630,6 +1600,9 @@ case "$with_egl_platforms" in
|
||||
yes)
|
||||
if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then
|
||||
EGL_PLATFORMS="x11"
|
||||
if test "$mesa_driver" = dri; then
|
||||
EGL_PLATFORMS="$EGL_PLATFORMS drm"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
@@ -1648,11 +1621,7 @@ yes)
|
||||
PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \
|
||||
[AC_MSG_ERROR([cannot find libwayland-client])])
|
||||
WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS"
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
|
||||
fi
|
||||
if test "$plat" = "drm" && test "x$enable_gbm" = no; then
|
||||
AC_MSG_ERROR([EGL platform drm needs gbm])
|
||||
fi
|
||||
done
|
||||
EGL_PLATFORMS="$egl_platforms"
|
||||
;;
|
||||
@@ -1703,17 +1672,9 @@ dnl Gallium LLVM
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-llvm],
|
||||
[AS_HELP_STRING([--enable-gallium-llvm],
|
||||
[build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
|
||||
[build gallium LLVM support @<:@default=disabled@:>@])],
|
||||
[enable_gallium_llvm="$enableval"],
|
||||
[enable_gallium_llvm=auto])
|
||||
if test "x$with_gallium_drivers" = x; then
|
||||
enable_gallium_llvm=no
|
||||
fi
|
||||
if test "x$enable_gallium_llvm" = xauto; then
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64) enable_gallium_llvm=yes;;
|
||||
esac
|
||||
fi
|
||||
if test "x$enable_gallium_llvm" = xyes; then
|
||||
if test "x$LLVM_CONFIG" != xno; then
|
||||
LLVM_VERSION=`$LLVM_CONFIG --version`
|
||||
@@ -1746,54 +1707,109 @@ gallium_check_st() {
|
||||
fi
|
||||
}
|
||||
|
||||
gallium_require_llvm() {
|
||||
if test "x$MESA_LLVM" = x0; then
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Gallium drivers
|
||||
if test "x$with_gallium_drivers" != x; then
|
||||
# This is for compile-testing
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965 r300 svga"
|
||||
dnl
|
||||
dnl Gallium SVGA configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-svga],
|
||||
[AS_HELP_STRING([--enable-gallium-svga],
|
||||
[build gallium SVGA @<:@default=disabled@:>@])],
|
||||
[enable_gallium_svga="$enableval"],
|
||||
[enable_gallium_svga=auto])
|
||||
if test "x$enable_gallium_svga" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
|
||||
gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx"
|
||||
elif test "x$enable_gallium_svga" = xauto; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium i915 configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-i915],
|
||||
[AS_HELP_STRING([--enable-gallium-i915],
|
||||
[build gallium i915 @<:@default=disabled@:>@])],
|
||||
[enable_gallium_i915="$enableval"],
|
||||
[enable_gallium_i915=auto])
|
||||
if test "x$enable_gallium_i915" = xyes; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915"
|
||||
gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
|
||||
elif test "x$enable_gallium_i915" = xauto; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915"
|
||||
fi
|
||||
|
||||
gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
|
||||
for driver in $gallium_drivers; do
|
||||
case "x$driver" in
|
||||
xsvga)
|
||||
gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx"
|
||||
;;
|
||||
xi915)
|
||||
gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
|
||||
;;
|
||||
xi965)
|
||||
gallium_check_st "i965/drm" "dri-i965" "xorg-i965"
|
||||
;;
|
||||
xr300)
|
||||
gallium_require_llvm "Gallium R300"
|
||||
gallium_check_st "radeon/drm" "dri-r300" "xorg-r300"
|
||||
;;
|
||||
xr600)
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
|
||||
gallium_check_st "r600/drm" "dri-r600"
|
||||
;;
|
||||
xnouveau)
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
|
||||
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau"
|
||||
;;
|
||||
xswrast)
|
||||
if test "x$HAVE_ST_DRI" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown Gallium driver: $driver])
|
||||
;;
|
||||
esac
|
||||
done
|
||||
dnl
|
||||
dnl Gallium i965 configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-i965],
|
||||
[AS_HELP_STRING([--enable-gallium-i965],
|
||||
[build gallium i965 @<:@default=disabled@:>@])],
|
||||
[enable_gallium_i965="$enableval"],
|
||||
[enable_gallium_i965=auto])
|
||||
if test "x$enable_gallium_i965" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965"
|
||||
gallium_check_st "i965/drm" "dri-i965" "xorg-i965"
|
||||
elif test "x$enable_gallium_i965" = xauto; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium Radeon r300g configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-radeon],
|
||||
[AS_HELP_STRING([--enable-gallium-radeon],
|
||||
[build gallium radeon @<:@default=disabled@:>@])],
|
||||
[enable_gallium_radeon="$enableval"],
|
||||
[enable_gallium_radeon=auto])
|
||||
if test "x$enable_gallium_radeon" = xauto; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
|
||||
gallium_check_st "radeon/drm" "dri-r300"
|
||||
fi
|
||||
if test "x$enable_gallium_radeon" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
|
||||
gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium Radeon r600g configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-r600],
|
||||
[AS_HELP_STRING([--enable-gallium-r600],
|
||||
[build gallium radeon @<:@default=disabled@:>@])],
|
||||
[enable_gallium_r600="$enableval"],
|
||||
[enable_gallium_r600=auto])
|
||||
if test "x$enable_gallium_r600" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
|
||||
gallium_check_st "r600/drm" "dri-r600"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium Nouveau configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-nouveau],
|
||||
[AS_HELP_STRING([--enable-gallium-nouveau],
|
||||
[build gallium nouveau @<:@default=disabled@:>@])],
|
||||
[enable_gallium_nouveau="$enableval"],
|
||||
[enable_gallium_nouveau=no])
|
||||
if test "x$enable_gallium_nouveau" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
|
||||
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium swrast configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-swrast],
|
||||
[AS_HELP_STRING([--enable-gallium-swrast],
|
||||
[build gallium swrast @<:@default=auto@:>@])],
|
||||
[enable_gallium_swrast="$enableval"],
|
||||
[enable_gallium_swrast=auto])
|
||||
if test "x$enable_gallium_swrast" = xyes || test "x$enable_gallium_swrast" = xauto; then
|
||||
if test "x$HAVE_ST_DRI" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl prepend CORE_DIRS to SRC_DIRS
|
||||
@@ -1868,7 +1884,7 @@ if test "$enable_egl" = yes; then
|
||||
egl_drivers="$egl_drivers builtin:egl_$d"
|
||||
done
|
||||
|
||||
if test "x$HAVE_ST_EGL" = xyes; then
|
||||
if test "$enable_gallium" = yes -a "$HAVE_ST_EGL" = yes; then
|
||||
echo " EGL drivers: ${egl_drivers} egl_gallium"
|
||||
echo " EGL Gallium STs:$EGL_CLIENT_APIS"
|
||||
else
|
||||
|
18
docs/GL3.txt
18
docs/GL3.txt
@@ -12,13 +12,13 @@ Feature Status
|
||||
|
||||
GL 3.0:
|
||||
|
||||
GLSL 1.30 (GL_EXT_gpu_shader4, etc.) started
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (swrast, softpipe, i965)
|
||||
GLSL changes (GL_EXT_gpu_shader4, etc) not started
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe)
|
||||
Map buffer subranges (GL_ARB_map_buffer_range) DONE
|
||||
Clamping controls (GL_ARB_color_buffer_float) DONE
|
||||
Float textures, renderbuffers (GL_ARB_texture_float) DONE (gallium r300)
|
||||
GL_EXT_packed_float DONE (gallium r600)
|
||||
GL_EXT_texture_shared_exponent DONE (gallium, swrast)
|
||||
Float textures, renderbuffers (GL_ARB_texture_float) BRANCH ~mareko/mesa floating2
|
||||
GL_EXT_packed_float not started
|
||||
GL_EXT_texture_shared_exponent not started
|
||||
Float depth buffers (GL_ARB_depth_buffer_float) not started
|
||||
Framebuffer objects (GL_EXT_framebuffer_object) DONE
|
||||
Half-float DONE
|
||||
@@ -45,7 +45,7 @@ Depth format cube textures 0% done
|
||||
|
||||
GL 3.1:
|
||||
|
||||
GLSL 1.40 not started
|
||||
GLSL 1.30 and 1.40 not started
|
||||
Instanced drawing (GL_ARB_draw_instanced) DONE (gallium, swrast)
|
||||
Buffer copying (GL_ARB_copy_buffer) DONE
|
||||
Primitive restart (GL_NV_primitive_restart) DONE (gallium)
|
||||
@@ -65,7 +65,7 @@ BGRA vertex order (GL_ARB_vertex_array_bgra) DONE
|
||||
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE
|
||||
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (swrast, gallium)
|
||||
Provoking vertex (GL_ARB_provoking_vertex) DONE
|
||||
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE
|
||||
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE, mostly?
|
||||
Multisample textures (GL_ARB_texture_multisample) not started
|
||||
Frag depth clamp (GL_ARB_depth_clamp) DONE
|
||||
Fence objects (GL_ARB_sync) DONE
|
||||
@@ -80,7 +80,7 @@ GL_ARB_occlusion_query2 DONE (swrast, gallium)
|
||||
GL_ARB_sampler_objects DONE (gallium)
|
||||
GL_ARB_texture_rgb10_a2ui not started
|
||||
GL_ARB_texture_swizzle DONE (same as EXT version)
|
||||
GL_ARB_timer_query ~60% done (the EXT variant)
|
||||
GL_ARB_timer_query DONE (only Xlib sw driver)
|
||||
GL_ARB_instanced_arrays DONE (gallium)
|
||||
GL_ARB_vertex_type_2_10_10_10_rev not started
|
||||
|
||||
@@ -105,7 +105,7 @@ GL_ARB_transform_feedback3 not started
|
||||
GL 4.1:
|
||||
|
||||
GLSL 4.1 not started
|
||||
GL_ARB_ES2_compatibility DONE (i965)
|
||||
GL_ARB_ES2_compatibility not started
|
||||
GL_ARB_get_program_binary not started
|
||||
GL_ARB_separate_shader_objects some infrastructure done
|
||||
GL_ARB_shader_precision not started
|
||||
|
@@ -66,7 +66,6 @@ New Tokens
|
||||
|
||||
EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002
|
||||
EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
|
||||
|
||||
Accepted in the <target> parameter of eglCreateImageKHR:
|
||||
|
||||
@@ -90,16 +89,13 @@ Additions to the EGL 1.4 Specification:
|
||||
extension is EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, where each pixel
|
||||
is a CPU-endian, 32-bit quantity, with alpha in the upper 8 bits,
|
||||
then red, then green, then blue. The bit values accepted by
|
||||
EGL_DRM_BUFFER_USE_MESA are EGL_DRM_BUFFER_USE_SCANOUT_MESA,
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA and EGL_DRM_BUFFER_USE_CURSOR_MESA.
|
||||
EGL_DRM_BUFFER_USE_SCANOUT_MESA requests that the created EGLImage
|
||||
should be usable as a scanout buffer with the DRM kernel
|
||||
modesetting API. EGL_DRM_BUFFER_USE_SHARE_MESA requests that the
|
||||
EGLImage can be shared with other processes by passing the
|
||||
underlying DRM buffer name. EGL_DRM_BUFFER_USE_CURSOR_MESA
|
||||
requests that the image must be usable as a cursor with KMS. When
|
||||
EGL_DRM_BUFFER_USE_CURSOR_MESA is set, width and height must both
|
||||
be 64.
|
||||
EGL_DRM_BUFFER_USE_MESA are EGL_DRM_BUFFER_USE_SCANOUT_MESA and
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA. EGL_DRM_BUFFER_USE_SCANOUT_MESA
|
||||
requests that the created EGLImage should be usable as a scanout
|
||||
buffer with the DRM kernel modesetting API. The
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA bit requests that the EGLImage can
|
||||
be shared with other processes by passing the underlying DRM
|
||||
buffer name.
|
||||
|
||||
To create a process local handle or a global DRM name for a
|
||||
buffer, call
|
||||
|
@@ -1,33 +1,114 @@
|
||||
File: docs/README.WIN32
|
||||
|
||||
Last updated: 23 April 2011
|
||||
Last updated: Apr 25, 2007
|
||||
|
||||
NOTE: This information only applies to Mesa 7.8 and older. Nowadays
|
||||
it's probably better to use Scons to build for Windows.
|
||||
|
||||
|
||||
Quick Start
|
||||
----- -----
|
||||
|
||||
Windows drivers are build with SCons. Makefiles or Visual Studio projects are
|
||||
no longer shipped or supported.
|
||||
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
|
||||
directory. The libs and demos build separately, so if you do not care
|
||||
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
|
||||
more than one ZIP file, they all need to be unzipped into the same
|
||||
directory. Don't worry, you will not overwrite anything.
|
||||
|
||||
Run
|
||||
The Windows build system uses Microsoft Visual Studio. Project files
|
||||
for a specific version of Visual Studio are in their own directory in
|
||||
the top-level "windows" directory. For example, Visual Studio 8 files
|
||||
are in windows/VC8.
|
||||
|
||||
scons osmesa mesagdi
|
||||
Support has been dropped for versions of Visual Studio prior to 8. The
|
||||
main reason is because Microsoft now provides a free compiler and
|
||||
developer environment. Visual Studio Express can be found at
|
||||
|
||||
to build classic mesa Windows GDI drivers; or
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
|
||||
|
||||
scons libgl-gdi
|
||||
You'll also need the Platform SDK. Instructions for obtaining and
|
||||
using the SDK with Visual Studio Express can be found at
|
||||
|
||||
to build gallium based GDI driver.
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
to build GLUT and some demo programs are in the progs directory.
|
||||
|
||||
Makefiles are no longer shipped or supported, but can be generated
|
||||
from the projects using Visual Studio.
|
||||
|
||||
|
||||
Windows Drivers
|
||||
------- -------
|
||||
|
||||
At this time, only the gallium GDI driver is known to work.
|
||||
At this time, only the GDI driver is known to work. Most of the demos
|
||||
in progs/demos should work with this driver.
|
||||
|
||||
Source code also exists in the tree for other drivers in
|
||||
src/mesa/drivers/windows, but the status of this code is unknown.
|
||||
|
||||
The GDI driver operates basically by writing pixel spans into a DIB
|
||||
section and then blitting the DIB to the window. The driver was
|
||||
recently cleaned up and rewitten and so may have bugs or may be
|
||||
missing some functionality. The older versions of the CVS source may
|
||||
be useful in figuring out any problems, or report them to me.
|
||||
|
||||
To build Mesa with the GDI driver, build the mesa, gdi, and glu
|
||||
projects in the Visual Studio workspace found at
|
||||
|
||||
windows/VC8/mesa/mesa.sln
|
||||
|
||||
The osmesa DLL can also be built with the osmesa project.
|
||||
|
||||
The build system creates a lib top-level directory and copies
|
||||
resulting LIB and DLL files to this lib directory. The files are:
|
||||
|
||||
OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
|
||||
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
|
||||
|
||||
If the MesaDemos ZIP file was extracted, the DLL files are also copied
|
||||
to the demos directory. This facilitates running the demos as described
|
||||
below.
|
||||
|
||||
|
||||
GLUT and Demos
|
||||
---- --- -----
|
||||
|
||||
A Visual Studio workspace can be found at
|
||||
|
||||
windows/VC8/progs/progs.sln
|
||||
|
||||
It can be used to build GLUT and a few demos. The GLUT lib and DLL
|
||||
are copied to the top-level lib directory, along with the Mesa libs.
|
||||
|
||||
The demo build system expects to find the LIB files in the top level
|
||||
lib directory, so you must build the Mesa libs first. The demo
|
||||
executables are placed in the demos directory, because some of them
|
||||
rely on data files found there. Also, the Mesa lib DLL's were copied
|
||||
there by the Mesa lib build process. Therefore, you should be able to
|
||||
simply run the demo executables from the demo directory.
|
||||
|
||||
If you want to run the demos from the Visual Studio, you may have to
|
||||
change the startup directory and explicitly state where the executables are.
|
||||
|
||||
You may also build all the demo programs by using a makefile. Go to
|
||||
the progs/demos directory and make sure you have executed VCVARS32.BAT
|
||||
or whatever setup script is appropriate for your compiler. Then,
|
||||
|
||||
nmake -f Makefile.win
|
||||
|
||||
should build all the demos.
|
||||
|
||||
|
||||
Build System Notes
|
||||
----- ------ -----
|
||||
|
||||
VC8
|
||||
---
|
||||
|
||||
No notes.
|
||||
|
||||
|
||||
General
|
||||
-------
|
||||
@@ -47,5 +128,11 @@ the linker import files associated with the DLL files.
|
||||
The si-glu sources are used to build the GLU libs. This was done
|
||||
mainly to get the better tessellator code.
|
||||
|
||||
To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
|
||||
to the project settings. You will also need to edit src/mesa.def to
|
||||
change all the gl* symbols to mgl*. Because this is easy to do with a
|
||||
global replace operation in a text editor, no additional mangled
|
||||
version of mesa.def is maintained or shipped.
|
||||
|
||||
If you have a Windows-related build problem or question, please post
|
||||
to the mesa-dev or mesa-users list.
|
||||
|
@@ -82,7 +82,7 @@ Additions to the EGL 1.4 Specification:
|
||||
|
||||
Import a wl_buffer by calling eglCreateImageKHR with
|
||||
wl_buffer as EGLClientBuffer, EGL_WAYLAND_BUFFER_WL as the target,
|
||||
NULL context and an empty attribute_list.
|
||||
and an empty attribute_list.
|
||||
|
||||
Issues
|
||||
|
||||
|
@@ -29,14 +29,12 @@ directly dispatched to the drivers.</p>
|
||||
the driver for your hardware. For example</p>
|
||||
|
||||
<pre>
|
||||
$ ./configure --enable-gles1 --enable-gles2 \
|
||||
--with-dri-drivers=... \
|
||||
--with-gallium-drivers=...
|
||||
$ ./configure --enable-gles2 --enable-openvg --enable-gallium-nouveau
|
||||
</pre>
|
||||
|
||||
<p>The main library and OpenGL is enabled by default. The first two options
|
||||
above enables <a href="opengles.html">OpenGL ES 1.x and 2.x</a>. The last two
|
||||
options enables the listed classic and and Gallium drivers respectively.</p>
|
||||
<p>The main library and OpenGL is enabled by default. The first option above
|
||||
enables <a href="opengles.html">OpenGL ES 2.x</a>. The second option enables
|
||||
<a href="openvg.html">OpenVG</a>.</p>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -44,8 +42,8 @@ options enables the listed classic and and Gallium drivers respectively.</p>
|
||||
</ol>
|
||||
|
||||
<p>In the given example, it will build and install <code>libEGL</code>,
|
||||
<code>libGL</code>, <code>libGLESv1_CM</code>, <code>libGLESv2</code>, and one
|
||||
or more EGL drivers.</p>
|
||||
<code>libGL</code>, <code>libGLESv1_CM</code>, <code>libGLESv2</code>,
|
||||
<code>libOpenVG</code>, and one or more EGL drivers.</p>
|
||||
|
||||
<h3>Configure Options</h3>
|
||||
|
||||
@@ -67,12 +65,6 @@ drivers will be installed to <code>${libdir}/egl</code>.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--enable-gallium-egl</code>
|
||||
|
||||
<p>Enable the optional <code>egl_gallium</code> driver.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--with-egl-platforms</code>
|
||||
|
||||
<p>List the platforms (window systems) to support. Its argument is a comma
|
||||
@@ -96,20 +88,18 @@ internal library that supports multiple APIs.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--enable-shared-glapi</code>
|
||||
|
||||
<p>By default, <code>libGL</code> has its own copy of <code>libglapi</code>.
|
||||
This options makes <code>libGL</code> use the shared <code>libglapi</code>. This
|
||||
is required if applications mix OpenGL and OpenGL ES.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--enable-openvg</code>
|
||||
|
||||
<p>OpenVG must be explicitly enabled by this option.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--enable-gallium-egl</code>
|
||||
|
||||
<p>Explicitly enable or disable <code>egl_gallium</code>.</p>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Use EGL</h2>
|
||||
@@ -230,7 +220,8 @@ distribution.</p>
|
||||
<p>Generally, <code>egl_dri2</code> is preferred over <code>egl_gallium</code>
|
||||
when the system already has DRI drivers. As <code>egl_gallium</code> is loaded
|
||||
before <code>egl_dri2</code> when both are available, <code>egl_gallium</code>
|
||||
is disabled by default.</p>
|
||||
may either be disabled with <code>--disable-gallium-egl</code> or packaged
|
||||
separately.</p>
|
||||
|
||||
<h2>Developers</h2>
|
||||
|
||||
@@ -316,5 +307,17 @@ not be called with the sample display at the same time. If a driver has access
|
||||
to an <code>EGLDisplay</code> without going through the EGL APIs, the driver
|
||||
should as well lock the display before using it.
|
||||
|
||||
<h3>TODOs</h3>
|
||||
|
||||
<ul>
|
||||
<li>Pass the conformance tests</li>
|
||||
<li>Mixed use of OpenGL, OpenGL ES 1.1, and OpenGL ES 2.0 is supported. But
|
||||
which one of <code>libGL.so</code>, <code>libGLESv1_CM.so</code>, and
|
||||
<code>libGLESv2.so</code> should an application link to? Bad things may happen
|
||||
when, say, an application is linked to <code>libGLESv2.so</code> and
|
||||
<code>libcairo</code>, which is linked to <code>libGL.so</code> instead.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -274,6 +274,7 @@ For example, compiling and linking a GLUT application can be done with:
|
||||
|
||||
<p>
|
||||
Please see the <a href="#scons">instructions on building with SCons</a>.
|
||||
Alternatively see <a href="README.WIN32">README.WIN32</a> file.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -11,18 +11,11 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>June 13, 2011</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.10.3.html">Mesa 7.10.3</a> is released. This is a bug
|
||||
fix release.
|
||||
</p>
|
||||
|
||||
<h2>April 6, 2011</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.10.2.html">Mesa 7.10.2</a> is released. This is a bug
|
||||
fix release.
|
||||
fix release release.
|
||||
</p>
|
||||
|
||||
<h2>March 2, 2011</h2>
|
||||
|
@@ -34,10 +34,27 @@ EGL drivers for your hardware.</p>
|
||||
|
||||
<h2>Run the Demos</h2>
|
||||
|
||||
<p>There are some demos in <code>mesa/demos</code> repository.</p>
|
||||
<p>There are some demos in <code>progs/egl/</code>. You can use them to test
|
||||
your build. For example,</p>
|
||||
|
||||
<pre>
|
||||
$ cd progs/egl/eglut
|
||||
$ make
|
||||
$ cd ../opengles1
|
||||
$ make
|
||||
$ ./torus_x11
|
||||
</pre>
|
||||
|
||||
<h2>Developers</h2>
|
||||
|
||||
<h3>Internal Libraries</h3>
|
||||
|
||||
<table border="1" style="text-align: center;">
|
||||
<tr><td>Library Name</td><td>Used By</td><td>Enabled</td><td>OpenGL</td><td>OpenGL ES 1.x</td><td>OpenGL ES 2.x</td></tr>
|
||||
<tr><td><code>libmesa.a</td><td>Classic DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
|
||||
<tr><td><code>libmesagallium.a</td><td>Gallium EGL and DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Dispatch Table</h3>
|
||||
|
||||
<p>OpenGL ES has an additional indirection when dispatching fucntions</p>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<H1>OpenVG State Tracker</H1>
|
||||
|
||||
<p>
|
||||
The current version of the OpenVG state tracker implements OpenVG 1.1.
|
||||
The current version of the OpenVG state tracker implements OpenVG 1.0.
|
||||
</p>
|
||||
<p>
|
||||
More informations about OpenVG can be found at
|
||||
@@ -26,9 +26,9 @@ Please refer to <a href="egl.html">Mesa EGL</a> for more information about EGL.
|
||||
|
||||
<h2>Building the library</h2>
|
||||
<ol>
|
||||
<li>Run <code>configure</code> with <code>--enable-openvg</code> and
|
||||
<code>--enable-gallium-egl</code>. If you do not need OpenGL, you can add
|
||||
<code>--disable-opengl</code> to save the compilation time.</li>
|
||||
<li>Run <code>configure</code> with <code>--enable-openvg</code>. If you do
|
||||
not need OpenGL, you can add <code>--disable-opengl</code> to save the
|
||||
compilation time.</li>
|
||||
|
||||
<li>Build and install Mesa as usual.</li>
|
||||
</ol>
|
||||
@@ -36,7 +36,7 @@ Please refer to <a href="egl.html">Mesa EGL</a> for more information about EGL.
|
||||
<h3>Sample build</h3>
|
||||
A sample build looks as follows:
|
||||
<pre>
|
||||
$ ./configure --disable-opengl --enable-openvg --enable-gallium-egl
|
||||
$ ./configure --disable-opengl --enable-openvg
|
||||
$ make
|
||||
$ make install
|
||||
</pre>
|
||||
|
@@ -1,31 +0,0 @@
|
||||
ARB_texture_float:
|
||||
|
||||
Silicon Graphics, Inc. owns US Patent #6,650,327, issued November 18,
|
||||
2003 [1].
|
||||
|
||||
SGI believes this patent contains necessary IP for graphics systems
|
||||
implementing floating point rasterization and floating point
|
||||
framebuffer capabilities described in ARB_texture_float extension, and
|
||||
will discuss licensing on RAND terms, on an individual basis with
|
||||
companies wishing to use this IP in the context of conformant OpenGL
|
||||
implementations [2].
|
||||
|
||||
The source code to implement ARB_texture_float extension is included
|
||||
and can be toggled on at compile time, for those who purchased a
|
||||
license from SGI, or are in a country where the patent does not apply,
|
||||
etc.
|
||||
|
||||
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.
|
||||
|
||||
You should contact a lawyer or SGI's legal department if you want to
|
||||
enable this extension.
|
||||
|
||||
|
||||
[1] http://www.google.com/patents/about?id=mIIOAAAAEBAJ&dq=6650327
|
||||
[2] http://www.opengl.org/registry/specs/ARB/texture_float.txt
|
@@ -1,303 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<head>
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
</head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.10.3 Release Notes / June 13, 2011</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.10.3 is a bug fix release which fixes bugs found since the 7.10.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.10.3 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>
|
||||
d77b02034c11d6c2a55c07f82367d780 MesaLib-7.10.3.tar.gz
|
||||
8c38fe8266be8e1ed1d84076ba5a703b MesaLib-7.10.3.tar.bz2
|
||||
614d063ecd170940d9ae7b355d365d59 MesaLib-7.10.3.zip
|
||||
8768fd562ede7ed763d92b2d22232d7a MesaGLUT-7.10.3.tar.gz
|
||||
1496415b89da9549f0f3b34d9622e2e2 MesaGLUT-7.10.3.tar.bz2
|
||||
1f29d0e7398fd3bf9f36f5db02941198 MesaGLUT-7.10.3.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<p>This list is likely incomplete.</p>
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29162">Bug 29162</a> - mesa/darwin is severly broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31590">Bug 31590</a> - Black space between colors on mole hill example</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32395">Bug 32395</a> - [glsl] Incorrect code generation for shadow2DProj() with bias</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32564">Bug 32564</a> - [llvmpipe] prog: Unknown command line argument '-disable-mmx'. Try: 'prog -help' with llvm-2.9svn</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32835">Bug 32835</a> - [glsl] recursive #define results in infinite stack recursion</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33303">Bug 33303</a> - [glsl] ir_constant_expression.cpp:72: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == op[1]->type->base_type' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33314">Bug 33314</a> - [glsl] ir_constant_expression.cpp:122: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == GLSL_TYPE_BOOL' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33512">Bug 33512</a> - [SNB] case ogles2conform/GL/gl_FragCoord/gl_FragCoord_xy_frag.test and gl_FragCoord_w_frag.test fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34280">Bug 34280</a> - r200 mesa-7.10 font distortion</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34321">Bug 34321</a> - The ARB_fragment_program subset of ARB_draw_buffers not implemented</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=35603">Bug 35603</a> - GLSL compiler freezes compiling shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=36173">Bug 36173</a> - struct renderbuffer's 'format' field never set when using FBO</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=36238">Bug 36238</a> - Mesa release files don't contain scons control files</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=36410">Bug 36410</a> - [SNB] Rendering errors in 3DMMES subtest taiji</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=36527">Bug 36527</a> - [wine] Wolfenstein: Failed to translate rgb instruction.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=36651">Bug 36651</a> - mesa requires bison and flex to build but configure does not check for them</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=36738">Bug 36738</a> - Openarena crash with r300g, swrastg + llvm > 2.8</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=37648">Bug 37648</a> - Logic error in mesa/main/teximage.c:texsubimage</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=37739">Bug 37739</a> - Color clear of FBO without color buffer crashes</li>
|
||||
|
||||
<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>The full set of changes can be viewed by using the following GIT command:</p>
|
||||
|
||||
<pre>
|
||||
git log mesa-7.10.2..mesa-7.10.3
|
||||
</pre>
|
||||
|
||||
<p>Alan Hourihane (1):
|
||||
<ul>
|
||||
<li>Check for out of memory when creating fence</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Alex Buell (1):
|
||||
<ul>
|
||||
<li>configure: bump LIBDRM_REQUIRED to 2.4.24</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Alex Deucher (2):
|
||||
<ul>
|
||||
<li>r600c: add new pci ids</li>
|
||||
<li>r600g: add new pci ids</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Brian Paul (19):
|
||||
<ul>
|
||||
<li>docs: add link to 7.10.2 release notes</li>
|
||||
<li>scons: remove dangling reference to state_trackers/python/SConscript</li>
|
||||
<li>Makefile: add missing Scons files</li>
|
||||
<li>llvmpipe: document issue with LLVM 2.8 and earlier with AVX</li>
|
||||
<li>docs: replace llvmpipe/README with docs/llvmpipe.html</li>
|
||||
<li>glsl: add static qualifier to silence warning</li>
|
||||
<li>glsl: add cast to silence signed/unsigned comparison warning</li>
|
||||
<li>mesa: s/height/depth/ in texsubimage()</li>
|
||||
<li>mesa: fix void pointer arithmetic warnings</li>
|
||||
<li>mesa: add some missing GLAPIENTRY keywords</li>
|
||||
<li>mesa: check that flex/bison are installed</li>
|
||||
<li>st/mesa: fix incorrect texture level/face/slice accesses</li>
|
||||
<li>draw: fix edge flag handling in clipper (for unfilled tris/quads/polygons)</li>
|
||||
<li>vbo: check array indexes to prevent negative indexing</li>
|
||||
<li>vbo: remove node->count > 0 test in vbo_save_playback_vertex_list()</li>
|
||||
<li>st/mesa: fix software accum buffer format bug</li>
|
||||
<li>mesa: add include/c99/inttypes.h include/c99/stdbool.h include/c99/stdint.h files to tarballs</li>
|
||||
<li>docs: 7.10.3 release notes skeleton file, links</li>
|
||||
<li>mesa: bump version to 7.10.3</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Carl Worth (2):
|
||||
<ul>
|
||||
<li>glcpp: Simplify calling convention of parser's active_list functions</li>
|
||||
<li>glcpp: Fix attempts to expand recursive macros infinitely (bug #32835).</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dave Airlie (1):
|
||||
<ul>
|
||||
<li>st/mesa: fix compressed mipmap generation.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Eric Anholt (19):
|
||||
<ul>
|
||||
<li>i965: Fix the VS thread limits for GT1, and clarify the WM limits on both.</li>
|
||||
<li>glsl: Avoid cascading errors when looking for a scalar boolean and failing.</li>
|
||||
<li>glsl: Semantically check the RHS of `&&' even when short-circuiting.</li>
|
||||
<li>glsl: Semantically check the RHS of `||' even when short-circuiting.</li>
|
||||
<li>glsl: When we've emitted a semantic error for ==, return a bool constant.</li>
|
||||
<li>glsl: Perform type checking on "^^" operands.</li>
|
||||
<li>intel: Use _mesa_base_tex_format for FBO texture attachments.</li>
|
||||
<li>swrast: Don't assert against glReadPixels of GL_RED and GL_RG.</li>
|
||||
<li>mesa: Add a gl_renderbuffer.RowStride field like textures have.</li>
|
||||
<li>mesa: Add a function to set up the default renderbuffer accessors.</li>
|
||||
<li>intel: Use Mesa core's renderbuffer accessors for depth.</li>
|
||||
<li>mesa: Use _mesa_get_format_bytes to refactor out the RB get_pointer_*</li>
|
||||
<li>mesa: Use _mesa_get_format_bytes to refactor out the RB get_row_*</li>
|
||||
<li>mesa: Add renderbuffer accessors for R8/RG88/R16/RG1616.</li>
|
||||
<li>swrast: Don't try to adjust_colors for <8bpc when handling R16, RG1616.</li>
|
||||
<li>intel: Use mesa core's R8, RG88, R16, RG1616 RB accessors.</li>
|
||||
<li>Revert "intel: Add spans code for the ARB_texture_rg support."</li>
|
||||
<li>mesa: Add support for the ARB_fragment_program part of ARB_draw_buffers.</li>
|
||||
<li>mesa: Add support for OPTION ATI_draw_buffers to ARB_fp.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Hans de Goede (1):
|
||||
<ul>
|
||||
<li>texstore: fix regression stricter check for memcpy path for unorm88 and unorm1616</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Henri Verbeet (3):
|
||||
<ul>
|
||||
<li>mesa: Also update the color draw buffer if it's explicitly set to GL_NONE.</li>
|
||||
<li>glx: Destroy dri2Hash on DRI2 display destruction.</li>
|
||||
<li>glx: Only remove the glx_display from the list after it's destroyed.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Ian Romanick (9):
|
||||
<ul>
|
||||
<li>docs: Add 7.10.2 md5sums</li>
|
||||
<li>glsl: Fix off-by-one error setting max_array_access for non-constant indexing</li>
|
||||
<li>ir_to_mesa: Handle shadow compare w/projection and LOD bias correctly</li>
|
||||
<li>intel: Fix ROUND_DOWN_TO macro</li>
|
||||
<li>glsl: Regenerate compiler and glcpp files from cherry picks</li>
|
||||
<li>i965: Remove hint_gs_always and resulting dead code</li>
|
||||
<li>mesa: Don't try to clear a NULL renderbuffer</li>
|
||||
<li>mesa: Ignore blits to/from missing buffers</li>
|
||||
<li>docs: Add list of bugs fixed in 7.10.3 release</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Jeremy Huddleston (18):
|
||||
<ul>
|
||||
<li>apple: Update GL specs</li>
|
||||
<li>apple: Rename glcontextmodes.[ch] to glxconfig.[ch]</li>
|
||||
<li>apple: Rename __GLcontextModes to struct glx_config</li>
|
||||
<li>apple: Rename GLXcontext</li>
|
||||
<li>apple: Re-add driContext and do_destroy</li>
|
||||
<li>apple: Rename _gl_context_modes_find_visual to glx_config_find_visual</li>
|
||||
<li>apple: Rename GLXcontext</li>
|
||||
<li>apple: Change from XExtDisplayInfo to struct glx_display</li>
|
||||
<li>apple: ifdef out come glapi-foo on darwin</li>
|
||||
<li>glx: Dead code removal</li>
|
||||
<li>apple: Build darwin using applegl rather than indirect</li>
|
||||
<li>apple: Fix build failures in applegl_glx.c</li>
|
||||
<li>darwin: Define GALLIUM_DRIVERS_DIRS in darwin config</li>
|
||||
<li>apple: Package applegl source into MesaLib tarball</li>
|
||||
<li>darwin: Set VG_LIB_{NAME,GLOB} to fix make install</li>
|
||||
<li>darwin: Don't link against libGL when building libOSMesa</li>
|
||||
<li>darwin: Fix VG_LIB_GLOB to also match the unversioned symlink</li>
|
||||
<li>osmesa: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>José Fonseca (13):
|
||||
<ul>
|
||||
<li>llvmpipe: Update readme.</li>
|
||||
<li>mesa: GL_PROVOKING_VERTEX_EXT is a GLenum, not GLboolean.</li>
|
||||
<li>mesa: Fix GetVertexAttrib* inside display lists.</li>
|
||||
<li>draw: Fix draw_variant_output::format's type.</li>
|
||||
<li>gallivm: Tell LLVM to not assume a 16-byte aligned stack on x86.</li>
|
||||
<li>gallivm: Fix for dynamically linked LLVM 2.8 library.</li>
|
||||
<li>st/wgl: Adjust the pbuffer invisible window size.</li>
|
||||
<li>st/wgl: Fix debug output format specifiers of stw_framebuffer_get_size().</li>
|
||||
<li>st/wgl: Prevent spurious framebuffer sizes when the window is minimized.</li>
|
||||
<li>st/wgl: Cope with zero width/height windows.</li>
|
||||
<li>st/wgl: Allow to create pbuffers bigger than the desktop.</li>
|
||||
<li>st/wgl: Remove buggy assertion.</li>
|
||||
<li>wgl: Don't hold on to user supplied HDC.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kenneth Graunke (10):
|
||||
<ul>
|
||||
<li>i965/fs: Switch W and 1/W in Sandybridge interpolation setup.</li>
|
||||
<li>i965: Refactor Sandybridge implied move handling.</li>
|
||||
<li>i965: Resolve implied moves in brw_dp_READ_4_vs_relative.</li>
|
||||
<li>intel: Add IS_GT2 macro for recognizing Sandybridge GT2 systems.</li>
|
||||
<li>i965: Allocate the whole URB to the VS and fix calculations for Gen6.</li>
|
||||
<li>intel: Support glCopyTexImage() from ARGB8888 to XRGB8888.</li>
|
||||
<li>glsl: Fix memory error when creating the supported version string.</li>
|
||||
<li>glsl: Regenerate autogenerated file builtin_function.cpp.</li>
|
||||
<li>i965: Rename various gen6 #defines to match the documentation.</li>
|
||||
<li>i965: Never enable the GS on Gen6.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kostas Georgiou (1):
|
||||
<ul>
|
||||
<li>r600c/g: Add pci id for FirePro 2270</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Marek Olšák (18):
|
||||
<ul>
|
||||
<li>tgsi/ureg: bump the limit of immediates</li>
|
||||
<li>st/mesa: fix changing internal format via RenderbufferStorage</li>
|
||||
<li>st/mesa: GenerateMipmap should not be killed by conditional rendering</li>
|
||||
<li>swrast: BlitFramebuffer should not be killed by conditional rendering</li>
|
||||
<li>st/mesa: BlitFramebuffer should not be killed by conditional rendering</li>
|
||||
<li>st/mesa: CopyTex(Sub)Image should not be killed by conditional rendering</li>
|
||||
<li>st/mesa: conditional rendering should not kill texture decompression via blit</li>
|
||||
<li>mesa: forbid UseProgram to be called inside Begin/End</li>
|
||||
<li>mesa: UseShaderProgramEXT and Uniform* shouldn't be allowed inside Begin/End</li>
|
||||
<li>mesa: queries of non-existent FBO attachments should return INVALID_OPERATION</li>
|
||||
<li>r300g: fix draw_vbo splitting on r3xx-r4xx</li>
|
||||
<li>r300g: fix texturing with non-3D textures and wrap R mode set to sample border</li>
|
||||
<li>r300g: fix occlusion queries when depth test is disabled or zbuffer is missing</li>
|
||||
<li>r300g: clear can be killed by render condition</li>
|
||||
<li>st/mesa: remove asserts in st_texture_image_copy</li>
|
||||
<li>mesa: fix up assertion in _mesa_source_buffer_exists</li>
|
||||
<li>mesa: invalidate framebuffer if internal format of renderbuffer is changed</li>
|
||||
<li>mesa: return after invalidating renderbuffer</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Matt Turner (1):
|
||||
<ul>
|
||||
<li>r300/compiler: align memory allocations to 8-bytes</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Tom Stellard (3):
|
||||
<ul>
|
||||
<li>r300/compiler: Fix incorrect presubtract conversion</li>
|
||||
<li>r300/compiler: Fix dataflow analysis bug with ELSE blocks</li>
|
||||
<li>r300/compiler: Limit instructions to 3 source selects</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Vinson Lee (1):
|
||||
<ul>
|
||||
<li>gallivm: Disable MMX-disabling code on llvm-2.9.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Zou Nan hai (1):
|
||||
<ul>
|
||||
<li>i965: Align interleaved URB write length to 2</li>
|
||||
</ul></p>
|
||||
|
||||
<p>pepp (1):
|
||||
<ul>
|
||||
<li>st/mesa: assign renderbuffer's format field when allocating storage</li>
|
||||
</ul></p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -36,34 +36,12 @@ tbd
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>GL_ARB_ES2_compatibility (gallium drivers)
|
||||
<li>GL_ARB_color_buffer_float (gallium drivers, i965)
|
||||
<li>GL_ARB_draw_buffers_blend (gallium)
|
||||
<li>GL_ARB_draw_instanced extension (gallium drivers, swrast)
|
||||
<li>GL_ARB_instanced_arrays extension (gallium drivers)
|
||||
<li>GL_ARB_occlusion_query2 (gallium drivers, swrast)
|
||||
<li>GL_ARB_robustness (all drivers)
|
||||
<li>GL_ARB_sampler_objects (gallium drivers)
|
||||
<li>GL_ARB_seamless_cube_map (gallium r600)
|
||||
<li>GL_ARB_shader_texture_lod (gallium drivers, i965)
|
||||
<li>GL_ARB_sync (gallium drivers only, intel support was in 7.6)
|
||||
<li>GL_ARB_texture_compression_rgtc (gallium drivers, swrast, i965)
|
||||
<li>GL_ARB_texture_float (gallium, i965)
|
||||
<li>GL_EXT_packed_float (gallium r600)
|
||||
<li>GL_EXT_texture_compression_latc (gallium drivers, swrast)
|
||||
<li>GL_EXT_texture_compression_rgtc (gallium drivers, swrast, i965)
|
||||
<li>GL_EXT_texture_filter_anisotropic (swrast)
|
||||
<li>GL_EXT_texture_shared_exponent (gallium drivers, swrast)
|
||||
<li>GL_ARB_texture_compression_rgtc (gallium r600, swrast)
|
||||
<li>GL_ARB_draw_buffers_blend (gallium)
|
||||
<li>GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965)
|
||||
<li>GL_EXT_texture_snorm (gallium drivers)
|
||||
<li>GL_AMD_draw_buffers_blend (alias of the ARB variant)
|
||||
<li>GL_AMD_seamless_cubemap_per_texture (gallium r600)
|
||||
<li>GL_AMD_shader_stencil_export (alias of the ARB variant)
|
||||
<li>GL_ATI_draw_buffers (all drivers)
|
||||
<li>GL_ATI_texture_compression_3dc (gallium drivers, swrast)
|
||||
<li>GL_ATI_texture_float (gallium, i965)
|
||||
<li>GL_NV_conditional_render (i965)
|
||||
<li>GL_NV_texture_barrier (gallium drivers)
|
||||
<li>GL_ARB_sampler_objects (gallium drivers)
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -74,9 +52,8 @@ tbd
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>The Windows MSVC project files have been removed.
|
||||
They haven't been maintained in quite a while.
|
||||
Building with SCons is an alternative.
|
||||
<li>The Windows MSVC project files have been removed. They haven't been maintained
|
||||
in quite a while. Building with SCons is an alterantive.
|
||||
<li>Removed GL_SGI_texture_color_table support from swrast driver - the only
|
||||
driver that implemented it.
|
||||
</ul>
|
||||
|
@@ -14,7 +14,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.11.html">7.11 release notes</A>
|
||||
<LI><A HREF="relnotes-7.10.3.html">7.10.3 release notes</A>
|
||||
<LI><A HREF="relnotes-7.10.2.html">7.10.2 release notes</A>
|
||||
<LI><A HREF="relnotes-7.10.1.html">7.10.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.10.html">7.10 release notes</A>
|
||||
|
@@ -131,7 +131,6 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
|
||||
/* EGL_DRM_BUFFER_USE_MESA bits */
|
||||
#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001
|
||||
#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002
|
||||
#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
|
||||
|
||||
#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
|
||||
#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 /* eglCreateImageKHR attribute */
|
||||
@@ -152,9 +151,10 @@ struct wl_display;
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
|
||||
#else
|
||||
typedef EGLBoolean (EGLAPIENTRY PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
|
||||
typedef EGLBoolean (EGLAPIENTRY PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
|
||||
#endif
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
|
||||
|
@@ -80,16 +80,10 @@ typedef void *EGLNativePixmapType;
|
||||
|
||||
#elif defined(WL_EGL_PLATFORM)
|
||||
|
||||
typedef struct wl_display *EGLNativeDisplayType;
|
||||
typedef struct wl_egl_display *EGLNativeDisplayType;
|
||||
typedef struct wl_egl_pixmap *EGLNativePixmapType;
|
||||
typedef struct wl_egl_window *EGLNativeWindowType;
|
||||
|
||||
#elif defined(__GBM__)
|
||||
|
||||
typedef struct gbm_device *EGLNativeDisplayType;
|
||||
typedef struct gbm_bo *EGLNativePixmapType;
|
||||
typedef void *EGLNativeWindowType;
|
||||
|
||||
#elif defined(__unix__) || defined(__unix)
|
||||
|
||||
#ifdef MESA_EGL_NO_X11_HEADERS
|
||||
|
@@ -284,7 +284,7 @@ typedef GLUtesselator GLUtriangulatorObj;
|
||||
#define GLU_TESS_MAX_COORD 1.0e150
|
||||
|
||||
/* Internal convenience typedefs */
|
||||
typedef void (GLAPIENTRYP _GLUfuncptr)(void);
|
||||
typedef void (GLAPIENTRYP _GLUfuncptr)();
|
||||
|
||||
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
|
||||
|
@@ -692,7 +692,6 @@ struct __DRIswrastExtensionRec {
|
||||
#define __DRI_BUFFER_FAKE_FRONT_LEFT 7
|
||||
#define __DRI_BUFFER_FAKE_FRONT_RIGHT 8
|
||||
#define __DRI_BUFFER_DEPTH_STENCIL 9 /**< Only available with DRI2 1.1 */
|
||||
#define __DRI_BUFFER_HIZ 10
|
||||
|
||||
struct __DRIbufferRec {
|
||||
unsigned int attachment;
|
||||
@@ -817,7 +816,6 @@ struct __DRIdri2ExtensionRec {
|
||||
|
||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||
#define __DRI_IMAGE_USE_CURSOR 0x0004
|
||||
|
||||
/**
|
||||
* queryImage attributes
|
||||
@@ -849,11 +847,6 @@ struct __DRIimageExtensionRec {
|
||||
void *loaderPrivate);
|
||||
|
||||
GLboolean (*queryImage)(__DRIimage *image, int attrib, int *value);
|
||||
|
||||
/**
|
||||
* The new __DRIimage will share the content with the old one, see dup(2).
|
||||
*/
|
||||
__DRIimage *(*dupImage)(__DRIimage *image, void *loaderPrivate);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -1,4 +0,0 @@
|
||||
CHIPSET(0x7121, I810, i8xx)
|
||||
CHIPSET(0x7123, I810_DC100, i8xx)
|
||||
CHIPSET(0x7125, I810_E, i8xx)
|
||||
CHIPSET(0x1132, I815, i8xx)
|
@@ -1,15 +0,0 @@
|
||||
CHIPSET(0x3577, I830_M, i8xx)
|
||||
CHIPSET(0x2562, 845_G, i8xx)
|
||||
CHIPSET(0x3582, I855_GM, i8xx)
|
||||
CHIPSET(0x2572, I865_G, i8xx)
|
||||
CHIPSET(0x2582, I915_G, i915)
|
||||
CHIPSET(0x258A, E7221_G, i915)
|
||||
CHIPSET(0x2592, I915_GM, i915)
|
||||
CHIPSET(0x2772, I945_G, i945)
|
||||
CHIPSET(0x27A2, I945_GM, i945)
|
||||
CHIPSET(0x27AE, I945_GME, i945)
|
||||
CHIPSET(0x29B2, Q35_G, i945)
|
||||
CHIPSET(0x29C2, G33_G, i945)
|
||||
CHIPSET(0x29D2, Q33_G, i945)
|
||||
CHIPSET(0xA011, IGD_GM, i945)
|
||||
CHIPSET(0xA001, IGD_G, i945)
|
@@ -1,27 +0,0 @@
|
||||
CHIPSET(0x29A2, I965_G, i965)
|
||||
CHIPSET(0x2992, I965_Q, i965)
|
||||
CHIPSET(0x2982, I965_G_1, i965)
|
||||
CHIPSET(0x2972, I946_GZ, i965)
|
||||
CHIPSET(0x2A02, I965_GM, i965)
|
||||
CHIPSET(0x2A12, I965_GME, i965)
|
||||
CHIPSET(0x2A42, GM45_GM, g4x)
|
||||
CHIPSET(0x2E02, IGD_E_G, g4x)
|
||||
CHIPSET(0x2E12, Q45_G, g4x)
|
||||
CHIPSET(0x2E22, G45_G, g4x)
|
||||
CHIPSET(0x2E32, G41_G, g4x)
|
||||
CHIPSET(0x2E42, B43_G, g4x)
|
||||
CHIPSET(0x2E92, B43_G1, g4x)
|
||||
CHIPSET(0x0042, ILD_G, ilk)
|
||||
CHIPSET(0x0046, ILM_G, ilk)
|
||||
CHIPSET(0x0102, SANDYBRIDGE_GT1, snb_gt1)
|
||||
CHIPSET(0x0112, SANDYBRIDGE_GT2, snb_gt2)
|
||||
CHIPSET(0x0122, SANDYBRIDGE_GT2_PLUS, snb_gt2)
|
||||
CHIPSET(0x0106, SANDYBRIDGE_M_GT1, snb_gt1)
|
||||
CHIPSET(0x0116, SANDYBRIDGE_M_GT2, snb_gt2)
|
||||
CHIPSET(0x0126, SANDYBRIDGE_M_GT2_PLUS, snb_gt2)
|
||||
CHIPSET(0x010A, SANDYBRIDGE_S, snb_gt1)
|
||||
CHIPSET(0x0152, IVYBRIDGE_GT1, ivb_gt1)
|
||||
CHIPSET(0x0162, IVYBRIDGE_GT2, ivb_gt2)
|
||||
CHIPSET(0x0156, IVYBRIDGE_M_GT1, ivb_gt1)
|
||||
CHIPSET(0x0166, IVYBRIDGE_M_GT2, ivb_gt2)
|
||||
CHIPSET(0x015a, IVYBRIDGE_S_GT1, ivb_gt1)
|
@@ -1,77 +0,0 @@
|
||||
#ifndef _PCI_ID_DRIVER_MAP_H_
|
||||
#define _PCI_ID_DRIVER_MAP_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#endif
|
||||
|
||||
#if !defined(DRIVER_MAP_DRI2_ONLY) && !defined(DRIVER_MAP_GALLIUM_ONLY)
|
||||
static const int i810_chip_ids[] = {
|
||||
#define CHIPSET(chip, desc, misc) chip,
|
||||
#include "pci_ids/i810_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
#endif
|
||||
|
||||
static const int i915_chip_ids[] = {
|
||||
#define CHIPSET(chip, desc, misc) chip,
|
||||
#include "pci_ids/i915_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const int i965_chip_ids[] = {
|
||||
#define CHIPSET(chip, desc, misc) chip,
|
||||
#include "pci_ids/i965_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
#ifndef DRIVER_MAP_GALLIUM_ONLY
|
||||
static const int r100_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/radeon_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const int r200_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/r200_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
#endif
|
||||
|
||||
static const int r300_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/r300_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const int r600_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/r600_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const struct {
|
||||
int vendor_id;
|
||||
const char *driver;
|
||||
const int *chip_ids;
|
||||
int num_chips_ids;
|
||||
} driver_map[] = {
|
||||
#if !defined(DRIVER_MAP_DRI2_ONLY) && !defined(DRIVER_MAP_GALLIUM_ONLY)
|
||||
{ 0x8086, "i810", i810_chip_ids, ARRAY_SIZE(i810_chip_ids) },
|
||||
#endif
|
||||
{ 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
|
||||
{ 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
|
||||
#ifndef DRIVER_MAP_GALLIUM_ONLY
|
||||
{ 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
|
||||
{ 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
|
||||
#endif
|
||||
{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
|
||||
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
|
||||
{ 0x10de, "nouveau", NULL, -1 },
|
||||
{ 0x0000, NULL, NULL, 0 },
|
||||
};
|
||||
|
||||
#endif /* _PCI_ID_DRIVER_MAP_H_ */
|
@@ -1,22 +0,0 @@
|
||||
CHIPSET(0x5148, R200_QH, R200)
|
||||
CHIPSET(0x514C, R200_QL, R200)
|
||||
CHIPSET(0x514D, R200_QM, R200)
|
||||
CHIPSET(0x4242, R200_BB, R200)
|
||||
|
||||
CHIPSET(0x4966, RV250_If, RV250)
|
||||
CHIPSET(0x4967, RV250_Ig, RV250)
|
||||
CHIPSET(0x4C64, RV250_Ld, RV250)
|
||||
CHIPSET(0x4C66, RV250_Lf, RV250)
|
||||
CHIPSET(0x4C67, RV250_Lg, RV250)
|
||||
|
||||
CHIPSET(0x5960, RV280_5960, RV280)
|
||||
CHIPSET(0x5961, RV280_5961, RV280)
|
||||
CHIPSET(0x5962, RV280_5962, RV280)
|
||||
CHIPSET(0x5964, RV280_5964, RV280)
|
||||
CHIPSET(0x5965, RV280_5965, RV280)
|
||||
CHIPSET(0x5C61, RV280_5C61, RV280)
|
||||
CHIPSET(0x5C63, RV280_5C63, RV280)
|
||||
CHIPSET(0x5834, RS300_5834, RS300)
|
||||
CHIPSET(0x5835, RS300_5835, RS300)
|
||||
CHIPSET(0x7834, RS350_7834, RS300)
|
||||
CHIPSET(0x7835, RS350_7835, RS300)
|
@@ -1,226 +0,0 @@
|
||||
CHIPSET(0x4144, R300_AD, R300)
|
||||
CHIPSET(0x4145, R300_AE, R300)
|
||||
CHIPSET(0x4146, R300_AF, R300)
|
||||
CHIPSET(0x4147, R300_AG, R300)
|
||||
CHIPSET(0x4E44, R300_ND, R300)
|
||||
CHIPSET(0x4E45, R300_NE, R300)
|
||||
CHIPSET(0x4E46, R300_NF, R300)
|
||||
CHIPSET(0x4E47, R300_NG, R300)
|
||||
|
||||
CHIPSET(0x4E48, R350_NH, R350)
|
||||
CHIPSET(0x4E49, R350_NI, R350)
|
||||
CHIPSET(0x4E4B, R350_NK, R350)
|
||||
CHIPSET(0x4148, R350_AH, R350)
|
||||
CHIPSET(0x4149, R350_AI, R350)
|
||||
CHIPSET(0x414A, R350_AJ, R350)
|
||||
CHIPSET(0x414B, R350_AK, R350)
|
||||
CHIPSET(0x4E4A, R360_NJ, R350)
|
||||
|
||||
CHIPSET(0x4150, RV350_AP, RV350)
|
||||
CHIPSET(0x4151, RV350_AQ, RV350)
|
||||
CHIPSET(0x4152, RV350_AR, RV350)
|
||||
CHIPSET(0x4153, RV350_AS, RV350)
|
||||
CHIPSET(0x4154, RV350_AT, RV350)
|
||||
CHIPSET(0x4155, RV350_AU, RV350)
|
||||
CHIPSET(0x4156, RV350_AV, RV350)
|
||||
CHIPSET(0x4E50, RV350_NP, RV350)
|
||||
CHIPSET(0x4E51, RV350_NQ, RV350)
|
||||
CHIPSET(0x4E52, RV350_NR, RV350)
|
||||
CHIPSET(0x4E53, RV350_NS, RV350)
|
||||
CHIPSET(0x4E54, RV350_NT, RV350)
|
||||
CHIPSET(0x4E56, RV350_NV, RV350)
|
||||
|
||||
CHIPSET(0x5460, RV370_5460, RV370)
|
||||
CHIPSET(0x5462, RV370_5462, RV370)
|
||||
CHIPSET(0x5464, RV370_5464, RV370)
|
||||
CHIPSET(0x5B60, RV370_5B60, RV370)
|
||||
CHIPSET(0x5B62, RV370_5B62, RV370)
|
||||
CHIPSET(0x5B63, RV370_5B63, RV370)
|
||||
CHIPSET(0x5B64, RV370_5B64, RV370)
|
||||
CHIPSET(0x5B65, RV370_5B65, RV370)
|
||||
|
||||
CHIPSET(0x3150, RV380_3150, RV380)
|
||||
CHIPSET(0x3152, RV380_3152, RV380)
|
||||
CHIPSET(0x3154, RV380_3154, RV380)
|
||||
CHIPSET(0x3155, RV380_3155, RV380)
|
||||
CHIPSET(0x3E50, RV380_3E50, RV380)
|
||||
CHIPSET(0x3E54, RV380_3E54, RV380)
|
||||
|
||||
CHIPSET(0x4A48, R420_JH, R420)
|
||||
CHIPSET(0x4A49, R420_JI, R420)
|
||||
CHIPSET(0x4A4A, R420_JJ, R420)
|
||||
CHIPSET(0x4A4B, R420_JK, R420)
|
||||
CHIPSET(0x4A4C, R420_JL, R420)
|
||||
CHIPSET(0x4A4D, R420_JM, R420)
|
||||
CHIPSET(0x4A4E, R420_JN, R420)
|
||||
CHIPSET(0x4A4F, R420_JO, R420)
|
||||
CHIPSET(0x4A50, R420_JP, R420)
|
||||
CHIPSET(0x4A54, R420_JT, R420)
|
||||
|
||||
CHIPSET(0x5548, R423_UH, R423)
|
||||
CHIPSET(0x5549, R423_UI, R423)
|
||||
CHIPSET(0x554A, R423_UJ, R423)
|
||||
CHIPSET(0x554B, R423_UK, R423)
|
||||
CHIPSET(0x5550, R423_5550, R423)
|
||||
CHIPSET(0x5551, R423_UQ, R423)
|
||||
CHIPSET(0x5552, R423_UR, R423)
|
||||
CHIPSET(0x5554, R423_UT, R423)
|
||||
CHIPSET(0x5D57, R423_5D57, R423)
|
||||
|
||||
CHIPSET(0x554C, R430_554C, R430)
|
||||
CHIPSET(0x554D, R430_554D, R430)
|
||||
CHIPSET(0x554E, R430_554E, R430)
|
||||
CHIPSET(0x554F, R430_554F, R430)
|
||||
CHIPSET(0x5D48, R430_5D48, R430)
|
||||
CHIPSET(0x5D49, R430_5D49, R430)
|
||||
CHIPSET(0x5D4A, R430_5D4A, R430)
|
||||
|
||||
CHIPSET(0x5D4C, R480_5D4C, R480)
|
||||
CHIPSET(0x5D4D, R480_5D4D, R480)
|
||||
CHIPSET(0x5D4E, R480_5D4E, R480)
|
||||
CHIPSET(0x5D4F, R480_5D4F, R480)
|
||||
CHIPSET(0x5D50, R480_5D50, R480)
|
||||
CHIPSET(0x5D52, R480_5D52, R480)
|
||||
|
||||
CHIPSET(0x4B48, R481_4B48, R481)
|
||||
CHIPSET(0x4B49, R481_4B49, R481)
|
||||
CHIPSET(0x4B4A, R481_4B4A, R481)
|
||||
CHIPSET(0x4B4B, R481_4B4B, R481)
|
||||
CHIPSET(0x4B4C, R481_4B4C, R481)
|
||||
|
||||
CHIPSET(0x564A, RV410_564A, RV410)
|
||||
CHIPSET(0x564B, RV410_564B, RV410)
|
||||
CHIPSET(0x564F, RV410_564F, RV410)
|
||||
CHIPSET(0x5652, RV410_5652, RV410)
|
||||
CHIPSET(0x5653, RV410_5653, RV410)
|
||||
CHIPSET(0x5657, RV410_5657, RV410)
|
||||
CHIPSET(0x5E48, RV410_5E48, RV410)
|
||||
CHIPSET(0x5E4A, RV410_5E4A, RV410)
|
||||
CHIPSET(0x5E4B, RV410_5E4B, RV410)
|
||||
CHIPSET(0x5E4C, RV410_5E4C, RV410)
|
||||
CHIPSET(0x5E4D, RV410_5E4D, RV410)
|
||||
CHIPSET(0x5E4F, RV410_5E4F, RV410)
|
||||
|
||||
CHIPSET(0x5A41, RS400_5A41, RS400)
|
||||
CHIPSET(0x5A42, RS400_5A42, RS400)
|
||||
|
||||
CHIPSET(0x5A61, RC410_5A61, RC410)
|
||||
CHIPSET(0x5A62, RC410_5A62, RC410)
|
||||
|
||||
CHIPSET(0x5954, RS480_5954, RS480)
|
||||
CHIPSET(0x5955, RS480_5955, RS480)
|
||||
CHIPSET(0x5974, RS482_5974, RS480)
|
||||
CHIPSET(0x5975, RS482_5975, RS480)
|
||||
|
||||
CHIPSET(0x7100, R520_7100, R520)
|
||||
CHIPSET(0x7101, R520_7101, R520)
|
||||
CHIPSET(0x7102, R520_7102, R520)
|
||||
CHIPSET(0x7103, R520_7103, R520)
|
||||
CHIPSET(0x7104, R520_7104, R520)
|
||||
CHIPSET(0x7105, R520_7105, R520)
|
||||
CHIPSET(0x7106, R520_7106, R520)
|
||||
CHIPSET(0x7108, R520_7108, R520)
|
||||
CHIPSET(0x7109, R520_7109, R520)
|
||||
CHIPSET(0x710A, R520_710A, R520)
|
||||
CHIPSET(0x710B, R520_710B, R520)
|
||||
CHIPSET(0x710C, R520_710C, R520)
|
||||
CHIPSET(0x710E, R520_710E, R520)
|
||||
CHIPSET(0x710F, R520_710F, R520)
|
||||
|
||||
CHIPSET(0x7140, RV515_7140, RV515)
|
||||
CHIPSET(0x7141, RV515_7141, RV515)
|
||||
CHIPSET(0x7142, RV515_7142, RV515)
|
||||
CHIPSET(0x7143, RV515_7143, RV515)
|
||||
CHIPSET(0x7144, RV515_7144, RV515)
|
||||
CHIPSET(0x7145, RV515_7145, RV515)
|
||||
CHIPSET(0x7146, RV515_7146, RV515)
|
||||
CHIPSET(0x7147, RV515_7147, RV515)
|
||||
CHIPSET(0x7149, RV515_7149, RV515)
|
||||
CHIPSET(0x714A, RV515_714A, RV515)
|
||||
CHIPSET(0x714B, RV515_714B, RV515)
|
||||
CHIPSET(0x714C, RV515_714C, RV515)
|
||||
CHIPSET(0x714D, RV515_714D, RV515)
|
||||
CHIPSET(0x714E, RV515_714E, RV515)
|
||||
CHIPSET(0x714F, RV515_714F, RV515)
|
||||
CHIPSET(0x7151, RV515_7151, RV515)
|
||||
CHIPSET(0x7152, RV515_7152, RV515)
|
||||
CHIPSET(0x7153, RV515_7153, RV515)
|
||||
CHIPSET(0x715E, RV515_715E, RV515)
|
||||
CHIPSET(0x715F, RV515_715F, RV515)
|
||||
CHIPSET(0x7180, RV515_7180, RV515)
|
||||
CHIPSET(0x7181, RV515_7181, RV515)
|
||||
CHIPSET(0x7183, RV515_7183, RV515)
|
||||
CHIPSET(0x7186, RV515_7186, RV515)
|
||||
CHIPSET(0x7187, RV515_7187, RV515)
|
||||
CHIPSET(0x7188, RV515_7188, RV515)
|
||||
CHIPSET(0x718A, RV515_718A, RV515)
|
||||
CHIPSET(0x718B, RV515_718B, RV515)
|
||||
CHIPSET(0x718C, RV515_718C, RV515)
|
||||
CHIPSET(0x718D, RV515_718D, RV515)
|
||||
CHIPSET(0x718F, RV515_718F, RV515)
|
||||
CHIPSET(0x7193, RV515_7193, RV515)
|
||||
CHIPSET(0x7196, RV515_7196, RV515)
|
||||
CHIPSET(0x719B, RV515_719B, RV515)
|
||||
CHIPSET(0x719F, RV515_719F, RV515)
|
||||
CHIPSET(0x7200, RV515_7200, RV515)
|
||||
CHIPSET(0x7210, RV515_7210, RV515)
|
||||
CHIPSET(0x7211, RV515_7211, RV515)
|
||||
|
||||
CHIPSET(0x71C0, RV530_71C0, RV530)
|
||||
CHIPSET(0x71C1, RV530_71C1, RV530)
|
||||
CHIPSET(0x71C2, RV530_71C2, RV530)
|
||||
CHIPSET(0x71C3, RV530_71C3, RV530)
|
||||
CHIPSET(0x71C4, RV530_71C4, RV530)
|
||||
CHIPSET(0x71C5, RV530_71C5, RV530)
|
||||
CHIPSET(0x71C6, RV530_71C6, RV530)
|
||||
CHIPSET(0x71C7, RV530_71C7, RV530)
|
||||
CHIPSET(0x71CD, RV530_71CD, RV530)
|
||||
CHIPSET(0x71CE, RV530_71CE, RV530)
|
||||
CHIPSET(0x71D2, RV530_71D2, RV530)
|
||||
CHIPSET(0x71D4, RV530_71D4, RV530)
|
||||
CHIPSET(0x71D5, RV530_71D5, RV530)
|
||||
CHIPSET(0x71D6, RV530_71D6, RV530)
|
||||
CHIPSET(0x71DA, RV530_71DA, RV530)
|
||||
CHIPSET(0x71DE, RV530_71DE, RV530)
|
||||
|
||||
CHIPSET(0x7281, RV560_7281, RV560)
|
||||
CHIPSET(0x7283, RV560_7283, RV560)
|
||||
CHIPSET(0x7287, RV560_7287, RV560)
|
||||
CHIPSET(0x7290, RV560_7290, RV560)
|
||||
CHIPSET(0x7291, RV560_7291, RV560)
|
||||
CHIPSET(0x7293, RV560_7293, RV560)
|
||||
CHIPSET(0x7297, RV560_7297, RV560)
|
||||
|
||||
CHIPSET(0x7280, RV570_7280, RV570)
|
||||
CHIPSET(0x7288, RV570_7288, RV570)
|
||||
CHIPSET(0x7289, RV570_7289, RV570)
|
||||
CHIPSET(0x728B, RV570_728B, RV570)
|
||||
CHIPSET(0x728C, RV570_728C, RV570)
|
||||
|
||||
CHIPSET(0x7240, R580_7240, R580)
|
||||
CHIPSET(0x7243, R580_7243, R580)
|
||||
CHIPSET(0x7244, R580_7244, R580)
|
||||
CHIPSET(0x7245, R580_7245, R580)
|
||||
CHIPSET(0x7246, R580_7246, R580)
|
||||
CHIPSET(0x7247, R580_7247, R580)
|
||||
CHIPSET(0x7248, R580_7248, R580)
|
||||
CHIPSET(0x7249, R580_7249, R580)
|
||||
CHIPSET(0x724A, R580_724A, R580)
|
||||
CHIPSET(0x724B, R580_724B, R580)
|
||||
CHIPSET(0x724C, R580_724C, R580)
|
||||
CHIPSET(0x724D, R580_724D, R580)
|
||||
CHIPSET(0x724E, R580_724E, R580)
|
||||
CHIPSET(0x724F, R580_724F, R580)
|
||||
CHIPSET(0x7284, R580_7284, R580)
|
||||
|
||||
CHIPSET(0x793F, RS600_793F, RS600)
|
||||
CHIPSET(0x7941, RS600_7941, RS600)
|
||||
CHIPSET(0x7942, RS600_7942, RS600)
|
||||
|
||||
CHIPSET(0x791E, RS690_791E, RS690)
|
||||
CHIPSET(0x791F, RS690_791F, RS690)
|
||||
|
||||
CHIPSET(0x796C, RS740_796C, RS740)
|
||||
CHIPSET(0x796D, RS740_796D, RS740)
|
||||
CHIPSET(0x796E, RS740_796E, RS740)
|
||||
CHIPSET(0x796F, RS740_796F, RS740)
|
@@ -1,263 +0,0 @@
|
||||
CHIPSET(0x9400, R600_9400, R600)
|
||||
CHIPSET(0x9401, R600_9401, R600)
|
||||
CHIPSET(0x9402, R600_9402, R600)
|
||||
CHIPSET(0x9403, R600_9403, R600)
|
||||
CHIPSET(0x9405, R600_9405, R600)
|
||||
CHIPSET(0x940A, R600_940A, R600)
|
||||
CHIPSET(0x940B, R600_940B, R600)
|
||||
CHIPSET(0x940F, R600_940F, R600)
|
||||
|
||||
CHIPSET(0x94C0, RV610_94C0, RV610)
|
||||
CHIPSET(0x94C1, RV610_94C1, RV610)
|
||||
CHIPSET(0x94C3, RV610_94C3, RV610)
|
||||
CHIPSET(0x94C4, RV610_94C4, RV610)
|
||||
CHIPSET(0x94C5, RV610_94C5, RV610)
|
||||
CHIPSET(0x94C6, RV610_94C6, RV610)
|
||||
CHIPSET(0x94C7, RV610_94C7, RV610)
|
||||
CHIPSET(0x94C8, RV610_94C8, RV610)
|
||||
CHIPSET(0x94C9, RV610_94C9, RV610)
|
||||
CHIPSET(0x94CB, RV610_94CB, RV610)
|
||||
CHIPSET(0x94CC, RV610_94CC, RV610)
|
||||
CHIPSET(0x94CD, RV610_94CD, RV610)
|
||||
|
||||
CHIPSET(0x9580, RV630_9580, RV630)
|
||||
CHIPSET(0x9581, RV630_9581, RV630)
|
||||
CHIPSET(0x9583, RV630_9583, RV630)
|
||||
CHIPSET(0x9586, RV630_9586, RV630)
|
||||
CHIPSET(0x9587, RV630_9587, RV630)
|
||||
CHIPSET(0x9588, RV630_9588, RV630)
|
||||
CHIPSET(0x9589, RV630_9589, RV630)
|
||||
CHIPSET(0x958A, RV630_958A, RV630)
|
||||
CHIPSET(0x958B, RV630_958B, RV630)
|
||||
CHIPSET(0x958C, RV630_958C, RV630)
|
||||
CHIPSET(0x958D, RV630_958D, RV630)
|
||||
CHIPSET(0x958E, RV630_958E, RV630)
|
||||
CHIPSET(0x958F, RV630_958F, RV630)
|
||||
|
||||
CHIPSET(0x9500, RV670_9500, RV670)
|
||||
CHIPSET(0x9501, RV670_9501, RV670)
|
||||
CHIPSET(0x9504, RV670_9504, RV670)
|
||||
CHIPSET(0x9505, RV670_9505, RV670)
|
||||
CHIPSET(0x9506, RV670_9506, RV670)
|
||||
CHIPSET(0x9507, RV670_9507, RV670)
|
||||
CHIPSET(0x9508, RV670_9508, RV670)
|
||||
CHIPSET(0x9509, RV670_9509, RV670)
|
||||
CHIPSET(0x950F, RV670_950F, RV670)
|
||||
CHIPSET(0x9511, RV670_9511, RV670)
|
||||
CHIPSET(0x9515, RV670_9515, RV670)
|
||||
CHIPSET(0x9517, RV670_9517, RV670)
|
||||
CHIPSET(0x9519, RV670_9519, RV670)
|
||||
|
||||
CHIPSET(0x95C0, RV620_95C0, RV620)
|
||||
CHIPSET(0x95C2, RV620_95C2, RV620)
|
||||
CHIPSET(0x95C4, RV620_95C4, RV620)
|
||||
CHIPSET(0x95C5, RV620_95C5, RV620)
|
||||
CHIPSET(0x95C6, RV620_95C6, RV620)
|
||||
CHIPSET(0x95C7, RV620_95C7, RV620)
|
||||
CHIPSET(0x95C9, RV620_95C9, RV620)
|
||||
CHIPSET(0x95CC, RV620_95CC, RV620)
|
||||
CHIPSET(0x95CD, RV620_95CD, RV620)
|
||||
CHIPSET(0x95CE, RV620_95CE, RV620)
|
||||
CHIPSET(0x95CF, RV620_95CF, RV620)
|
||||
|
||||
CHIPSET(0x9590, RV635_9590, RV635)
|
||||
CHIPSET(0x9591, RV635_9591, RV635)
|
||||
CHIPSET(0x9593, RV635_9593, RV635)
|
||||
CHIPSET(0x9595, RV635_9595, RV635)
|
||||
CHIPSET(0x9596, RV635_9596, RV635)
|
||||
CHIPSET(0x9597, RV635_9597, RV635)
|
||||
CHIPSET(0x9598, RV635_9598, RV635)
|
||||
CHIPSET(0x9599, RV635_9599, RV635)
|
||||
CHIPSET(0x959B, RV635_959B, RV635)
|
||||
|
||||
CHIPSET(0x9610, RS780_9610, RS780)
|
||||
CHIPSET(0x9611, RS780_9611, RS780)
|
||||
CHIPSET(0x9612, RS780_9612, RS780)
|
||||
CHIPSET(0x9613, RS780_9613, RS780)
|
||||
CHIPSET(0x9614, RS780_9614, RS780)
|
||||
CHIPSET(0x9615, RS780_9615, RS780)
|
||||
CHIPSET(0x9616, RS780_9616, RS780)
|
||||
|
||||
CHIPSET(0x9710, RS880_9710, RS880)
|
||||
CHIPSET(0x9711, RS880_9711, RS880)
|
||||
CHIPSET(0x9712, RS880_9712, RS880)
|
||||
CHIPSET(0x9713, RS880_9713, RS880)
|
||||
CHIPSET(0x9714, RS880_9714, RS880)
|
||||
CHIPSET(0x9715, RS880_9715, RS880)
|
||||
|
||||
CHIPSET(0x9440, RV770_9440, RV770)
|
||||
CHIPSET(0x9441, RV770_9441, RV770)
|
||||
CHIPSET(0x9442, RV770_9442, RV770)
|
||||
CHIPSET(0x9443, RV770_9443, RV770)
|
||||
CHIPSET(0x9444, RV770_9444, RV770)
|
||||
CHIPSET(0x9446, RV770_9446, RV770)
|
||||
CHIPSET(0x944A, RV770_944A, RV770)
|
||||
CHIPSET(0x944B, RV770_944B, RV770)
|
||||
CHIPSET(0x944C, RV770_944C, RV770)
|
||||
CHIPSET(0x944E, RV770_944E, RV770)
|
||||
CHIPSET(0x9450, RV770_9450, RV770)
|
||||
CHIPSET(0x9452, RV770_9452, RV770)
|
||||
CHIPSET(0x9456, RV770_9456, RV770)
|
||||
CHIPSET(0x945A, RV770_945A, RV770)
|
||||
CHIPSET(0x945B, RV770_945B, RV770)
|
||||
CHIPSET(0x945E, RV770_945E, RV770)
|
||||
CHIPSET(0x9460, RV790_9460, RV770)
|
||||
CHIPSET(0x9462, RV790_9462, RV770)
|
||||
CHIPSET(0x946A, RV770_946A, RV770)
|
||||
CHIPSET(0x946B, RV770_946B, RV770)
|
||||
CHIPSET(0x947A, RV770_947A, RV770)
|
||||
CHIPSET(0x947B, RV770_947B, RV770)
|
||||
|
||||
CHIPSET(0x9480, RV730_9480, RV730)
|
||||
CHIPSET(0x9487, RV730_9487, RV730)
|
||||
CHIPSET(0x9488, RV730_9488, RV730)
|
||||
CHIPSET(0x9489, RV730_9489, RV730)
|
||||
CHIPSET(0x948A, RV730_948A, RV730)
|
||||
CHIPSET(0x948F, RV730_948F, RV730)
|
||||
CHIPSET(0x9490, RV730_9490, RV730)
|
||||
CHIPSET(0x9491, RV730_9491, RV730)
|
||||
CHIPSET(0x9495, RV730_9495, RV730)
|
||||
CHIPSET(0x9498, RV730_9498, RV730)
|
||||
CHIPSET(0x949C, RV730_949C, RV730)
|
||||
CHIPSET(0x949E, RV730_949E, RV730)
|
||||
CHIPSET(0x949F, RV730_949F, RV730)
|
||||
|
||||
CHIPSET(0x9540, RV710_9540, RV710)
|
||||
CHIPSET(0x9541, RV710_9541, RV710)
|
||||
CHIPSET(0x9542, RV710_9542, RV710)
|
||||
CHIPSET(0x954E, RV710_954E, RV710)
|
||||
CHIPSET(0x954F, RV710_954F, RV710)
|
||||
CHIPSET(0x9552, RV710_9552, RV710)
|
||||
CHIPSET(0x9553, RV710_9553, RV710)
|
||||
CHIPSET(0x9555, RV710_9555, RV710)
|
||||
CHIPSET(0x9557, RV710_9557, RV710)
|
||||
CHIPSET(0x955F, RV710_955F, RV710)
|
||||
|
||||
CHIPSET(0x94A0, RV740_94A0, RV740)
|
||||
CHIPSET(0x94A1, RV740_94A1, RV740)
|
||||
CHIPSET(0x94A3, RV740_94A3, RV740)
|
||||
CHIPSET(0x94B1, RV740_94B1, RV740)
|
||||
CHIPSET(0x94B3, RV740_94B3, RV740)
|
||||
CHIPSET(0x94B4, RV740_94B4, RV740)
|
||||
CHIPSET(0x94B5, RV740_94B5, RV740)
|
||||
CHIPSET(0x94B9, RV740_94B9, RV740)
|
||||
|
||||
CHIPSET(0x68E0, CEDAR_68E0, CEDAR)
|
||||
CHIPSET(0x68E1, CEDAR_68E1, CEDAR)
|
||||
CHIPSET(0x68E4, CEDAR_68E4, CEDAR)
|
||||
CHIPSET(0x68E5, CEDAR_68E5, CEDAR)
|
||||
CHIPSET(0x68E8, CEDAR_68E8, CEDAR)
|
||||
CHIPSET(0x68E9, CEDAR_68E9, CEDAR)
|
||||
CHIPSET(0x68F1, CEDAR_68F1, CEDAR)
|
||||
CHIPSET(0x68F2, CEDAR_68F2, CEDAR)
|
||||
CHIPSET(0x68F8, CEDAR_68F8, CEDAR)
|
||||
CHIPSET(0x68F9, CEDAR_68F9, CEDAR)
|
||||
CHIPSET(0x68FE, CEDAR_68FE, CEDAR)
|
||||
|
||||
CHIPSET(0x68C0, REDWOOD_68C0, REDWOOD)
|
||||
CHIPSET(0x68C1, REDWOOD_68C1, REDWOOD)
|
||||
CHIPSET(0x68C8, REDWOOD_68C8, REDWOOD)
|
||||
CHIPSET(0x68C9, REDWOOD_68C9, REDWOOD)
|
||||
CHIPSET(0x68D8, REDWOOD_68D8, REDWOOD)
|
||||
CHIPSET(0x68D9, REDWOOD_68D9, REDWOOD)
|
||||
CHIPSET(0x68DA, REDWOOD_68DA, REDWOOD)
|
||||
CHIPSET(0x68DE, REDWOOD_68DE, REDWOOD)
|
||||
|
||||
CHIPSET(0x68A0, JUNIPER_68A0, JUNIPER)
|
||||
CHIPSET(0x68A1, JUNIPER_68A1, JUNIPER)
|
||||
CHIPSET(0x68A8, JUNIPER_68A8, JUNIPER)
|
||||
CHIPSET(0x68A9, JUNIPER_68A9, JUNIPER)
|
||||
CHIPSET(0x68B0, JUNIPER_68B0, JUNIPER)
|
||||
CHIPSET(0x68B8, JUNIPER_68B8, JUNIPER)
|
||||
CHIPSET(0x68B9, JUNIPER_68B9, JUNIPER)
|
||||
CHIPSET(0x68BA, JUNIPER_68BA, JUNIPER)
|
||||
CHIPSET(0x68BE, JUNIPER_68BE, JUNIPER)
|
||||
CHIPSET(0x68BF, JUNIPER_68BF, JUNIPER)
|
||||
|
||||
CHIPSET(0x6880, CYPRESS_6880, CYPRESS)
|
||||
CHIPSET(0x6888, CYPRESS_6888, CYPRESS)
|
||||
CHIPSET(0x6889, CYPRESS_6889, CYPRESS)
|
||||
CHIPSET(0x688A, CYPRESS_688A, CYPRESS)
|
||||
CHIPSET(0x6898, CYPRESS_6898, CYPRESS)
|
||||
CHIPSET(0x6899, CYPRESS_6899, CYPRESS)
|
||||
CHIPSET(0x689B, CYPRESS_689B, CYPRESS)
|
||||
CHIPSET(0x689E, CYPRESS_689E, CYPRESS)
|
||||
|
||||
CHIPSET(0x689C, HEMLOCK_689C, HEMLOCK)
|
||||
CHIPSET(0x689D, HEMLOCK_689D, HEMLOCK)
|
||||
|
||||
CHIPSET(0x9802, PALM_9802, PALM)
|
||||
CHIPSET(0x9803, PALM_9803, PALM)
|
||||
CHIPSET(0x9804, PALM_9804, PALM)
|
||||
CHIPSET(0x9805, PALM_9805, PALM)
|
||||
CHIPSET(0x9806, PALM_9806, PALM)
|
||||
CHIPSET(0x9807, PALM_9807, PALM)
|
||||
|
||||
CHIPSET(0x9640, SUMO_9640, SUMO)
|
||||
CHIPSET(0x9641, SUMO_9641, SUMO)
|
||||
CHIPSET(0x9642, SUMO2_9642, SUMO2)
|
||||
CHIPSET(0x9643, SUMO2_9643, SUMO2)
|
||||
CHIPSET(0x9644, SUMO2_9644, SUMO2)
|
||||
CHIPSET(0x9645, SUMO2_9645, SUMO2)
|
||||
CHIPSET(0x9647, SUMO_9647, SUMO)
|
||||
CHIPSET(0x9648, SUMO_9648, SUMO)
|
||||
CHIPSET(0x964a, SUMO_964A, SUMO)
|
||||
CHIPSET(0x964e, SUMO_964E, SUMO)
|
||||
CHIPSET(0x964f, SUMO_964F, SUMO)
|
||||
|
||||
#ifndef RADEON_CLASSIC
|
||||
CHIPSET(0x6700, CAYMAN_6700, CAYMAN)
|
||||
CHIPSET(0x6701, CAYMAN_6701, CAYMAN)
|
||||
CHIPSET(0x6702, CAYMAN_6702, CAYMAN)
|
||||
CHIPSET(0x6703, CAYMAN_6703, CAYMAN)
|
||||
CHIPSET(0x6704, CAYMAN_6704, CAYMAN)
|
||||
CHIPSET(0x6705, CAYMAN_6705, CAYMAN)
|
||||
CHIPSET(0x6706, CAYMAN_6706, CAYMAN)
|
||||
CHIPSET(0x6707, CAYMAN_6707, CAYMAN)
|
||||
CHIPSET(0x6708, CAYMAN_6708, CAYMAN)
|
||||
CHIPSET(0x6709, CAYMAN_6709, CAYMAN)
|
||||
CHIPSET(0x6718, CAYMAN_6718, CAYMAN)
|
||||
CHIPSET(0x6719, CAYMAN_6719, CAYMAN)
|
||||
CHIPSET(0x671C, CAYMAN_671C, CAYMAN)
|
||||
CHIPSET(0x671D, CAYMAN_671D, CAYMAN)
|
||||
CHIPSET(0x671F, CAYMAN_671F, CAYMAN)
|
||||
#endif
|
||||
|
||||
CHIPSET(0x6720, BARTS_6720, BARTS)
|
||||
CHIPSET(0x6721, BARTS_6721, BARTS)
|
||||
CHIPSET(0x6722, BARTS_6722, BARTS)
|
||||
CHIPSET(0x6723, BARTS_6723, BARTS)
|
||||
CHIPSET(0x6724, BARTS_6724, BARTS)
|
||||
CHIPSET(0x6725, BARTS_6725, BARTS)
|
||||
CHIPSET(0x6726, BARTS_6726, BARTS)
|
||||
CHIPSET(0x6727, BARTS_6727, BARTS)
|
||||
CHIPSET(0x6728, BARTS_6728, BARTS)
|
||||
CHIPSET(0x6729, BARTS_6729, BARTS)
|
||||
CHIPSET(0x6738, BARTS_6738, BARTS)
|
||||
CHIPSET(0x6739, BARTS_6739, BARTS)
|
||||
CHIPSET(0x673E, BARTS_673E, BARTS)
|
||||
CHIPSET(0x6740, TURKS_6740, TURKS)
|
||||
CHIPSET(0x6741, TURKS_6741, TURKS)
|
||||
CHIPSET(0x6742, TURKS_6742, TURKS)
|
||||
CHIPSET(0x6743, TURKS_6743, TURKS)
|
||||
CHIPSET(0x6744, TURKS_6744, TURKS)
|
||||
CHIPSET(0x6745, TURKS_6745, TURKS)
|
||||
CHIPSET(0x6746, TURKS_6746, TURKS)
|
||||
CHIPSET(0x6747, TURKS_6747, TURKS)
|
||||
CHIPSET(0x6748, TURKS_6748, TURKS)
|
||||
CHIPSET(0x6749, TURKS_6749, TURKS)
|
||||
CHIPSET(0x6750, TURKS_6750, TURKS)
|
||||
CHIPSET(0x6758, TURKS_6758, TURKS)
|
||||
CHIPSET(0x6759, TURKS_6759, TURKS)
|
||||
|
||||
CHIPSET(0x6760, CAICOS_6760, CAICOS)
|
||||
CHIPSET(0x6761, CAICOS_6761, CAICOS)
|
||||
CHIPSET(0x6762, CAICOS_6762, CAICOS)
|
||||
CHIPSET(0x6763, CAICOS_6763, CAICOS)
|
||||
CHIPSET(0x6764, CAICOS_6764, CAICOS)
|
||||
CHIPSET(0x6765, CAICOS_6765, CAICOS)
|
||||
CHIPSET(0x6766, CAICOS_6766, CAICOS)
|
||||
CHIPSET(0x6767, CAICOS_6767, CAICOS)
|
||||
CHIPSET(0x6768, CAICOS_6768, CAICOS)
|
||||
CHIPSET(0x6770, CAICOS_6770, CAICOS)
|
||||
CHIPSET(0x6779, CAICOS_6779, CAICOS)
|
@@ -1,23 +0,0 @@
|
||||
CHIPSET(0x4C57, RADEON_LW, RV200)
|
||||
CHIPSET(0x4C58, RADEON_LX, RV200)
|
||||
CHIPSET(0x4C59, RADEON_LY, RV100)
|
||||
CHIPSET(0x4C5A, RADEON_LZ, RV100)
|
||||
CHIPSET(0x5144, RADEON_QD, R100)
|
||||
CHIPSET(0x5145, RADEON_QE, R100)
|
||||
CHIPSET(0x5146, RADEON_QF, R100)
|
||||
CHIPSET(0x5147, RADEON_QG, R100)
|
||||
CHIPSET(0x5159, RADEON_QY, RV100)
|
||||
CHIPSET(0x515A, RADEON_QZ, RV100)
|
||||
|
||||
CHIPSET(0x5157, RV200_QW, RV200)
|
||||
CHIPSET(0x5158, RV200_QX, RV200)
|
||||
|
||||
CHIPSET(0x515E, RN50_515E, UNKNOWN)
|
||||
CHIPSET(0x5969, RN50_5969, UNKNOWN)
|
||||
|
||||
CHIPSET(0x4136, RS100_4136, RS100)
|
||||
CHIPSET(0x4336, RS100_4336, RS100)
|
||||
CHIPSET(0x4137, RS200_4137, RS200)
|
||||
CHIPSET(0x4337, RS200_4337, RS200)
|
||||
CHIPSET(0x4237, RS250_4237, RS200)
|
||||
CHIPSET(0x4437, RS250_4437, RS200)
|
@@ -59,7 +59,6 @@ def quietCommandLines(env):
|
||||
env['LEXCOMSTR'] = " Generating $TARGET ..."
|
||||
env['YACCCOMSTR'] = " Generating $TARGET ..."
|
||||
env['CODEGENCOMSTR'] = " Generating $TARGET ..."
|
||||
env['INSTALLSTR'] = " Installing $TARGET ..."
|
||||
|
||||
|
||||
def createConvenienceLibBuilder(env):
|
||||
@@ -157,8 +156,7 @@ def createCodeGenerateMethod(env):
|
||||
def generate(env):
|
||||
"""Common environment generation code"""
|
||||
|
||||
verbose = env.get('verbose', False) or not env.get('quiet', True)
|
||||
if not verbose:
|
||||
if env.get('quiet', True):
|
||||
quietCommandLines(env)
|
||||
|
||||
# Custom builders and methods
|
||||
|
@@ -74,7 +74,7 @@ def install_shared_library(env, sources, version = ()):
|
||||
while len(version):
|
||||
version = version[:-1]
|
||||
target_name = '.'.join((str(source),) + version)
|
||||
action = SCons.Action.Action(symlink, " Symlinking $TARGET ...")
|
||||
action = SCons.Action.Action(symlink, "$TARGET -> $SOURCE")
|
||||
last = env.Command(os.path.join(target_dir, target_name), last, action)
|
||||
targets += last
|
||||
return targets
|
||||
@@ -247,8 +247,6 @@ def generate(env):
|
||||
# configuration. See also http://www.scons.org/wiki/AdvancedBuildExample
|
||||
build_topdir = 'build'
|
||||
build_subdir = env['platform']
|
||||
if env['embedded']:
|
||||
build_subdir = 'embedded-' + build_subdir
|
||||
if env['machine'] != 'generic':
|
||||
build_subdir += '-' + env['machine']
|
||||
if env['build'] != 'release':
|
||||
@@ -279,18 +277,6 @@ def generate(env):
|
||||
cppdefines += ['NDEBUG']
|
||||
if env['build'] == 'profile':
|
||||
cppdefines += ['PROFILE']
|
||||
if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
cppdefines += [
|
||||
'_POSIX_SOURCE',
|
||||
('_POSIX_C_SOURCE', '199309L'),
|
||||
'_SVID_SOURCE',
|
||||
'_BSD_SOURCE',
|
||||
'_GNU_SOURCE',
|
||||
'PTHREADS',
|
||||
'HAVE_POSIX_MEMALIGN',
|
||||
]
|
||||
if env['platform'] == 'darwin':
|
||||
cppdefines += ['_DARWIN_C_SOURCE']
|
||||
if platform == 'windows':
|
||||
cppdefines += [
|
||||
'WIN32',
|
||||
@@ -363,8 +349,8 @@ def generate(env):
|
||||
if platform == 'wince':
|
||||
cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE']
|
||||
cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE_OGL']
|
||||
if env['embedded']:
|
||||
cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED']
|
||||
if platform == 'embedded':
|
||||
cppdefines += ['PIPE_OS_EMBEDDED']
|
||||
env.Append(CPPDEFINES = cppdefines)
|
||||
|
||||
# C compiler options
|
||||
@@ -417,8 +403,6 @@ def generate(env):
|
||||
ccflags += ['-m64']
|
||||
if platform == 'darwin':
|
||||
ccflags += ['-fno-common']
|
||||
if env['platform'] != 'windows':
|
||||
ccflags += ['-fvisibility=hidden']
|
||||
# See also:
|
||||
# - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
ccflags += [
|
||||
@@ -611,10 +595,7 @@ def generate(env):
|
||||
env['LINK'] = env['CXX']
|
||||
|
||||
# Default libs
|
||||
libs = []
|
||||
if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
libs += ['m', 'pthread', 'dl']
|
||||
env.Append(LIBS = libs)
|
||||
env.Append(LIBS = [])
|
||||
|
||||
# Load tools
|
||||
env.Tool('lex')
|
||||
|
@@ -23,7 +23,6 @@ SConscript('mapi/vgapi/SConscript')
|
||||
|
||||
if env['platform'] != 'embedded':
|
||||
SConscript('egl/main/SConscript')
|
||||
SConscript('glu/sgi/SConscript')
|
||||
SConscript('glut/glx/SConscript')
|
||||
|
||||
if env['gles']:
|
||||
|
@@ -4,19 +4,18 @@ TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EGL_DRIVER = egl_dri2
|
||||
EGL_SOURCES = egl_dri2.c common.c
|
||||
EGL_SOURCES = egl_dri2.c platform_x11.c platform_drm.c
|
||||
|
||||
EGL_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/egl/main \
|
||||
-I$(TOP)/src/mapi \
|
||||
-I$(TOP)/src/gbm/main \
|
||||
-I$(TOP)/src/gbm/backends/dri \
|
||||
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
|
||||
$(XCB_DRI2_CFLAGS) \
|
||||
$(LIBUDEV_CFLAGS) \
|
||||
$(LIBDRM_CFLAGS)
|
||||
|
||||
EGL_LIBS = $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
|
||||
EGL_LIBS = $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
|
||||
|
||||
EGL_CFLAGS = -D_EGL_MAIN=_eglBuiltInDriverDRI2
|
||||
EGL_BUILTIN = true
|
||||
@@ -25,17 +24,6 @@ ifeq ($(SHARED_GLAPI),1)
|
||||
EGL_CFLAGS += -DHAVE_SHARED_GLAPI
|
||||
endif
|
||||
|
||||
ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_x11.c
|
||||
EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS)
|
||||
EGL_LIBS += $(XCB_DRI2_LIBS)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_drm.c
|
||||
EGL_INCLUDES += -DHAVE_DRM_PLATFORM
|
||||
endif
|
||||
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_wayland.c
|
||||
EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
|
||||
|
@@ -1,144 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2011 Intel Corporation
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Authors:
|
||||
* Kristian Høgsberg <krh@bitplanet.net>
|
||||
* Benjamin Franzke <benjaminfranzke@googlemail.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "egl_dri2.h"
|
||||
|
||||
#ifdef HAVE_LIBUDEV
|
||||
|
||||
#define DRIVER_MAP_DRI2_ONLY
|
||||
#include "pci_ids/pci_id_driver_map.h"
|
||||
|
||||
#include <libudev.h>
|
||||
|
||||
static struct udev_device *
|
||||
dri2_udev_device_new_from_fd(struct udev *udev, int fd)
|
||||
{
|
||||
struct udev_device *device;
|
||||
struct stat buf;
|
||||
|
||||
if (fstat(fd, &buf) < 0) {
|
||||
_eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
|
||||
if (device == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"EGL-DRI2: could not create udev device for fd %d", fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
char *
|
||||
dri2_get_device_name_for_fd(int fd)
|
||||
{
|
||||
struct udev *udev;
|
||||
struct udev_device *device;
|
||||
const char *const_device_name;
|
||||
char *device_name = NULL;
|
||||
|
||||
udev = udev_new();
|
||||
device = dri2_udev_device_new_from_fd(udev, fd);
|
||||
if (device == NULL)
|
||||
return NULL;
|
||||
|
||||
const_device_name = udev_device_get_devnode(device);
|
||||
if (!const_device_name)
|
||||
goto out;
|
||||
device_name = strdup(const_device_name);
|
||||
|
||||
out:
|
||||
udev_device_unref(device);
|
||||
udev_unref(udev);
|
||||
|
||||
return device_name;
|
||||
}
|
||||
|
||||
char *
|
||||
dri2_get_driver_for_fd(int fd)
|
||||
{
|
||||
struct udev *udev;
|
||||
struct udev_device *device, *parent;
|
||||
const char *pci_id;
|
||||
char *driver = NULL;
|
||||
int vendor_id, chip_id, i, j;
|
||||
|
||||
udev = udev_new();
|
||||
device = dri2_udev_device_new_from_fd(udev, fd);
|
||||
if (device == NULL)
|
||||
return NULL;
|
||||
|
||||
parent = udev_device_get_parent(device);
|
||||
if (parent == NULL) {
|
||||
_eglLog(_EGL_WARNING, "DRI2: could not get parent device");
|
||||
goto out;
|
||||
}
|
||||
|
||||
pci_id = udev_device_get_property_value(parent, "PCI_ID");
|
||||
if (pci_id == NULL ||
|
||||
sscanf(pci_id, "%x:%x", &vendor_id, &chip_id) != 2) {
|
||||
_eglLog(_EGL_WARNING, "EGL-DRI2: malformed or no PCI ID");
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; driver_map[i].driver; i++) {
|
||||
if (vendor_id != driver_map[i].vendor_id)
|
||||
continue;
|
||||
if (driver_map[i].num_chips_ids == -1) {
|
||||
driver = strdup(driver_map[i].driver);
|
||||
_eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
|
||||
fd, vendor_id, chip_id, driver);
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (j = 0; j < driver_map[i].num_chips_ids; j++)
|
||||
if (driver_map[i].chip_ids[j] == chip_id) {
|
||||
driver = strdup(driver_map[i].driver);
|
||||
_eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
|
||||
fd, vendor_id, chip_id, driver);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
udev_device_unref(device);
|
||||
udev_unref(udev);
|
||||
|
||||
return driver;
|
||||
}
|
||||
|
||||
#endif /* HAVE_LIBUDEV */
|
@@ -97,18 +97,6 @@ EGLint dri2_to_egl_attribute_map[] = {
|
||||
0, /* __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE */
|
||||
};
|
||||
|
||||
static EGLBoolean
|
||||
dri2_match_config(const _EGLConfig *conf, const _EGLConfig *criteria)
|
||||
{
|
||||
if (_eglCompareConfigs(conf, criteria, NULL, EGL_FALSE) != 0)
|
||||
return EGL_FALSE;
|
||||
|
||||
if (!_eglMatchConfig(conf, criteria))
|
||||
return EGL_FALSE;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
struct dri2_egl_config *
|
||||
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
int depth, EGLint surface_type, const EGLint *attr_list)
|
||||
@@ -202,7 +190,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
base.ConfigID = EGL_DONT_CARE;
|
||||
base.SurfaceType = EGL_DONT_CARE;
|
||||
num_configs = _eglFilterArray(disp->Configs, (void **) &matching_config, 1,
|
||||
(_EGLArrayForEach) dri2_match_config, &base);
|
||||
(_EGLArrayForEach) _eglMatchConfig, &base);
|
||||
|
||||
if (num_configs == 1) {
|
||||
conf = (struct dri2_egl_config *) matching_config;
|
||||
@@ -212,10 +200,13 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
else if (!double_buffer && !conf->dri_single_config)
|
||||
conf->dri_single_config = dri_config;
|
||||
else
|
||||
/* a similar config type is already added (unlikely) => discard */
|
||||
return NULL;
|
||||
/* a similar config type is already added
|
||||
* => attach it as new config
|
||||
*/
|
||||
num_configs = 0;
|
||||
}
|
||||
else if (num_configs == 0) {
|
||||
|
||||
if (num_configs == 0) {
|
||||
conf = malloc(sizeof *conf);
|
||||
if (conf == NULL)
|
||||
return NULL;
|
||||
@@ -233,10 +224,6 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
|
||||
_eglLinkConfig(&conf->base);
|
||||
}
|
||||
else {
|
||||
assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
conf->base.SurfaceType |= surface_type & (!double_buffer ? EGL_PIXMAP_BIT:
|
||||
(EGL_WINDOW_BIT | EGL_PBUFFER_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT));
|
||||
@@ -244,7 +231,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
return conf;
|
||||
}
|
||||
|
||||
__DRIimage *
|
||||
static __DRIimage *
|
||||
dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data)
|
||||
{
|
||||
_EGLDisplay *disp = data;
|
||||
@@ -334,8 +321,8 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const __DRIextension **
|
||||
dri2_open_driver(_EGLDisplay *disp)
|
||||
EGLBoolean
|
||||
dri2_load_driver(_EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = disp->DriverData;
|
||||
const __DRIextension **extensions;
|
||||
@@ -374,9 +361,9 @@ dri2_open_driver(_EGLDisplay *disp)
|
||||
|
||||
if (dri2_dpy->driver == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"DRI2: failed to open %s (search paths %s)",
|
||||
dri2_dpy->driver_name, search_paths);
|
||||
return NULL;
|
||||
"DRI2: failed to open any driver (search paths %s)",
|
||||
search_paths);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
_eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
|
||||
@@ -385,60 +372,60 @@ dri2_open_driver(_EGLDisplay *disp)
|
||||
_eglLog(_EGL_WARNING,
|
||||
"DRI2: driver exports no extensions (%s)", dlerror());
|
||||
dlclose(dri2_dpy->driver);
|
||||
}
|
||||
|
||||
return extensions;
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
dri2_load_driver(_EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = disp->DriverData;
|
||||
const __DRIextension **extensions;
|
||||
|
||||
extensions = dri2_open_driver(disp);
|
||||
if (!extensions)
|
||||
return EGL_FALSE;
|
||||
|
||||
if (!dri2_bind_extensions(dri2_dpy, dri2_driver_extensions, extensions)) {
|
||||
dlclose(dri2_dpy->driver);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (strcmp(dri2_dpy->driver_name, "swrast") == 0) {
|
||||
if (!dri2_bind_extensions(dri2_dpy, swrast_driver_extensions, extensions)) {
|
||||
dlclose(dri2_dpy->driver);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
} else {
|
||||
if (!dri2_bind_extensions(dri2_dpy, dri2_driver_extensions, extensions)) {
|
||||
dlclose(dri2_dpy->driver);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
dri2_load_driver_swrast(_EGLDisplay *disp)
|
||||
dri2_create_screen(_EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = disp->DriverData;
|
||||
const __DRIextension **extensions;
|
||||
|
||||
dri2_dpy->driver_name = "swrast";
|
||||
extensions = dri2_open_driver(disp);
|
||||
if (!extensions) {
|
||||
/* try again with swrastg */
|
||||
dri2_dpy->driver_name = "swrastg";
|
||||
extensions = dri2_open_driver(disp);
|
||||
}
|
||||
|
||||
if (!extensions)
|
||||
return EGL_FALSE;
|
||||
|
||||
if (!dri2_bind_extensions(dri2_dpy, swrast_driver_extensions, extensions)) {
|
||||
dlclose(dri2_dpy->driver);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
dri2_setup_screen(_EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
unsigned int api_mask;
|
||||
|
||||
dri2_dpy = disp->DriverData;
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd, dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->swrast->createNewScreen(0, dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri_screen == NULL) {
|
||||
_eglLog(_EGL_WARNING, "DRI2: failed to create dri screen");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
extensions = dri2_dpy->core->getExtensions(dri2_dpy->dri_screen);
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
if (!dri2_bind_extensions(dri2_dpy, dri2_core_extensions, extensions))
|
||||
goto cleanup_dri_screen;
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
if (!dri2_bind_extensions(dri2_dpy, swrast_core_extensions, extensions))
|
||||
goto cleanup_dri_screen;
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
if (dri2_dpy->dri2->base.version >= 2)
|
||||
api_mask = dri2_dpy->dri2->getAPIMask(dri2_dpy->dri_screen);
|
||||
@@ -480,44 +467,6 @@ dri2_setup_screen(_EGLDisplay *disp)
|
||||
disp->Extensions.KHR_image_base = EGL_TRUE;
|
||||
disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
dri2_create_screen(_EGLDisplay *disp)
|
||||
{
|
||||
const __DRIextension **extensions;
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
|
||||
dri2_dpy = disp->DriverData;
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd, dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->swrast->createNewScreen(0, dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri_screen == NULL) {
|
||||
_eglLog(_EGL_WARNING, "DRI2: failed to create dri screen");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
extensions = dri2_dpy->core->getExtensions(dri2_dpy->dri_screen);
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
if (!dri2_bind_extensions(dri2_dpy, dri2_core_extensions, extensions))
|
||||
goto cleanup_dri_screen;
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
if (!dri2_bind_extensions(dri2_dpy, swrast_core_extensions, extensions))
|
||||
goto cleanup_dri_screen;
|
||||
}
|
||||
|
||||
dri2_setup_screen(disp);
|
||||
|
||||
return EGL_TRUE;
|
||||
|
||||
@@ -538,20 +487,16 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return EGL_FALSE;
|
||||
|
||||
switch (disp->Platform) {
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
case _EGL_PLATFORM_X11:
|
||||
if (disp->Options.TestOnly)
|
||||
return EGL_TRUE;
|
||||
return dri2_initialize_x11(drv, disp);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBUDEV
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
case _EGL_PLATFORM_DRM:
|
||||
if (disp->Options.TestOnly)
|
||||
return EGL_TRUE;
|
||||
return dri2_initialize_drm(drv, disp);
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
case _EGL_PLATFORM_WAYLAND:
|
||||
if (disp->Options.TestOnly)
|
||||
@@ -580,24 +525,8 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
if (dri2_dpy->fd)
|
||||
close(dri2_dpy->fd);
|
||||
dlclose(dri2_dpy->driver);
|
||||
|
||||
if (disp->PlatformDisplay == NULL) {
|
||||
switch (disp->Platform) {
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
case _EGL_PLATFORM_X11:
|
||||
xcb_disconnect(dri2_dpy->conn);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
case _EGL_PLATFORM_WAYLAND:
|
||||
wl_display_destroy(dri2_dpy->wl_dpy);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (disp->PlatformDisplay == NULL)
|
||||
xcb_disconnect(dri2_dpy->conn);
|
||||
free(dri2_dpy);
|
||||
disp->DriverData = NULL;
|
||||
|
||||
@@ -906,7 +835,7 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
|
||||
struct dri2_egl_image *dri2_img;
|
||||
GLuint renderbuffer = (GLuint) (uintptr_t) buffer;
|
||||
GLuint renderbuffer = (GLuint) buffer;
|
||||
|
||||
if (renderbuffer == 0) {
|
||||
_eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr");
|
||||
@@ -941,7 +870,7 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
|
||||
(void) ctx;
|
||||
|
||||
name = (EGLint) (uintptr_t) buffer;
|
||||
name = (EGLint) buffer;
|
||||
|
||||
err = _eglParseImageAttribList(&attrs, disp, attr_list);
|
||||
if (err != EGL_SUCCESS)
|
||||
@@ -993,12 +922,14 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
return &dri2_img->base;
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
static EGLBoolean
|
||||
dri2_export_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
|
||||
EGLint *name, EGLint *handle, EGLint *stride);
|
||||
|
||||
static _EGLImage *
|
||||
dri2_reference_drm_image(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
__DRIimage *dri_image, EGLint width, EGLint height)
|
||||
_EGLImage *image, EGLint width, EGLint height)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
EGLint attr_list[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
@@ -1008,8 +939,8 @@ dri2_reference_drm_image(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
};
|
||||
EGLint name, stride;
|
||||
|
||||
dri2_dpy->image->queryImage(dri_image, __DRI_IMAGE_ATTRIB_NAME, &name);
|
||||
dri2_dpy->image->queryImage(dri_image, __DRI_IMAGE_ATTRIB_STRIDE, &stride);
|
||||
dri2_export_drm_image_mesa(disp->Driver, disp, image,
|
||||
&name, NULL, &stride);
|
||||
|
||||
attr_list[1] = width;
|
||||
attr_list[3] = height;
|
||||
@@ -1020,21 +951,19 @@ dri2_reference_drm_image(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
attr_list);
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
static _EGLImage *
|
||||
dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer _buffer,
|
||||
EGLClientBuffer buffer,
|
||||
const EGLint *attr_list)
|
||||
{
|
||||
struct wl_buffer *buffer = (struct wl_buffer *) _buffer;
|
||||
(void) attr_list;
|
||||
struct wl_drm_buffer *wl_drm_buffer = (struct wl_drm_buffer *) buffer;
|
||||
|
||||
if (!wayland_buffer_is_drm(buffer))
|
||||
return NULL;
|
||||
(void) attr_list;
|
||||
|
||||
return dri2_reference_drm_image(disp, ctx,
|
||||
wayland_drm_buffer_get_buffer(buffer),
|
||||
buffer->width,
|
||||
buffer->height);
|
||||
return dri2_reference_drm_image(disp, ctx, wl_drm_buffer->image,
|
||||
wl_drm_buffer->buffer.width,
|
||||
wl_drm_buffer->buffer.height);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1125,8 +1054,7 @@ dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
|
||||
valid_mask =
|
||||
EGL_DRM_BUFFER_USE_SCANOUT_MESA |
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA |
|
||||
EGL_DRM_BUFFER_USE_CURSOR_MESA;
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA;
|
||||
if (attrs.DRMBufferUseMESA & ~valid_mask) {
|
||||
_eglLog(_EGL_WARNING, "bad image use bit 0x%04x",
|
||||
attrs.DRMBufferUseMESA & ~valid_mask);
|
||||
@@ -1138,8 +1066,6 @@ dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
dri_use |= __DRI_IMAGE_USE_SHARE;
|
||||
if (attrs.DRMBufferUseMESA & EGL_DRM_BUFFER_USE_SCANOUT_MESA)
|
||||
dri_use |= __DRI_IMAGE_USE_SCANOUT;
|
||||
if (attrs.DRMBufferUseMESA & EGL_DRM_BUFFER_USE_CURSOR_MESA)
|
||||
dri_use |= __DRI_IMAGE_USE_CURSOR;
|
||||
|
||||
dri2_img->dri_image =
|
||||
dri2_dpy->image->createImage(dri2_dpy->dri_screen,
|
||||
@@ -1186,41 +1112,6 @@ dri2_export_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
|
||||
static void *
|
||||
dri2_wl_reference_buffer(void *user_data, uint32_t name,
|
||||
int32_t width, int32_t height,
|
||||
uint32_t stride, struct wl_visual *visual)
|
||||
{
|
||||
_EGLDisplay *disp = user_data;
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
__DRIimage *image;
|
||||
|
||||
image = dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
|
||||
width, height,
|
||||
__DRI_IMAGE_FORMAT_ARGB8888,
|
||||
name, stride / 4,
|
||||
NULL);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_wl_release_buffer(void *user_data, void *buffer)
|
||||
{
|
||||
_EGLDisplay *disp = user_data;
|
||||
__DRIimage *image = buffer;
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
|
||||
dri2_dpy->image->destroyImage(image);
|
||||
}
|
||||
|
||||
static struct wayland_drm_callbacks wl_drm_callbacks = {
|
||||
.authenticate = NULL,
|
||||
.reference_buffer = dri2_wl_reference_buffer,
|
||||
.release_buffer = dri2_wl_release_buffer
|
||||
};
|
||||
|
||||
static EGLBoolean
|
||||
dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
struct wl_display *wl_dpy)
|
||||
@@ -1232,12 +1123,10 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
if (dri2_dpy->wl_server_drm)
|
||||
return EGL_FALSE;
|
||||
|
||||
wl_drm_callbacks.authenticate =
|
||||
(int(*)(void *, uint32_t)) dri2_dpy->authenticate;
|
||||
|
||||
dri2_dpy->wl_server_drm =
|
||||
wayland_drm_init(wl_dpy, dri2_dpy->device_name,
|
||||
&wl_drm_callbacks, disp);
|
||||
wayland_drm_init(wl_dpy, disp,
|
||||
dri2_dpy->authenticate,
|
||||
dri2_dpy->device_name);
|
||||
|
||||
if (!dri2_dpy->wl_server_drm)
|
||||
return EGL_FALSE;
|
||||
@@ -1256,7 +1145,7 @@ dri2_unbind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
if (!dri2_dpy->wl_server_drm)
|
||||
return EGL_FALSE;
|
||||
|
||||
wayland_drm_uninit(dri2_dpy->wl_server_drm);
|
||||
wayland_drm_destroy(dri2_dpy->wl_server_drm);
|
||||
dri2_dpy->wl_server_drm = NULL;
|
||||
|
||||
return EGL_TRUE;
|
||||
|
@@ -28,12 +28,10 @@
|
||||
#ifndef EGL_DRI2_INCLUDED
|
||||
#define EGL_DRI2_INCLUDED
|
||||
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/dri2.h>
|
||||
#include <xcb/xfixes.h>
|
||||
#include <X11/Xlib-xcb.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
#include <wayland-client.h>
|
||||
@@ -44,8 +42,6 @@
|
||||
#include <GL/gl.h>
|
||||
#include <GL/internal/dri_interface.h>
|
||||
|
||||
#include <gbm_driint.h>
|
||||
|
||||
#include "eglconfig.h"
|
||||
#include "eglcontext.h"
|
||||
#include "egldisplay.h"
|
||||
@@ -68,6 +64,7 @@ struct dri2_egl_driver
|
||||
|
||||
struct dri2_egl_display
|
||||
{
|
||||
xcb_connection_t *conn;
|
||||
int dri2_major;
|
||||
int dri2_minor;
|
||||
__DRIscreen *dri_screen;
|
||||
@@ -81,24 +78,15 @@ struct dri2_egl_display
|
||||
__DRIimageExtension *image;
|
||||
int fd;
|
||||
|
||||
struct gbm_dri_device *gbm_dri;
|
||||
|
||||
char *device_name;
|
||||
char *driver_name;
|
||||
|
||||
__DRIdri2LoaderExtension dri2_loader_extension;
|
||||
__DRIswrastLoaderExtension swrast_loader_extension;
|
||||
const __DRIextension *extensions[4];
|
||||
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
xcb_connection_t *conn;
|
||||
#endif
|
||||
|
||||
const __DRIextension *extensions[3];
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
struct wl_display *wl_dpy;
|
||||
struct wl_egl_display *wl_dpy;
|
||||
struct wl_drm *wl_server_drm;
|
||||
struct wl_drm *wl_drm;
|
||||
int authenticated;
|
||||
#endif
|
||||
|
||||
int (*authenticate) (_EGLDisplay *disp, uint32_t id);
|
||||
@@ -114,7 +102,6 @@ struct dri2_egl_context
|
||||
enum wayland_buffer_type {
|
||||
WL_BUFFER_FRONT,
|
||||
WL_BUFFER_BACK,
|
||||
WL_BUFFER_THIRD,
|
||||
WL_BUFFER_COUNT
|
||||
};
|
||||
|
||||
@@ -131,30 +118,26 @@ struct dri2_egl_surface
|
||||
{
|
||||
_EGLSurface base;
|
||||
__DRIdrawable *dri_drawable;
|
||||
xcb_drawable_t drawable;
|
||||
__DRIbuffer buffers[5];
|
||||
int buffer_count;
|
||||
xcb_xfixes_region_t region;
|
||||
int have_fake_front;
|
||||
int swap_interval;
|
||||
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
xcb_drawable_t drawable;
|
||||
xcb_xfixes_region_t region;
|
||||
int depth;
|
||||
int bytes_per_pixel;
|
||||
xcb_gcontext_t gc;
|
||||
xcb_gcontext_t swapgc;
|
||||
#endif
|
||||
|
||||
enum dri2_surface_type type;
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
struct wl_egl_window *wl_win;
|
||||
struct wl_egl_pixmap *wl_pix;
|
||||
struct wl_buffer *wl_drm_buffer[WL_BUFFER_COUNT];
|
||||
int wl_buffer_lock[WL_BUFFER_COUNT];
|
||||
int dx;
|
||||
int dy;
|
||||
__DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
|
||||
__DRIbuffer *third_buffer;
|
||||
__DRIbuffer *pending_buffer;
|
||||
EGLBoolean block_swap_buffers;
|
||||
#endif
|
||||
@@ -189,19 +172,9 @@ extern const __DRIuseInvalidateExtension use_invalidate;
|
||||
EGLBoolean
|
||||
dri2_load_driver(_EGLDisplay *disp);
|
||||
|
||||
/* Helper for platforms not using dri2_create_screen */
|
||||
void
|
||||
dri2_setup_screen(_EGLDisplay *disp);
|
||||
|
||||
EGLBoolean
|
||||
dri2_load_driver_swrast(_EGLDisplay *disp);
|
||||
|
||||
EGLBoolean
|
||||
dri2_create_screen(_EGLDisplay *disp);
|
||||
|
||||
__DRIimage *
|
||||
dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data);
|
||||
|
||||
struct dri2_egl_config *
|
||||
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
int depth, EGLint surface_type, const EGLint *attr_list);
|
||||
@@ -222,7 +195,5 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp);
|
||||
|
||||
char *
|
||||
dri2_get_driver_for_fd(int fd);
|
||||
char *
|
||||
dri2_get_device_name_for_fd(int fd);
|
||||
|
||||
#endif /* EGL_DRI2_INCLUDED */
|
||||
|
@@ -26,55 +26,640 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <xf86drm.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <xf86drm.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_LIBUDEV
|
||||
#include <libudev.h>
|
||||
#endif
|
||||
|
||||
#include "egl_dri2.h"
|
||||
|
||||
static _EGLImage *
|
||||
dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
|
||||
#ifdef HAVE_LIBUDEV
|
||||
|
||||
struct dri2_driver_map {
|
||||
int vendor_id;
|
||||
const char *driver;
|
||||
const int *chip_ids;
|
||||
int num_chips_ids;
|
||||
};
|
||||
|
||||
const int i915_chip_ids[] = {
|
||||
0x3577, /* PCI_CHIP_I830_M */
|
||||
0x2562, /* PCI_CHIP_845_G */
|
||||
0x3582, /* PCI_CHIP_I855_GM */
|
||||
0x2572, /* PCI_CHIP_I865_G */
|
||||
0x2582, /* PCI_CHIP_I915_G */
|
||||
0x258a, /* PCI_CHIP_E7221_G */
|
||||
0x2592, /* PCI_CHIP_I915_GM */
|
||||
0x2772, /* PCI_CHIP_I945_G */
|
||||
0x27a2, /* PCI_CHIP_I945_GM */
|
||||
0x27ae, /* PCI_CHIP_I945_GME */
|
||||
0x29b2, /* PCI_CHIP_Q35_G */
|
||||
0x29c2, /* PCI_CHIP_G33_G */
|
||||
0x29d2, /* PCI_CHIP_Q33_G */
|
||||
0xa001, /* PCI_CHIP_IGD_G */
|
||||
0xa011, /* Pineview */
|
||||
};
|
||||
|
||||
const int i965_chip_ids[] = {
|
||||
0x0042, /* PCI_CHIP_ILD_G */
|
||||
0x0046, /* PCI_CHIP_ILM_G */
|
||||
0x0102, /* PCI_CHIP_SANDYBRIDGE_GT1 */
|
||||
0x0106, /* PCI_CHIP_SANDYBRIDGE_M_GT1 */
|
||||
0x010a, /* PCI_CHIP_SANDYBRIDGE_S */
|
||||
0x0112, /* PCI_CHIP_SANDYBRIDGE_GT2 */
|
||||
0x0116, /* PCI_CHIP_SANDYBRIDGE_M_GT2 */
|
||||
0x0122, /* PCI_CHIP_SANDYBRIDGE_GT2_PLUS */
|
||||
0x0126, /* PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS */
|
||||
0x29a2, /* PCI_CHIP_I965_G */
|
||||
0x2992, /* PCI_CHIP_I965_Q */
|
||||
0x2982, /* PCI_CHIP_I965_G_1 */
|
||||
0x2972, /* PCI_CHIP_I946_GZ */
|
||||
0x2a02, /* PCI_CHIP_I965_GM */
|
||||
0x2a12, /* PCI_CHIP_I965_GME */
|
||||
0x2a42, /* PCI_CHIP_GM45_GM */
|
||||
0x2e02, /* PCI_CHIP_IGD_E_G */
|
||||
0x2e12, /* PCI_CHIP_Q45_G */
|
||||
0x2e22, /* PCI_CHIP_G45_G */
|
||||
0x2e32, /* PCI_CHIP_G41_G */
|
||||
0x2e42, /* PCI_CHIP_B43_G */
|
||||
0x2e92, /* PCI_CHIP_B43_G1 */
|
||||
};
|
||||
|
||||
const int r100_chip_ids[] = {
|
||||
0x4C57, /* PCI_CHIP_RADEON_LW */
|
||||
0x4C58, /* PCI_CHIP_RADEON_LX */
|
||||
0x4C59, /* PCI_CHIP_RADEON_LY */
|
||||
0x4C5A, /* PCI_CHIP_RADEON_LZ */
|
||||
0x5144, /* PCI_CHIP_RADEON_QD */
|
||||
0x5145, /* PCI_CHIP_RADEON_QE */
|
||||
0x5146, /* PCI_CHIP_RADEON_QF */
|
||||
0x5147, /* PCI_CHIP_RADEON_QG */
|
||||
0x5159, /* PCI_CHIP_RADEON_QY */
|
||||
0x515A, /* PCI_CHIP_RADEON_QZ */
|
||||
0x5157, /* PCI_CHIP_RV200_QW */
|
||||
0x5158, /* PCI_CHIP_RV200_QX */
|
||||
0x515E, /* PCI_CHIP_RN50_515E */
|
||||
0x5969, /* PCI_CHIP_RN50_5969 */
|
||||
0x4136, /* PCI_CHIP_RS100_4136 */
|
||||
0x4336, /* PCI_CHIP_RS100_4336 */
|
||||
0x4137, /* PCI_CHIP_RS200_4137 */
|
||||
0x4337, /* PCI_CHIP_RS200_4337 */
|
||||
0x4237, /* PCI_CHIP_RS250_4237 */
|
||||
0x4437, /* PCI_CHIP_RS250_4437 */
|
||||
};
|
||||
|
||||
const int r200_chip_ids[] = {
|
||||
0x5148, /* PCI_CHIP_R200_QH */
|
||||
0x514C, /* PCI_CHIP_R200_QL */
|
||||
0x514D, /* PCI_CHIP_R200_QM */
|
||||
0x4242, /* PCI_CHIP_R200_BB */
|
||||
0x4966, /* PCI_CHIP_RV250_If */
|
||||
0x4967, /* PCI_CHIP_RV250_Ig */
|
||||
0x4C64, /* PCI_CHIP_RV250_Ld */
|
||||
0x4C66, /* PCI_CHIP_RV250_Lf */
|
||||
0x4C67, /* PCI_CHIP_RV250_Lg */
|
||||
0x5960, /* PCI_CHIP_RV280_5960 */
|
||||
0x5961, /* PCI_CHIP_RV280_5961 */
|
||||
0x5962, /* PCI_CHIP_RV280_5962 */
|
||||
0x5964, /* PCI_CHIP_RV280_5964 */
|
||||
0x5965, /* PCI_CHIP_RV280_5965 */
|
||||
0x5C61, /* PCI_CHIP_RV280_5C61 */
|
||||
0x5C63, /* PCI_CHIP_RV280_5C63 */
|
||||
0x5834, /* PCI_CHIP_RS300_5834 */
|
||||
0x5835, /* PCI_CHIP_RS300_5835 */
|
||||
0x7834, /* PCI_CHIP_RS350_7834 */
|
||||
0x7835, /* PCI_CHIP_RS350_7835 */
|
||||
};
|
||||
|
||||
const int r300_chip_ids[] = {
|
||||
0x4144, /* PCI_CHIP_R300_AD */
|
||||
0x4145, /* PCI_CHIP_R300_AE */
|
||||
0x4146, /* PCI_CHIP_R300_AF */
|
||||
0x4147, /* PCI_CHIP_R300_AG */
|
||||
0x4E44, /* PCI_CHIP_R300_ND */
|
||||
0x4E45, /* PCI_CHIP_R300_NE */
|
||||
0x4E46, /* PCI_CHIP_R300_NF */
|
||||
0x4E47, /* PCI_CHIP_R300_NG */
|
||||
0x4E48, /* PCI_CHIP_R350_NH */
|
||||
0x4E49, /* PCI_CHIP_R350_NI */
|
||||
0x4E4B, /* PCI_CHIP_R350_NK */
|
||||
0x4148, /* PCI_CHIP_R350_AH */
|
||||
0x4149, /* PCI_CHIP_R350_AI */
|
||||
0x414A, /* PCI_CHIP_R350_AJ */
|
||||
0x414B, /* PCI_CHIP_R350_AK */
|
||||
0x4E4A, /* PCI_CHIP_R360_NJ */
|
||||
0x4150, /* PCI_CHIP_RV350_AP */
|
||||
0x4151, /* PCI_CHIP_RV350_AQ */
|
||||
0x4152, /* PCI_CHIP_RV350_AR */
|
||||
0x4153, /* PCI_CHIP_RV350_AS */
|
||||
0x4154, /* PCI_CHIP_RV350_AT */
|
||||
0x4155, /* PCI_CHIP_RV350_AU */
|
||||
0x4156, /* PCI_CHIP_RV350_AV */
|
||||
0x4E50, /* PCI_CHIP_RV350_NP */
|
||||
0x4E51, /* PCI_CHIP_RV350_NQ */
|
||||
0x4E52, /* PCI_CHIP_RV350_NR */
|
||||
0x4E53, /* PCI_CHIP_RV350_NS */
|
||||
0x4E54, /* PCI_CHIP_RV350_NT */
|
||||
0x4E56, /* PCI_CHIP_RV350_NV */
|
||||
0x5460, /* PCI_CHIP_RV370_5460 */
|
||||
0x5462, /* PCI_CHIP_RV370_5462 */
|
||||
0x5464, /* PCI_CHIP_RV370_5464 */
|
||||
0x5B60, /* PCI_CHIP_RV370_5B60 */
|
||||
0x5B62, /* PCI_CHIP_RV370_5B62 */
|
||||
0x5B63, /* PCI_CHIP_RV370_5B63 */
|
||||
0x5B64, /* PCI_CHIP_RV370_5B64 */
|
||||
0x5B65, /* PCI_CHIP_RV370_5B65 */
|
||||
0x3150, /* PCI_CHIP_RV380_3150 */
|
||||
0x3152, /* PCI_CHIP_RV380_3152 */
|
||||
0x3154, /* PCI_CHIP_RV380_3154 */
|
||||
0x3155, /* PCI_CHIP_RV380_3155 */
|
||||
0x3E50, /* PCI_CHIP_RV380_3E50 */
|
||||
0x3E54, /* PCI_CHIP_RV380_3E54 */
|
||||
0x4A48, /* PCI_CHIP_R420_JH */
|
||||
0x4A49, /* PCI_CHIP_R420_JI */
|
||||
0x4A4A, /* PCI_CHIP_R420_JJ */
|
||||
0x4A4B, /* PCI_CHIP_R420_JK */
|
||||
0x4A4C, /* PCI_CHIP_R420_JL */
|
||||
0x4A4D, /* PCI_CHIP_R420_JM */
|
||||
0x4A4E, /* PCI_CHIP_R420_JN */
|
||||
0x4A4F, /* PCI_CHIP_R420_JO */
|
||||
0x4A50, /* PCI_CHIP_R420_JP */
|
||||
0x4A54, /* PCI_CHIP_R420_JT */
|
||||
0x5548, /* PCI_CHIP_R423_UH */
|
||||
0x5549, /* PCI_CHIP_R423_UI */
|
||||
0x554A, /* PCI_CHIP_R423_UJ */
|
||||
0x554B, /* PCI_CHIP_R423_UK */
|
||||
0x5550, /* PCI_CHIP_R423_5550 */
|
||||
0x5551, /* PCI_CHIP_R423_UQ */
|
||||
0x5552, /* PCI_CHIP_R423_UR */
|
||||
0x5554, /* PCI_CHIP_R423_UT */
|
||||
0x5D57, /* PCI_CHIP_R423_5D57 */
|
||||
0x554C, /* PCI_CHIP_R430_554C */
|
||||
0x554D, /* PCI_CHIP_R430_554D */
|
||||
0x554E, /* PCI_CHIP_R430_554E */
|
||||
0x554F, /* PCI_CHIP_R430_554F */
|
||||
0x5D48, /* PCI_CHIP_R430_5D48 */
|
||||
0x5D49, /* PCI_CHIP_R430_5D49 */
|
||||
0x5D4A, /* PCI_CHIP_R430_5D4A */
|
||||
0x5D4C, /* PCI_CHIP_R480_5D4C */
|
||||
0x5D4D, /* PCI_CHIP_R480_5D4D */
|
||||
0x5D4E, /* PCI_CHIP_R480_5D4E */
|
||||
0x5D4F, /* PCI_CHIP_R480_5D4F */
|
||||
0x5D50, /* PCI_CHIP_R480_5D50 */
|
||||
0x5D52, /* PCI_CHIP_R480_5D52 */
|
||||
0x4B49, /* PCI_CHIP_R481_4B49 */
|
||||
0x4B4A, /* PCI_CHIP_R481_4B4A */
|
||||
0x4B4B, /* PCI_CHIP_R481_4B4B */
|
||||
0x4B4C, /* PCI_CHIP_R481_4B4C */
|
||||
0x564A, /* PCI_CHIP_RV410_564A */
|
||||
0x564B, /* PCI_CHIP_RV410_564B */
|
||||
0x564F, /* PCI_CHIP_RV410_564F */
|
||||
0x5652, /* PCI_CHIP_RV410_5652 */
|
||||
0x5653, /* PCI_CHIP_RV410_5653 */
|
||||
0x5657, /* PCI_CHIP_RV410_5657 */
|
||||
0x5E48, /* PCI_CHIP_RV410_5E48 */
|
||||
0x5E4A, /* PCI_CHIP_RV410_5E4A */
|
||||
0x5E4B, /* PCI_CHIP_RV410_5E4B */
|
||||
0x5E4C, /* PCI_CHIP_RV410_5E4C */
|
||||
0x5E4D, /* PCI_CHIP_RV410_5E4D */
|
||||
0x5E4F, /* PCI_CHIP_RV410_5E4F */
|
||||
0x5A41, /* PCI_CHIP_RS400_5A41 */
|
||||
0x5A42, /* PCI_CHIP_RS400_5A42 */
|
||||
0x5A61, /* PCI_CHIP_RC410_5A61 */
|
||||
0x5A62, /* PCI_CHIP_RC410_5A62 */
|
||||
0x5954, /* PCI_CHIP_RS480_5954 */
|
||||
0x5955, /* PCI_CHIP_RS480_5955 */
|
||||
0x5974, /* PCI_CHIP_RS482_5974 */
|
||||
0x5975, /* PCI_CHIP_RS482_5975 */
|
||||
0x7100, /* PCI_CHIP_R520_7100 */
|
||||
0x7101, /* PCI_CHIP_R520_7101 */
|
||||
0x7102, /* PCI_CHIP_R520_7102 */
|
||||
0x7103, /* PCI_CHIP_R520_7103 */
|
||||
0x7104, /* PCI_CHIP_R520_7104 */
|
||||
0x7105, /* PCI_CHIP_R520_7105 */
|
||||
0x7106, /* PCI_CHIP_R520_7106 */
|
||||
0x7108, /* PCI_CHIP_R520_7108 */
|
||||
0x7109, /* PCI_CHIP_R520_7109 */
|
||||
0x710A, /* PCI_CHIP_R520_710A */
|
||||
0x710B, /* PCI_CHIP_R520_710B */
|
||||
0x710C, /* PCI_CHIP_R520_710C */
|
||||
0x710E, /* PCI_CHIP_R520_710E */
|
||||
0x710F, /* PCI_CHIP_R520_710F */
|
||||
0x7140, /* PCI_CHIP_RV515_7140 */
|
||||
0x7141, /* PCI_CHIP_RV515_7141 */
|
||||
0x7142, /* PCI_CHIP_RV515_7142 */
|
||||
0x7143, /* PCI_CHIP_RV515_7143 */
|
||||
0x7144, /* PCI_CHIP_RV515_7144 */
|
||||
0x7145, /* PCI_CHIP_RV515_7145 */
|
||||
0x7146, /* PCI_CHIP_RV515_7146 */
|
||||
0x7147, /* PCI_CHIP_RV515_7147 */
|
||||
0x7149, /* PCI_CHIP_RV515_7149 */
|
||||
0x714A, /* PCI_CHIP_RV515_714A */
|
||||
0x714B, /* PCI_CHIP_RV515_714B */
|
||||
0x714C, /* PCI_CHIP_RV515_714C */
|
||||
0x714D, /* PCI_CHIP_RV515_714D */
|
||||
0x714E, /* PCI_CHIP_RV515_714E */
|
||||
0x714F, /* PCI_CHIP_RV515_714F */
|
||||
0x7151, /* PCI_CHIP_RV515_7151 */
|
||||
0x7152, /* PCI_CHIP_RV515_7152 */
|
||||
0x7153, /* PCI_CHIP_RV515_7153 */
|
||||
0x715E, /* PCI_CHIP_RV515_715E */
|
||||
0x715F, /* PCI_CHIP_RV515_715F */
|
||||
0x7180, /* PCI_CHIP_RV515_7180 */
|
||||
0x7181, /* PCI_CHIP_RV515_7181 */
|
||||
0x7183, /* PCI_CHIP_RV515_7183 */
|
||||
0x7186, /* PCI_CHIP_RV515_7186 */
|
||||
0x7187, /* PCI_CHIP_RV515_7187 */
|
||||
0x7188, /* PCI_CHIP_RV515_7188 */
|
||||
0x718A, /* PCI_CHIP_RV515_718A */
|
||||
0x718B, /* PCI_CHIP_RV515_718B */
|
||||
0x718C, /* PCI_CHIP_RV515_718C */
|
||||
0x718D, /* PCI_CHIP_RV515_718D */
|
||||
0x718F, /* PCI_CHIP_RV515_718F */
|
||||
0x7193, /* PCI_CHIP_RV515_7193 */
|
||||
0x7196, /* PCI_CHIP_RV515_7196 */
|
||||
0x719B, /* PCI_CHIP_RV515_719B */
|
||||
0x719F, /* PCI_CHIP_RV515_719F */
|
||||
0x7200, /* PCI_CHIP_RV515_7200 */
|
||||
0x7210, /* PCI_CHIP_RV515_7210 */
|
||||
0x7211, /* PCI_CHIP_RV515_7211 */
|
||||
0x71C0, /* PCI_CHIP_RV530_71C0 */
|
||||
0x71C1, /* PCI_CHIP_RV530_71C1 */
|
||||
0x71C2, /* PCI_CHIP_RV530_71C2 */
|
||||
0x71C3, /* PCI_CHIP_RV530_71C3 */
|
||||
0x71C4, /* PCI_CHIP_RV530_71C4 */
|
||||
0x71C5, /* PCI_CHIP_RV530_71C5 */
|
||||
0x71C6, /* PCI_CHIP_RV530_71C6 */
|
||||
0x71C7, /* PCI_CHIP_RV530_71C7 */
|
||||
0x71CD, /* PCI_CHIP_RV530_71CD */
|
||||
0x71CE, /* PCI_CHIP_RV530_71CE */
|
||||
0x71D2, /* PCI_CHIP_RV530_71D2 */
|
||||
0x71D4, /* PCI_CHIP_RV530_71D4 */
|
||||
0x71D5, /* PCI_CHIP_RV530_71D5 */
|
||||
0x71D6, /* PCI_CHIP_RV530_71D6 */
|
||||
0x71DA, /* PCI_CHIP_RV530_71DA */
|
||||
0x71DE, /* PCI_CHIP_RV530_71DE */
|
||||
0x7281, /* PCI_CHIP_RV560_7281 */
|
||||
0x7283, /* PCI_CHIP_RV560_7283 */
|
||||
0x7287, /* PCI_CHIP_RV560_7287 */
|
||||
0x7290, /* PCI_CHIP_RV560_7290 */
|
||||
0x7291, /* PCI_CHIP_RV560_7291 */
|
||||
0x7293, /* PCI_CHIP_RV560_7293 */
|
||||
0x7297, /* PCI_CHIP_RV560_7297 */
|
||||
0x7280, /* PCI_CHIP_RV570_7280 */
|
||||
0x7288, /* PCI_CHIP_RV570_7288 */
|
||||
0x7289, /* PCI_CHIP_RV570_7289 */
|
||||
0x728B, /* PCI_CHIP_RV570_728B */
|
||||
0x728C, /* PCI_CHIP_RV570_728C */
|
||||
0x7240, /* PCI_CHIP_R580_7240 */
|
||||
0x7243, /* PCI_CHIP_R580_7243 */
|
||||
0x7244, /* PCI_CHIP_R580_7244 */
|
||||
0x7245, /* PCI_CHIP_R580_7245 */
|
||||
0x7246, /* PCI_CHIP_R580_7246 */
|
||||
0x7247, /* PCI_CHIP_R580_7247 */
|
||||
0x7248, /* PCI_CHIP_R580_7248 */
|
||||
0x7249, /* PCI_CHIP_R580_7249 */
|
||||
0x724A, /* PCI_CHIP_R580_724A */
|
||||
0x724B, /* PCI_CHIP_R580_724B */
|
||||
0x724C, /* PCI_CHIP_R580_724C */
|
||||
0x724D, /* PCI_CHIP_R580_724D */
|
||||
0x724E, /* PCI_CHIP_R580_724E */
|
||||
0x724F, /* PCI_CHIP_R580_724F */
|
||||
0x7284, /* PCI_CHIP_R580_7284 */
|
||||
0x793F, /* PCI_CHIP_RS600_793F */
|
||||
0x7941, /* PCI_CHIP_RS600_7941 */
|
||||
0x7942, /* PCI_CHIP_RS600_7942 */
|
||||
0x791E, /* PCI_CHIP_RS690_791E */
|
||||
0x791F, /* PCI_CHIP_RS690_791F */
|
||||
0x796C, /* PCI_CHIP_RS740_796C */
|
||||
0x796D, /* PCI_CHIP_RS740_796D */
|
||||
0x796E, /* PCI_CHIP_RS740_796E */
|
||||
0x796F, /* PCI_CHIP_RS740_796F */
|
||||
};
|
||||
|
||||
const int r600_chip_ids[] = {
|
||||
0x9400, /* PCI_CHIP_R600_9400 */
|
||||
0x9401, /* PCI_CHIP_R600_9401 */
|
||||
0x9402, /* PCI_CHIP_R600_9402 */
|
||||
0x9403, /* PCI_CHIP_R600_9403 */
|
||||
0x9405, /* PCI_CHIP_R600_9405 */
|
||||
0x940A, /* PCI_CHIP_R600_940A */
|
||||
0x940B, /* PCI_CHIP_R600_940B */
|
||||
0x940F, /* PCI_CHIP_R600_940F */
|
||||
0x94C0, /* PCI_CHIP_RV610_94C0 */
|
||||
0x94C1, /* PCI_CHIP_RV610_94C1 */
|
||||
0x94C3, /* PCI_CHIP_RV610_94C3 */
|
||||
0x94C4, /* PCI_CHIP_RV610_94C4 */
|
||||
0x94C5, /* PCI_CHIP_RV610_94C5 */
|
||||
0x94C6, /* PCI_CHIP_RV610_94C6 */
|
||||
0x94C7, /* PCI_CHIP_RV610_94C7 */
|
||||
0x94C8, /* PCI_CHIP_RV610_94C8 */
|
||||
0x94C9, /* PCI_CHIP_RV610_94C9 */
|
||||
0x94CB, /* PCI_CHIP_RV610_94CB */
|
||||
0x94CC, /* PCI_CHIP_RV610_94CC */
|
||||
0x94CD, /* PCI_CHIP_RV610_94CD */
|
||||
0x9580, /* PCI_CHIP_RV630_9580 */
|
||||
0x9581, /* PCI_CHIP_RV630_9581 */
|
||||
0x9583, /* PCI_CHIP_RV630_9583 */
|
||||
0x9586, /* PCI_CHIP_RV630_9586 */
|
||||
0x9587, /* PCI_CHIP_RV630_9587 */
|
||||
0x9588, /* PCI_CHIP_RV630_9588 */
|
||||
0x9589, /* PCI_CHIP_RV630_9589 */
|
||||
0x958A, /* PCI_CHIP_RV630_958A */
|
||||
0x958B, /* PCI_CHIP_RV630_958B */
|
||||
0x958C, /* PCI_CHIP_RV630_958C */
|
||||
0x958D, /* PCI_CHIP_RV630_958D */
|
||||
0x958E, /* PCI_CHIP_RV630_958E */
|
||||
0x958F, /* PCI_CHIP_RV630_958F */
|
||||
0x9500, /* PCI_CHIP_RV670_9500 */
|
||||
0x9501, /* PCI_CHIP_RV670_9501 */
|
||||
0x9504, /* PCI_CHIP_RV670_9504 */
|
||||
0x9505, /* PCI_CHIP_RV670_9505 */
|
||||
0x9506, /* PCI_CHIP_RV670_9506 */
|
||||
0x9507, /* PCI_CHIP_RV670_9507 */
|
||||
0x9508, /* PCI_CHIP_RV670_9508 */
|
||||
0x9509, /* PCI_CHIP_RV670_9509 */
|
||||
0x950F, /* PCI_CHIP_RV670_950F */
|
||||
0x9511, /* PCI_CHIP_RV670_9511 */
|
||||
0x9515, /* PCI_CHIP_RV670_9515 */
|
||||
0x9517, /* PCI_CHIP_RV670_9517 */
|
||||
0x9519, /* PCI_CHIP_RV670_9519 */
|
||||
0x95C0, /* PCI_CHIP_RV620_95C0 */
|
||||
0x95C2, /* PCI_CHIP_RV620_95C2 */
|
||||
0x95C4, /* PCI_CHIP_RV620_95C4 */
|
||||
0x95C5, /* PCI_CHIP_RV620_95C5 */
|
||||
0x95C6, /* PCI_CHIP_RV620_95C6 */
|
||||
0x95C7, /* PCI_CHIP_RV620_95C7 */
|
||||
0x95C9, /* PCI_CHIP_RV620_95C9 */
|
||||
0x95CC, /* PCI_CHIP_RV620_95CC */
|
||||
0x95CD, /* PCI_CHIP_RV620_95CD */
|
||||
0x95CE, /* PCI_CHIP_RV620_95CE */
|
||||
0x95CF, /* PCI_CHIP_RV620_95CF */
|
||||
0x9590, /* PCI_CHIP_RV635_9590 */
|
||||
0x9591, /* PCI_CHIP_RV635_9591 */
|
||||
0x9593, /* PCI_CHIP_RV635_9593 */
|
||||
0x9595, /* PCI_CHIP_RV635_9595 */
|
||||
0x9596, /* PCI_CHIP_RV635_9596 */
|
||||
0x9597, /* PCI_CHIP_RV635_9597 */
|
||||
0x9598, /* PCI_CHIP_RV635_9598 */
|
||||
0x9599, /* PCI_CHIP_RV635_9599 */
|
||||
0x959B, /* PCI_CHIP_RV635_959B */
|
||||
0x9610, /* PCI_CHIP_RS780_9610 */
|
||||
0x9611, /* PCI_CHIP_RS780_9611 */
|
||||
0x9612, /* PCI_CHIP_RS780_9612 */
|
||||
0x9613, /* PCI_CHIP_RS780_9613 */
|
||||
0x9614, /* PCI_CHIP_RS780_9614 */
|
||||
0x9615, /* PCI_CHIP_RS780_9615 */
|
||||
0x9616, /* PCI_CHIP_RS780_9616 */
|
||||
0x9710, /* PCI_CHIP_RS880_9710 */
|
||||
0x9711, /* PCI_CHIP_RS880_9711 */
|
||||
0x9712, /* PCI_CHIP_RS880_9712 */
|
||||
0x9713, /* PCI_CHIP_RS880_9713 */
|
||||
0x9714, /* PCI_CHIP_RS880_9714 */
|
||||
0x9715, /* PCI_CHIP_RS880_9715 */
|
||||
0x9440, /* PCI_CHIP_RV770_9440 */
|
||||
0x9441, /* PCI_CHIP_RV770_9441 */
|
||||
0x9442, /* PCI_CHIP_RV770_9442 */
|
||||
0x9443, /* PCI_CHIP_RV770_9443 */
|
||||
0x9444, /* PCI_CHIP_RV770_9444 */
|
||||
0x9446, /* PCI_CHIP_RV770_9446 */
|
||||
0x944A, /* PCI_CHIP_RV770_944A */
|
||||
0x944B, /* PCI_CHIP_RV770_944B */
|
||||
0x944C, /* PCI_CHIP_RV770_944C */
|
||||
0x944E, /* PCI_CHIP_RV770_944E */
|
||||
0x9450, /* PCI_CHIP_RV770_9450 */
|
||||
0x9452, /* PCI_CHIP_RV770_9452 */
|
||||
0x9456, /* PCI_CHIP_RV770_9456 */
|
||||
0x945A, /* PCI_CHIP_RV770_945A */
|
||||
0x945B, /* PCI_CHIP_RV770_945B */
|
||||
0x945E, /* PCI_CHIP_RV770_945E */
|
||||
0x9460, /* PCI_CHIP_RV790_9460 */
|
||||
0x9462, /* PCI_CHIP_RV790_9462 */
|
||||
0x946A, /* PCI_CHIP_RV770_946A */
|
||||
0x946B, /* PCI_CHIP_RV770_946B */
|
||||
0x947A, /* PCI_CHIP_RV770_947A */
|
||||
0x947B, /* PCI_CHIP_RV770_947B */
|
||||
0x9480, /* PCI_CHIP_RV730_9480 */
|
||||
0x9487, /* PCI_CHIP_RV730_9487 */
|
||||
0x9488, /* PCI_CHIP_RV730_9488 */
|
||||
0x9489, /* PCI_CHIP_RV730_9489 */
|
||||
0x948A, /* PCI_CHIP_RV730_948A */
|
||||
0x948F, /* PCI_CHIP_RV730_948F */
|
||||
0x9490, /* PCI_CHIP_RV730_9490 */
|
||||
0x9491, /* PCI_CHIP_RV730_9491 */
|
||||
0x9495, /* PCI_CHIP_RV730_9495 */
|
||||
0x9498, /* PCI_CHIP_RV730_9498 */
|
||||
0x949C, /* PCI_CHIP_RV730_949C */
|
||||
0x949E, /* PCI_CHIP_RV730_949E */
|
||||
0x949F, /* PCI_CHIP_RV730_949F */
|
||||
0x9540, /* PCI_CHIP_RV710_9540 */
|
||||
0x9541, /* PCI_CHIP_RV710_9541 */
|
||||
0x9542, /* PCI_CHIP_RV710_9542 */
|
||||
0x954E, /* PCI_CHIP_RV710_954E */
|
||||
0x954F, /* PCI_CHIP_RV710_954F */
|
||||
0x9552, /* PCI_CHIP_RV710_9552 */
|
||||
0x9553, /* PCI_CHIP_RV710_9553 */
|
||||
0x9555, /* PCI_CHIP_RV710_9555 */
|
||||
0x9557, /* PCI_CHIP_RV710_9557 */
|
||||
0x955F, /* PCI_CHIP_RV710_955F */
|
||||
0x94A0, /* PCI_CHIP_RV740_94A0 */
|
||||
0x94A1, /* PCI_CHIP_RV740_94A1 */
|
||||
0x94A3, /* PCI_CHIP_RV740_94A3 */
|
||||
0x94B1, /* PCI_CHIP_RV740_94B1 */
|
||||
0x94B3, /* PCI_CHIP_RV740_94B3 */
|
||||
0x94B4, /* PCI_CHIP_RV740_94B4 */
|
||||
0x94B5, /* PCI_CHIP_RV740_94B5 */
|
||||
0x94B9, /* PCI_CHIP_RV740_94B9 */
|
||||
0x68E0, /* PCI_CHIP_CEDAR_68E0 */
|
||||
0x68E1, /* PCI_CHIP_CEDAR_68E1 */
|
||||
0x68E4, /* PCI_CHIP_CEDAR_68E4 */
|
||||
0x68E5, /* PCI_CHIP_CEDAR_68E5 */
|
||||
0x68E8, /* PCI_CHIP_CEDAR_68E8 */
|
||||
0x68E9, /* PCI_CHIP_CEDAR_68E9 */
|
||||
0x68F1, /* PCI_CHIP_CEDAR_68F1 */
|
||||
0x68F8, /* PCI_CHIP_CEDAR_68F8 */
|
||||
0x68F9, /* PCI_CHIP_CEDAR_68F9 */
|
||||
0x68FE, /* PCI_CHIP_CEDAR_68FE */
|
||||
0x68C0, /* PCI_CHIP_REDWOOD_68C0 */
|
||||
0x68C1, /* PCI_CHIP_REDWOOD_68C1 */
|
||||
0x68C8, /* PCI_CHIP_REDWOOD_68C8 */
|
||||
0x68C9, /* PCI_CHIP_REDWOOD_68C9 */
|
||||
0x68D8, /* PCI_CHIP_REDWOOD_68D8 */
|
||||
0x68D9, /* PCI_CHIP_REDWOOD_68D9 */
|
||||
0x68DA, /* PCI_CHIP_REDWOOD_68DA */
|
||||
0x68DE, /* PCI_CHIP_REDWOOD_68DE */
|
||||
0x68A0, /* PCI_CHIP_JUNIPER_68A0 */
|
||||
0x68A1, /* PCI_CHIP_JUNIPER_68A1 */
|
||||
0x68A8, /* PCI_CHIP_JUNIPER_68A8 */
|
||||
0x68A9, /* PCI_CHIP_JUNIPER_68A9 */
|
||||
0x68B0, /* PCI_CHIP_JUNIPER_68B0 */
|
||||
0x68B8, /* PCI_CHIP_JUNIPER_68B8 */
|
||||
0x68B9, /* PCI_CHIP_JUNIPER_68B9 */
|
||||
0x68BE, /* PCI_CHIP_JUNIPER_68BE */
|
||||
0x6880, /* PCI_CHIP_CYPRESS_6880 */
|
||||
0x6888, /* PCI_CHIP_CYPRESS_6888 */
|
||||
0x6889, /* PCI_CHIP_CYPRESS_6889 */
|
||||
0x688A, /* PCI_CHIP_CYPRESS_688A */
|
||||
0x6898, /* PCI_CHIP_CYPRESS_6898 */
|
||||
0x6899, /* PCI_CHIP_CYPRESS_6899 */
|
||||
0x689E, /* PCI_CHIP_CYPRESS_689E */
|
||||
0x689C, /* PCI_CHIP_HEMLOCK_689C */
|
||||
0x689D, /* PCI_CHIP_HEMLOCK_689D */
|
||||
0x9802, /* PCI_CHIP_PALM_9802 */
|
||||
0x9803, /* PCI_CHIP_PALM_9803 */
|
||||
0x9804, /* PCI_CHIP_PALM_9804 */
|
||||
0x9805, /* PCI_CHIP_PALM_9805 */
|
||||
0x6720, /* PCI_CHIP_BARTS_6720 */
|
||||
0x6721, /* PCI_CHIP_BARTS_6721 */
|
||||
0x6722, /* PCI_CHIP_BARTS_6722 */
|
||||
0x6723, /* PCI_CHIP_BARTS_6723 */
|
||||
0x6724, /* PCI_CHIP_BARTS_6724 */
|
||||
0x6725, /* PCI_CHIP_BARTS_6725 */
|
||||
0x6726, /* PCI_CHIP_BARTS_6726 */
|
||||
0x6727, /* PCI_CHIP_BARTS_6727 */
|
||||
0x6728, /* PCI_CHIP_BARTS_6728 */
|
||||
0x6729, /* PCI_CHIP_BARTS_6729 */
|
||||
0x6738, /* PCI_CHIP_BARTS_6738 */
|
||||
0x6739, /* PCI_CHIP_BARTS_6738 */
|
||||
0x6740, /* PCI_CHIP_TURKS_6740 */
|
||||
0x6741, /* PCI_CHIP_TURKS_6741 */
|
||||
0x6742, /* PCI_CHIP_TURKS_6742 */
|
||||
0x6743, /* PCI_CHIP_TURKS_6743 */
|
||||
0x6744, /* PCI_CHIP_TURKS_6744 */
|
||||
0x6745, /* PCI_CHIP_TURKS_6745 */
|
||||
0x6746, /* PCI_CHIP_TURKS_6746 */
|
||||
0x6747, /* PCI_CHIP_TURKS_6747 */
|
||||
0x6748, /* PCI_CHIP_TURKS_6748 */
|
||||
0x6749, /* PCI_CHIP_TURKS_6749 */
|
||||
0x6750, /* PCI_CHIP_TURKS_6750 */
|
||||
0x6758, /* PCI_CHIP_TURKS_6758 */
|
||||
0x6759, /* PCI_CHIP_TURKS_6759 */
|
||||
0x6760, /* PCI_CHIP_CAICOS_6760 */
|
||||
0x6761, /* PCI_CHIP_CAICOS_6761 */
|
||||
0x6762, /* PCI_CHIP_CAICOS_6762 */
|
||||
0x6763, /* PCI_CHIP_CAICOS_6763 */
|
||||
0x6764, /* PCI_CHIP_CAICOS_6764 */
|
||||
0x6765, /* PCI_CHIP_CAICOS_6765 */
|
||||
0x6766, /* PCI_CHIP_CAICOS_6766 */
|
||||
0x6767, /* PCI_CHIP_CAICOS_6767 */
|
||||
0x6768, /* PCI_CHIP_CAICOS_6768 */
|
||||
0x6770, /* PCI_CHIP_CAICOS_6770 */
|
||||
0x6779, /* PCI_CHIP_CAICOS_6779 */
|
||||
};
|
||||
|
||||
const struct dri2_driver_map driver_map[] = {
|
||||
{ 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
|
||||
{ 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
|
||||
{ 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
|
||||
{ 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
|
||||
{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
|
||||
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
|
||||
{ 0x10de, "nouveau", NULL, -1 },
|
||||
};
|
||||
|
||||
static char *
|
||||
dri2_get_device_name(int fd)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct gbm_dri_bo *dri_bo = gbm_dri_bo((struct gbm_bo *) buffer);
|
||||
struct dri2_egl_image *dri2_img;
|
||||
struct udev *udev;
|
||||
struct udev_device *device;
|
||||
struct stat buf;
|
||||
char *device_name;
|
||||
|
||||
dri2_img = malloc(sizeof *dri2_img);
|
||||
if (!dri2_img) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_create_image_khr_pixmap");
|
||||
return NULL;
|
||||
udev = udev_new();
|
||||
if (fstat(fd, &buf) < 0) {
|
||||
_eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!_eglInitImage(&dri2_img->base, disp)) {
|
||||
free(dri2_img);
|
||||
return NULL;
|
||||
device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
|
||||
if (device == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"EGL-DRI2: could not create udev device for fd %d", fd);
|
||||
goto out;
|
||||
}
|
||||
|
||||
dri2_img->dri_image = dri2_dpy->image->dupImage(dri_bo->image, dri2_img);
|
||||
if (dri2_img->dri_image == NULL) {
|
||||
free(dri2_img);
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_create_image_khr_pixmap");
|
||||
return NULL;
|
||||
}
|
||||
device_name = udev_device_get_devnode(device);
|
||||
if (!device_name)
|
||||
goto out;
|
||||
device_name = strdup(device_name);
|
||||
|
||||
return &dri2_img->base;
|
||||
out:
|
||||
udev_device_unref(device);
|
||||
udev_unref(udev);
|
||||
|
||||
return device_name;
|
||||
}
|
||||
|
||||
static _EGLImage *
|
||||
dri2_drm_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx, EGLenum target,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
char *
|
||||
dri2_get_driver_for_fd(int fd)
|
||||
{
|
||||
(void) drv;
|
||||
struct udev *udev;
|
||||
struct udev_device *device, *parent;
|
||||
struct stat buf;
|
||||
const char *pci_id;
|
||||
char *driver = NULL;
|
||||
int vendor_id, chip_id, i, j;
|
||||
|
||||
switch (target) {
|
||||
case EGL_NATIVE_PIXMAP_KHR:
|
||||
return dri2_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
|
||||
default:
|
||||
return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
|
||||
udev = udev_new();
|
||||
if (fstat(fd, &buf) < 0) {
|
||||
_eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd);
|
||||
goto out;
|
||||
}
|
||||
|
||||
device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
|
||||
if (device == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"EGL-DRI2: could not create udev device for fd %d", fd);
|
||||
goto out;
|
||||
}
|
||||
|
||||
parent = udev_device_get_parent(device);
|
||||
if (parent == NULL) {
|
||||
_eglLog(_EGL_WARNING, "DRI2: could not get parent device");
|
||||
goto out;
|
||||
}
|
||||
|
||||
pci_id = udev_device_get_property_value(parent, "PCI_ID");
|
||||
if (pci_id == NULL || sscanf(pci_id, "%x:%x", &vendor_id, &chip_id) != 2) {
|
||||
_eglLog(_EGL_WARNING, "EGL-DRI2: malformed or no PCI ID");
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(driver_map); i++) {
|
||||
if (vendor_id != driver_map[i].vendor_id)
|
||||
continue;
|
||||
if (driver_map[i].num_chips_ids == -1) {
|
||||
driver = strdup(driver_map[i].driver);
|
||||
_eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
|
||||
fd, vendor_id, chip_id, driver);
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (j = 0; j < driver_map[i].num_chips_ids; j++)
|
||||
if (driver_map[i].chip_ids[j] == chip_id) {
|
||||
driver = strdup(driver_map[i].driver);
|
||||
_eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
|
||||
fd, vendor_id, chip_id, driver);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
udev_device_unref(device);
|
||||
udev_unref(udev);
|
||||
|
||||
return driver;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -89,58 +674,59 @@ EGLBoolean
|
||||
dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
struct gbm_device *gbm;
|
||||
int i;
|
||||
|
||||
dri2_dpy = malloc(sizeof *dri2_dpy);
|
||||
if (!dri2_dpy)
|
||||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
|
||||
memset(dri2_dpy, 0, sizeof *dri2_dpy);
|
||||
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
dri2_dpy->fd = (int) disp->PlatformDisplay;
|
||||
|
||||
gbm = (struct gbm_device *) disp->PlatformDisplay;
|
||||
if (strcmp(gbm_device_get_backend_name(gbm), "drm") != 0) {
|
||||
free(dri2_dpy);
|
||||
return EGL_FALSE;
|
||||
dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
|
||||
if (dri2_dpy->driver_name == NULL)
|
||||
return _eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name");
|
||||
|
||||
dri2_dpy->device_name = dri2_get_device_name(dri2_dpy->fd);
|
||||
if (dri2_dpy->device_name == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "DRI2: failed to get device name");
|
||||
goto cleanup_driver_name;
|
||||
}
|
||||
|
||||
dri2_dpy->gbm_dri = gbm_dri_device(gbm);
|
||||
if (dri2_dpy->gbm_dri->base.type != GBM_DRM_DRIVER_TYPE_DRI) {
|
||||
free(dri2_dpy);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
if (!dri2_load_driver(disp))
|
||||
goto cleanup_device_name;
|
||||
|
||||
dri2_dpy->fd = gbm_device_get_fd(gbm);
|
||||
dri2_dpy->device_name = dri2_get_device_name_for_fd(dri2_dpy->fd);
|
||||
dri2_dpy->driver_name = dri2_dpy->gbm_dri->base.driver_name;
|
||||
dri2_dpy->extensions[0] = &image_lookup_extension.base;
|
||||
dri2_dpy->extensions[1] = &use_invalidate.base;
|
||||
dri2_dpy->extensions[2] = NULL;
|
||||
|
||||
dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen;
|
||||
dri2_dpy->core = dri2_dpy->gbm_dri->core;
|
||||
dri2_dpy->dri2 = dri2_dpy->gbm_dri->dri2;
|
||||
dri2_dpy->image = dri2_dpy->gbm_dri->image;
|
||||
dri2_dpy->driver_configs = dri2_dpy->gbm_dri->driver_configs;
|
||||
|
||||
dri2_dpy->gbm_dri->lookup_image = dri2_lookup_egl_image;
|
||||
dri2_dpy->gbm_dri->lookup_user_data = disp;
|
||||
|
||||
dri2_setup_screen(disp);
|
||||
if (!dri2_create_screen(disp))
|
||||
goto cleanup_driver;
|
||||
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++)
|
||||
dri2_add_config(disp, dri2_dpy->driver_configs[i],
|
||||
i + 1, 0, 0, NULL);
|
||||
|
||||
drv->API.CreateImageKHR = dri2_drm_create_image_khr;
|
||||
dri2_add_config(disp, dri2_dpy->driver_configs[i], i + 1, 0, 0, NULL);
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
|
||||
#endif
|
||||
dri2_dpy->authenticate = dri2_drm_authenticate;
|
||||
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
|
||||
return EGL_TRUE;
|
||||
|
||||
cleanup_driver:
|
||||
dlclose(dri2_dpy->driver);
|
||||
cleanup_device_name:
|
||||
free(dri2_dpy->device_name);
|
||||
cleanup_driver_name:
|
||||
free(dri2_dpy->driver_name);
|
||||
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -32,8 +32,6 @@
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <xf86drm.h>
|
||||
|
||||
#include "egl_dri2.h"
|
||||
|
||||
@@ -59,29 +57,6 @@ force_roundtrip(struct wl_display *display)
|
||||
wl_display_iterate(display, WL_DISPLAY_READABLE);
|
||||
}
|
||||
|
||||
static void
|
||||
wl_buffer_release(void *data, struct wl_buffer *buffer)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = data;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < WL_BUFFER_COUNT; ++i)
|
||||
if (dri2_surf->wl_drm_buffer[i] == buffer)
|
||||
break;
|
||||
|
||||
assert(i <= WL_BUFFER_COUNT);
|
||||
|
||||
/* not found? */
|
||||
if (i == WL_BUFFER_COUNT)
|
||||
return;
|
||||
|
||||
dri2_surf->wl_buffer_lock[i] = 0;
|
||||
|
||||
}
|
||||
|
||||
static struct wl_buffer_listener wl_buffer_listener = {
|
||||
wl_buffer_release
|
||||
};
|
||||
|
||||
/**
|
||||
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
|
||||
@@ -108,16 +83,13 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
|
||||
goto cleanup_surf;
|
||||
|
||||
for (i = 0; i < WL_BUFFER_COUNT; ++i) {
|
||||
for (i = 0; i < WL_BUFFER_COUNT; ++i)
|
||||
dri2_surf->wl_drm_buffer[i] = NULL;
|
||||
dri2_surf->wl_buffer_lock[i] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < __DRI_BUFFER_COUNT; ++i)
|
||||
dri2_surf->dri_buffers[i] = NULL;
|
||||
|
||||
dri2_surf->pending_buffer = NULL;
|
||||
dri2_surf->third_buffer = NULL;
|
||||
dri2_surf->block_swap_buffers = EGL_FALSE;
|
||||
|
||||
switch (type) {
|
||||
@@ -135,7 +107,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
dri2_surf->base.Width = dri2_surf->wl_pix->width;
|
||||
dri2_surf->base.Height = dri2_surf->wl_pix->height;
|
||||
|
||||
if (dri2_surf->wl_pix->driver_private) {
|
||||
if (dri2_surf->wl_pix->name > 0) {
|
||||
dri2_buf = dri2_surf->wl_pix->driver_private;
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] = dri2_buf->dri_buffer;
|
||||
}
|
||||
@@ -213,11 +185,6 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->dri_buffers[i]);
|
||||
|
||||
if (dri2_surf->third_buffer) {
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->third_buffer);
|
||||
}
|
||||
|
||||
free(surf);
|
||||
|
||||
return EGL_TRUE;
|
||||
@@ -237,23 +204,7 @@ dri2_wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
|
||||
|
||||
egl_pixmap->driver_private = NULL;
|
||||
egl_pixmap->destroy = NULL;
|
||||
}
|
||||
|
||||
static struct wl_buffer *
|
||||
wayland_create_buffer(struct dri2_egl_surface *dri2_surf,
|
||||
__DRIbuffer *buffer,
|
||||
struct wl_visual *visual)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
struct wl_buffer *buf;
|
||||
|
||||
buf = wl_drm_create_buffer(dri2_dpy->wl_drm, buffer->name,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height,
|
||||
buffer->pitch, visual);
|
||||
wl_buffer_add_listener(buf, &wl_buffer_listener, dri2_surf);
|
||||
|
||||
return buf;
|
||||
egl_pixmap->name = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -267,8 +218,6 @@ dri2_process_back_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
|
||||
switch (dri2_surf->type) {
|
||||
case DRI2_WINDOW_SURFACE:
|
||||
/* allocate a front buffer for our double-buffered window*/
|
||||
if (dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] != NULL)
|
||||
break;
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] =
|
||||
dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
|
||||
__DRI_BUFFER_FRONT_LEFT, format,
|
||||
@@ -295,6 +244,8 @@ dri2_process_front_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
|
||||
dri2_buf->dri_buffer = dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT];
|
||||
dri2_buf->dri2_dpy = dri2_dpy;
|
||||
|
||||
dri2_surf->wl_pix->name = dri2_buf->dri_buffer->name;
|
||||
dri2_surf->wl_pix->stride = dri2_buf->dri_buffer->pitch;
|
||||
dri2_surf->wl_pix->driver_private = dri2_buf;
|
||||
dri2_surf->wl_pix->destroy = dri2_wl_egl_pixmap_destroy;
|
||||
break;
|
||||
@@ -326,20 +277,14 @@ dri2_release_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
int i;
|
||||
|
||||
if (dri2_surf->third_buffer) {
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->third_buffer);
|
||||
dri2_surf->third_buffer = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < __DRI_BUFFER_COUNT; ++i) {
|
||||
if (dri2_surf->dri_buffers[i]) {
|
||||
switch (i) {
|
||||
case __DRI_BUFFER_FRONT_LEFT:
|
||||
if (dri2_surf->pending_buffer)
|
||||
force_roundtrip(dri2_dpy->wl_dpy);
|
||||
force_roundtrip(dri2_dpy->wl_dpy->display);
|
||||
dri2_surf->pending_buffer = dri2_surf->dri_buffers[i];
|
||||
wl_display_sync_callback(dri2_dpy->wl_dpy,
|
||||
wl_display_sync_callback(dri2_dpy->wl_dpy->display,
|
||||
dri2_release_pending_buffer, dri2_surf);
|
||||
break;
|
||||
default:
|
||||
@@ -352,76 +297,6 @@ dri2_release_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
pointer_swap(const void **p1, const void **p2)
|
||||
{
|
||||
const void *tmp = *p1;
|
||||
*p1 = *p2;
|
||||
*p2 = tmp;
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_third_buffer(struct dri2_egl_surface *dri2_surf)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
|
||||
if (dri2_surf->third_buffer == NULL)
|
||||
return;
|
||||
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->third_buffer);
|
||||
dri2_surf->third_buffer = NULL;
|
||||
|
||||
if (dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD])
|
||||
wl_buffer_destroy(dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD]);
|
||||
dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD] = NULL;
|
||||
dri2_surf->wl_buffer_lock[WL_BUFFER_THIRD] = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
swap_wl_buffers(struct dri2_egl_surface *dri2_surf,
|
||||
enum wayland_buffer_type a, enum wayland_buffer_type b)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
tmp = dri2_surf->wl_buffer_lock[a];
|
||||
dri2_surf->wl_buffer_lock[a] = dri2_surf->wl_buffer_lock[b];
|
||||
dri2_surf->wl_buffer_lock[b] = tmp;
|
||||
|
||||
pointer_swap((const void **) &dri2_surf->wl_drm_buffer[a],
|
||||
(const void **) &dri2_surf->wl_drm_buffer[b]);
|
||||
}
|
||||
|
||||
static void
|
||||
swap_back_and_third(struct dri2_egl_surface *dri2_surf)
|
||||
{
|
||||
if (dri2_surf->wl_buffer_lock[WL_BUFFER_THIRD])
|
||||
destroy_third_buffer(dri2_surf);
|
||||
|
||||
pointer_swap((const void **) &dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT],
|
||||
(const void **) &dri2_surf->third_buffer);
|
||||
|
||||
swap_wl_buffers(dri2_surf, WL_BUFFER_BACK, WL_BUFFER_THIRD);
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_prior_buffer_creation(struct dri2_egl_surface *dri2_surf,
|
||||
unsigned int type)
|
||||
{
|
||||
switch (type) {
|
||||
case __DRI_BUFFER_BACK_LEFT:
|
||||
if (dri2_surf->wl_buffer_lock[WL_BUFFER_BACK])
|
||||
swap_back_and_third(dri2_surf);
|
||||
else if (dri2_surf->third_buffer)
|
||||
destroy_third_buffer(dri2_surf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static __DRIbuffer *
|
||||
dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
int *width, int *height,
|
||||
@@ -448,7 +323,6 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
if (dri2_surf->wl_drm_buffer[i])
|
||||
wl_buffer_destroy(dri2_surf->wl_drm_buffer[i]);
|
||||
dri2_surf->wl_drm_buffer[i] = NULL;
|
||||
dri2_surf->wl_buffer_lock[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,8 +331,6 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
assert(attachments[i] < __DRI_BUFFER_COUNT);
|
||||
assert(dri2_surf->buffer_count < 5);
|
||||
|
||||
dri2_prior_buffer_creation(dri2_surf, attachments[i]);
|
||||
|
||||
if (dri2_surf->dri_buffers[attachments[i]] == NULL) {
|
||||
|
||||
dri2_surf->dri_buffers[attachments[i]] =
|
||||
@@ -485,12 +357,6 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
assert(dri2_surf->type == DRI2_PIXMAP_SURFACE ||
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
|
||||
|
||||
if (dri2_surf->type == DRI2_PIXMAP_SURFACE && !dri2_surf->wl_pix->buffer)
|
||||
dri2_surf->wl_pix->buffer =
|
||||
wayland_create_buffer(dri2_surf,
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT],
|
||||
dri2_surf->wl_pix->visual);
|
||||
|
||||
*out_count = dri2_surf->buffer_count;
|
||||
if (dri2_surf->buffer_count == 0)
|
||||
return NULL;
|
||||
@@ -551,6 +417,17 @@ dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct wl_buffer *
|
||||
wayland_create_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
|
||||
return wl_drm_create_buffer(dri2_dpy->wl_dpy->drm, buffer->name,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height,
|
||||
buffer->pitch, dri2_surf->wl_win->visual);
|
||||
}
|
||||
|
||||
static void
|
||||
wayland_frame_callback(struct wl_surface *surface, void *data, uint32_t time)
|
||||
{
|
||||
@@ -559,6 +436,14 @@ wayland_frame_callback(struct wl_surface *surface, void *data, uint32_t time)
|
||||
dri2_surf->block_swap_buffers = EGL_FALSE;
|
||||
}
|
||||
|
||||
static inline void
|
||||
pointer_swap(const void **p1, const void **p2)
|
||||
{
|
||||
const void *tmp = *p1;
|
||||
*p1 = *p2;
|
||||
*p2 = tmp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglSwapBuffers(), drv->API.SwapBuffers().
|
||||
*/
|
||||
@@ -570,12 +455,12 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
|
||||
|
||||
while (dri2_surf->block_swap_buffers)
|
||||
wl_display_iterate(dri2_dpy->wl_dpy, WL_DISPLAY_READABLE);
|
||||
wl_display_iterate(dri2_dpy->wl_dpy->display, WL_DISPLAY_READABLE);
|
||||
|
||||
dri2_surf->block_swap_buffers = EGL_TRUE;
|
||||
wl_display_frame_callback(dri2_dpy->wl_dpy,
|
||||
dri2_surf->wl_win->surface,
|
||||
wayland_frame_callback, dri2_surf);
|
||||
wl_display_frame_callback(dri2_dpy->wl_dpy->display,
|
||||
dri2_surf->wl_win->surface,
|
||||
wayland_frame_callback, dri2_surf);
|
||||
|
||||
if (dri2_surf->type == DRI2_WINDOW_SURFACE) {
|
||||
pointer_swap(
|
||||
@@ -587,20 +472,17 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->attachment =
|
||||
__DRI_BUFFER_BACK_LEFT;
|
||||
|
||||
swap_wl_buffers(dri2_surf, WL_BUFFER_FRONT, WL_BUFFER_BACK);
|
||||
pointer_swap((const void **) &dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],
|
||||
(const void **) &dri2_surf->wl_drm_buffer[WL_BUFFER_BACK]);
|
||||
|
||||
if (!dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT])
|
||||
dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT] =
|
||||
wayland_create_buffer(dri2_surf,
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT],
|
||||
dri2_surf->wl_win->visual);
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]);
|
||||
|
||||
wl_buffer_damage(dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT], 0, 0,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
wl_surface_attach(dri2_surf->wl_win->surface,
|
||||
dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],
|
||||
dri2_surf->dx, dri2_surf->dy);
|
||||
dri2_surf->wl_buffer_lock[WL_BUFFER_FRONT] = 1;
|
||||
|
||||
dri2_surf->wl_win->attached_width = dri2_surf->base.Width;
|
||||
dri2_surf->wl_win->attached_height = dri2_surf->base.Height;
|
||||
@@ -654,23 +536,18 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
wl_egl_pixmap->width,
|
||||
wl_egl_pixmap->height);
|
||||
|
||||
wl_egl_pixmap->name = dri2_buf->dri_buffer->name;
|
||||
wl_egl_pixmap->stride = dri2_buf->dri_buffer->pitch;
|
||||
wl_egl_pixmap->destroy = dri2_wl_egl_pixmap_destroy;
|
||||
wl_egl_pixmap->driver_private = dri2_buf;
|
||||
|
||||
wl_egl_pixmap->buffer =
|
||||
wl_drm_create_buffer(dri2_dpy->wl_drm,
|
||||
dri2_buf->dri_buffer->name,
|
||||
wl_egl_pixmap->width,
|
||||
wl_egl_pixmap->height,
|
||||
dri2_buf->dri_buffer->pitch,
|
||||
wl_egl_pixmap->visual);
|
||||
|
||||
wl_attr_list[1] = wl_egl_pixmap->width;
|
||||
wl_attr_list[3] = wl_egl_pixmap->height;
|
||||
wl_attr_list[5] = dri2_buf->dri_buffer->pitch / 4;
|
||||
wl_attr_list[5] = wl_egl_pixmap->stride / 4;
|
||||
|
||||
|
||||
return dri2_create_image_khr(disp->Driver, disp, ctx, EGL_DRM_BUFFER_MESA,
|
||||
(EGLClientBuffer)(intptr_t) dri2_buf->dri_buffer->name, wl_attr_list);
|
||||
(EGLClientBuffer)(intptr_t) wl_egl_pixmap->name, wl_attr_list);
|
||||
}
|
||||
|
||||
static _EGLImage *
|
||||
@@ -694,16 +571,16 @@ dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
int ret = 0;
|
||||
|
||||
dri2_dpy->authenticated = 0;
|
||||
dri2_dpy->wl_dpy->authenticated = false;
|
||||
|
||||
wl_drm_authenticate(dri2_dpy->wl_drm, id);
|
||||
force_roundtrip(dri2_dpy->wl_dpy);
|
||||
wl_drm_authenticate(dri2_dpy->wl_dpy->drm, id);
|
||||
force_roundtrip(dri2_dpy->wl_dpy->display);
|
||||
|
||||
if (!dri2_dpy->authenticated)
|
||||
if (!dri2_dpy->wl_dpy->authenticated)
|
||||
ret = -1;
|
||||
|
||||
/* reset authenticated */
|
||||
dri2_dpy->authenticated = 1;
|
||||
dri2_dpy->wl_dpy->authenticated = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -729,45 +606,10 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = data;
|
||||
drm_magic_t magic;
|
||||
|
||||
dri2_dpy->device_name = strdup(device);
|
||||
if (!dri2_dpy->device_name)
|
||||
return;
|
||||
|
||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
|
||||
if (dri2_dpy->fd == -1) {
|
||||
_eglLog(_EGL_WARNING, "wayland-egl: could not open %s (%s)",
|
||||
dri2_dpy->device_name, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
drmGetMagic(dri2_dpy->fd, &magic);
|
||||
wl_drm_authenticate(dri2_dpy->wl_drm, magic);
|
||||
}
|
||||
|
||||
static void
|
||||
drm_handle_authenticated(void *data, struct wl_drm *drm)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = data;
|
||||
|
||||
dri2_dpy->authenticated = 1;
|
||||
}
|
||||
|
||||
static const struct wl_drm_listener drm_listener = {
|
||||
drm_handle_device,
|
||||
drm_handle_authenticated
|
||||
};
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
uint32_t id;
|
||||
int i;
|
||||
|
||||
drv->API.CreateWindowSurface = dri2_create_window_surface;
|
||||
@@ -784,31 +626,23 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
memset(dri2_dpy, 0, sizeof *dri2_dpy);
|
||||
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
if (disp->PlatformDisplay == NULL) {
|
||||
dri2_dpy->wl_dpy = wl_display_connect(NULL);
|
||||
if (dri2_dpy->wl_dpy == NULL)
|
||||
goto cleanup_dpy;
|
||||
} else {
|
||||
dri2_dpy->wl_dpy = disp->PlatformDisplay;
|
||||
dri2_dpy->wl_dpy = disp->PlatformDisplay;
|
||||
|
||||
if (dri2_dpy->wl_dpy->fd == -1)
|
||||
force_roundtrip(dri2_dpy->wl_dpy->display);
|
||||
if (dri2_dpy->wl_dpy->fd == -1)
|
||||
goto cleanup_dpy;
|
||||
|
||||
dri2_dpy->fd = dup(dri2_dpy->wl_dpy->fd);
|
||||
if (dri2_dpy->fd < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "DRI2: failed to dup fd");
|
||||
goto cleanup_dpy;
|
||||
}
|
||||
|
||||
id = wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
|
||||
if (id == 0)
|
||||
force_roundtrip(dri2_dpy->wl_dpy);
|
||||
id = wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
|
||||
if (id == 0)
|
||||
if (!dri2_dpy->wl_dpy->authenticated)
|
||||
force_roundtrip(dri2_dpy->wl_dpy->display);
|
||||
if (!dri2_dpy->wl_dpy->authenticated)
|
||||
goto cleanup_dpy;
|
||||
dri2_dpy->wl_drm = wl_drm_create(dri2_dpy->wl_dpy, id, 1);
|
||||
if (!dri2_dpy->wl_drm)
|
||||
goto cleanup_dpy;
|
||||
wl_drm_add_listener(dri2_dpy->wl_drm, &drm_listener, dri2_dpy);
|
||||
force_roundtrip(dri2_dpy->wl_dpy);
|
||||
if (dri2_dpy->fd == -1)
|
||||
goto cleanup_drm;
|
||||
|
||||
force_roundtrip(dri2_dpy->wl_dpy);
|
||||
if (!dri2_dpy->authenticated)
|
||||
goto cleanup_fd;
|
||||
|
||||
dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
|
||||
if (dri2_dpy->driver_name == NULL) {
|
||||
@@ -816,8 +650,14 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
goto cleanup_fd;
|
||||
}
|
||||
|
||||
if (!dri2_load_driver(disp))
|
||||
dri2_dpy->device_name = strdup(dri2_dpy->wl_dpy->device_name);
|
||||
if (dri2_dpy->device_name == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "DRI2: failed to get device name");
|
||||
goto cleanup_driver_name;
|
||||
}
|
||||
|
||||
if (!dri2_load_driver(disp))
|
||||
goto cleanup_device_name;
|
||||
|
||||
dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
|
||||
dri2_dpy->dri2_loader_extension.base.version = 3;
|
||||
@@ -828,8 +668,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
|
||||
dri2_dpy->extensions[1] = &image_lookup_extension.base;
|
||||
dri2_dpy->extensions[2] = &use_invalidate.base;
|
||||
dri2_dpy->extensions[3] = NULL;
|
||||
dri2_dpy->extensions[2] = NULL;
|
||||
|
||||
if (!dri2_create_screen(disp))
|
||||
goto cleanup_driver;
|
||||
@@ -852,13 +691,12 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
cleanup_driver:
|
||||
dlclose(dri2_dpy->driver);
|
||||
cleanup_device_name:
|
||||
free(dri2_dpy->device_name);
|
||||
cleanup_driver_name:
|
||||
free(dri2_dpy->driver_name);
|
||||
cleanup_fd:
|
||||
close(dri2_dpy->fd);
|
||||
cleanup_drm:
|
||||
free(dri2_dpy->device_name);
|
||||
wl_drm_destroy(dri2_dpy->wl_drm);
|
||||
cleanup_dpy:
|
||||
free(dri2_dpy);
|
||||
|
||||
|
@@ -479,19 +479,10 @@ dri2_connect(struct dri2_egl_display *dri2_dpy)
|
||||
xcb_generic_error_t *error;
|
||||
xcb_screen_iterator_t s;
|
||||
char *driver_name, *device_name;
|
||||
const xcb_query_extension_reply_t *extension;
|
||||
|
||||
xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_xfixes_id);
|
||||
xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_dri2_id);
|
||||
|
||||
extension = xcb_get_extension_data(dri2_dpy->conn, &xcb_xfixes_id);
|
||||
if (!(extension && extension->present))
|
||||
return EGL_FALSE;
|
||||
|
||||
extension = xcb_get_extension_data(dri2_dpy->conn, &xcb_dri2_id);
|
||||
if (!(extension && extension->present))
|
||||
return EGL_FALSE;
|
||||
|
||||
xfixes_query_cookie = xcb_xfixes_query_version(dri2_dpy->conn,
|
||||
XCB_XFIXES_MAJOR_VERSION,
|
||||
XCB_XFIXES_MINOR_VERSION);
|
||||
@@ -793,7 +784,7 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
|
||||
(void) ctx;
|
||||
|
||||
drawable = (xcb_drawable_t) (uintptr_t) buffer;
|
||||
drawable = (xcb_drawable_t) buffer;
|
||||
xcb_dri2_create_drawable (dri2_dpy->conn, drawable);
|
||||
attachments[0] = XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT;
|
||||
buffers_cookie =
|
||||
@@ -915,7 +906,9 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
goto cleanup_dpy;
|
||||
}
|
||||
|
||||
if (!dri2_load_driver_swrast(disp))
|
||||
dri2_dpy->driver_name = dri2_strndup("swrast", strlen("swrast"));
|
||||
|
||||
if (!dri2_load_driver(disp))
|
||||
goto cleanup_conn;
|
||||
|
||||
dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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
|
||||
@@ -12,19 +10,19 @@
|
||||
* 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 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.
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
|
@@ -58,20 +58,11 @@ LOCAL_LIBS =
|
||||
ifeq ($(filter dri2, $(EGL_DRIVERS_DIRS)),dri2)
|
||||
LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
|
||||
LOCAL_LIBS += $(TOP)/src/egl/drivers/dri2/libegl_dri2.a
|
||||
ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
|
||||
EGL_LIB_DEPS += $(XCB_DRI2_LIBS)
|
||||
endif
|
||||
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||
EGL_LIB_DEPS += -lgbm
|
||||
endif
|
||||
EGL_LIB_DEPS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) $(WAYLAND_LIBS)
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
LOCAL_LIBS += $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
|
||||
endif
|
||||
|
||||
EGL_LIB_DEPS += $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) $(WAYLAND_LIBS)
|
||||
endif
|
||||
ifeq ($(filter glx, $(EGL_DRIVERS_DIRS)),glx)
|
||||
LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
|
||||
LOCAL_LIBS += $(TOP)/src/egl/drivers/glx/libegl_glx.a
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Public EGL API entrypoints
|
||||
*
|
||||
@@ -944,7 +914,7 @@ eglGetProcAddress(const char *procname)
|
||||
{ "eglCreateDRMImageMESA", (_EGLProc) eglCreateDRMImageMESA },
|
||||
{ "eglExportDRMImageMESA", (_EGLProc) eglExportDRMImageMESA },
|
||||
#endif
|
||||
#ifdef EGL_WL_bind_wayland_display
|
||||
#ifdef EGL_WL_bind_display
|
||||
{ "eglBindWaylandDisplayWL", (_EGLProc) eglBindWaylandDisplayWL },
|
||||
{ "eglUnbindWaylandDisplayWL", (_EGLProc) eglUnbindWaylandDisplayWL },
|
||||
#endif
|
||||
@@ -1198,7 +1168,7 @@ eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode)
|
||||
EGLDisplay EGLAPIENTRY
|
||||
eglGetDRMDisplayMESA(int fd)
|
||||
{
|
||||
_EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) (intptr_t) fd);
|
||||
_EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) fd);
|
||||
return _eglGetDisplayHandle(dpy);
|
||||
}
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLAPI_INCLUDED
|
||||
#define EGLAPI_INCLUDED
|
||||
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLARRAY_INCLUDED
|
||||
#define EGLARRAY_INCLUDED
|
||||
|
||||
|
@@ -1,32 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLCOMPILER_INCLUDED
|
||||
#define EGLCOMPILER_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* EGL Configuration (pixel format) functions.
|
||||
*/
|
||||
@@ -486,6 +456,8 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
|
||||
return EGL_FALSE;
|
||||
|
||||
switch (attr) {
|
||||
case EGL_MATCH_NATIVE_PIXMAP:
|
||||
return EGL_FALSE;
|
||||
case EGL_Y_INVERTED_NOK:
|
||||
return conf->Display->Extensions.NOK_texture_from_pixmap;
|
||||
default:
|
||||
@@ -767,16 +739,6 @@ _eglGetConfigAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
|
||||
{
|
||||
if (!_eglIsConfigAttribValid(conf, attribute))
|
||||
return _eglError(EGL_BAD_ATTRIBUTE, "eglGetConfigAttrib");
|
||||
|
||||
/* nonqueryable attributes */
|
||||
switch (attribute) {
|
||||
case EGL_MATCH_NATIVE_PIXMAP:
|
||||
return _eglError(EGL_BAD_ATTRIBUTE, "eglGetConfigAttrib");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!value)
|
||||
return _eglError(EGL_BAD_PARAMETER, "eglGetConfigAttrib");
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLCONFIG_INCLUDED
|
||||
#define EGLCONFIG_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLCONTEXT_INCLUDED
|
||||
#define EGLCONTEXT_INCLUDED
|
||||
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "egllog.h"
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLCURRENT_INCLUDED
|
||||
#define EGLCURRENT_INCLUDED
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* 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
|
||||
@@ -10,22 +10,23 @@
|
||||
* 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 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.
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal EGL defines
|
||||
*/
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Functions related to EGLDisplay.
|
||||
*/
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLDISPLAY_INCLUDED
|
||||
#define EGLDISPLAY_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Functions for choosing and opening/loading device drivers.
|
||||
*/
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLDRIVER_INCLUDED
|
||||
#define EGLDRIVER_INCLUDED
|
||||
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include "egltypedefs.h"
|
||||
#include "egldriver.h"
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include "eglglobals.h"
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLGLOBALS_INCLUDED
|
||||
#define EGLGLOBALS_INCLUDED
|
||||
|
||||
|
@@ -1,32 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@@ -1,32 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLIMAGE_INCLUDED
|
||||
#define EGLIMAGE_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Logging facility for debug/info messages.
|
||||
* _EGL_FATAL messages are printed to stderr
|
||||
|
@@ -1,32 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLLOG_INCLUDED
|
||||
#define EGLLOG_INCLUDED
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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
|
||||
@@ -12,19 +10,19 @@
|
||||
* 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 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.
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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
|
||||
@@ -12,19 +10,19 @@
|
||||
* 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 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.
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLMODE_INCLUDED
|
||||
#define EGLMODE_INCLUDED
|
||||
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009 Chia-I Wu <olvaffe@gmail.com>
|
||||
* 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLMUTEX_INCLUDED
|
||||
#define EGLMUTEX_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* Ideas for screen management extension to EGL.
|
||||
*
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLSCREEN_INCLUDED
|
||||
#define EGLSCREEN_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* String utils.
|
||||
*/
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010-2011 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLSTRING_INCLUDED
|
||||
#define EGLSTRING_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Surface-related functions.
|
||||
*/
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLSURFACE_INCLUDED
|
||||
#define EGLSURFACE_INCLUDED
|
||||
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "eglsync.h"
|
||||
|
@@ -1,31 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLSYNC_INCLUDED
|
||||
#define EGLSYNC_INCLUDED
|
||||
|
||||
|
@@ -1,33 +1,3 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
||||
* Copyright 2010 LunarG, 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 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef EGLTYPEDEFS_INCLUDED
|
||||
#define EGLTYPEDEFS_INCLUDED
|
||||
|
||||
|
@@ -34,7 +34,6 @@ depend:
|
||||
clean:
|
||||
rm -rf libwayland-drm.a $(wayland_drm_OBJECTS) \
|
||||
$(GEN_SOURCES) $(GEN_HEADERS)
|
||||
rm -f depend depend.bak
|
||||
|
||||
install:
|
||||
@echo -n ""
|
||||
|
@@ -2,13 +2,7 @@
|
||||
<protocol name="drm">
|
||||
<!-- drm support. This object is created by the server and published
|
||||
using the display's global event. -->
|
||||
<interface name="wl_drm" version="1">
|
||||
<enum name="error">
|
||||
<entry name="authenticate_fail" value="0"/>
|
||||
<entry name="invalid_visual" value="1"/>
|
||||
<entry name="invalid_name" value="2"/>
|
||||
</enum>
|
||||
|
||||
<interface name="drm" version="1">
|
||||
<!-- Call this request with the magic received from drmGetMagic().
|
||||
It will be passed on to the drmAuthMagic() or
|
||||
DRIAuthConnection() call. This authentication must be
|
||||
@@ -20,12 +14,12 @@
|
||||
<!-- Create a wayland buffer for the named DRM buffer. The DRM
|
||||
surface must have a name using the flink ioctl -->
|
||||
<request name="create_buffer">
|
||||
<arg name="id" type="new_id" interface="wl_buffer"/>
|
||||
<arg name="id" type="new_id" interface="buffer"/>
|
||||
<arg name="name" type="uint"/>
|
||||
<arg name="width" type="int"/>
|
||||
<arg name="height" type="int"/>
|
||||
<arg name="stride" type="uint"/>
|
||||
<arg name="visual" type="object" interface="wl_visual"/>
|
||||
<arg name="visual" type="object" interface="visual"/>
|
||||
</request>
|
||||
|
||||
<!-- Notification of the path of the drm device which is used by
|
||||
|
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2011 Kristian Høgsberg
|
||||
* Copyright © 2011 Benjamin Franzke
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -36,26 +35,25 @@
|
||||
#include "wayland-drm.h"
|
||||
#include "wayland-drm-server-protocol.h"
|
||||
|
||||
#include "egldisplay.h"
|
||||
#include "egldriver.h"
|
||||
#include "eglimage.h"
|
||||
#include "egltypedefs.h"
|
||||
|
||||
struct wl_drm {
|
||||
struct wl_object object;
|
||||
struct wl_display *display;
|
||||
|
||||
void *user_data;
|
||||
_EGLDisplay *edisp;
|
||||
|
||||
char *device_name;
|
||||
|
||||
struct wayland_drm_callbacks *callbacks;
|
||||
};
|
||||
|
||||
struct wl_drm_buffer {
|
||||
struct wl_buffer buffer;
|
||||
struct wl_drm *drm;
|
||||
|
||||
void *driver_buffer;
|
||||
authenticate_t authenticate;
|
||||
};
|
||||
|
||||
static void
|
||||
buffer_damage(struct wl_client *client, struct wl_buffer *buffer,
|
||||
int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
drm_buffer_damage(struct wl_buffer *buffer_base,
|
||||
struct wl_surface *surface,
|
||||
int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -63,21 +61,19 @@ static void
|
||||
destroy_buffer(struct wl_resource *resource, struct wl_client *client)
|
||||
{
|
||||
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) resource;
|
||||
struct wl_drm *drm = buffer->drm;
|
||||
_EGLDriver *drv = buffer->drm->edisp->Driver;
|
||||
|
||||
drm->callbacks->release_buffer(drm->user_data,
|
||||
buffer->driver_buffer);
|
||||
drv->API.DestroyImageKHR(drv, buffer->drm->edisp, buffer->image);
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
static void
|
||||
buffer_destroy(struct wl_client *client, struct wl_buffer *buffer)
|
||||
{
|
||||
wl_resource_destroy(&buffer->resource, client, 0);
|
||||
wl_resource_destroy(&buffer->resource, client);
|
||||
}
|
||||
|
||||
const static struct wl_buffer_interface drm_buffer_interface = {
|
||||
buffer_damage,
|
||||
const static struct wl_buffer_interface buffer_interface = {
|
||||
buffer_destroy
|
||||
};
|
||||
|
||||
@@ -87,42 +83,62 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm,
|
||||
uint32_t stride, struct wl_visual *visual)
|
||||
{
|
||||
struct wl_drm_buffer *buffer;
|
||||
EGLint attribs[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_DRM_BUFFER_STRIDE_MESA, 0,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
_EGLDriver *drv = drm->edisp->Driver;
|
||||
|
||||
buffer = calloc(1, sizeof *buffer);
|
||||
buffer = malloc(sizeof *buffer);
|
||||
if (buffer == NULL) {
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
||||
buffer->drm = drm;
|
||||
buffer->buffer.compositor = NULL;
|
||||
buffer->buffer.width = width;
|
||||
buffer->buffer.height = height;
|
||||
buffer->buffer.visual = visual;
|
||||
buffer->buffer.client = client;
|
||||
buffer->buffer.attach = NULL;
|
||||
buffer->buffer.damage = drm_buffer_damage;
|
||||
|
||||
if (!visual || visual->object.interface != &wl_visual_interface) {
|
||||
wl_client_post_error(client, &drm->object,
|
||||
WL_DRM_ERROR_INVALID_VISUAL,
|
||||
"invalid visual");
|
||||
if (visual->object.interface != &wl_visual_interface) {
|
||||
/* FIXME: Define a real exception event instead of
|
||||
* abusing this one */
|
||||
wl_client_post_event(client,
|
||||
(struct wl_object *) drm->display,
|
||||
WL_DISPLAY_INVALID_OBJECT, 0);
|
||||
fprintf(stderr, "invalid visual in create_buffer\n");
|
||||
return;
|
||||
}
|
||||
|
||||
buffer->driver_buffer =
|
||||
drm->callbacks->reference_buffer(drm->user_data, name,
|
||||
width, height,
|
||||
stride, visual);
|
||||
attribs[1] = width;
|
||||
attribs[3] = height;
|
||||
attribs[5] = stride / 4;
|
||||
buffer->image = drv->API.CreateImageKHR(drv, drm->edisp,
|
||||
EGL_NO_CONTEXT,
|
||||
EGL_DRM_BUFFER_MESA,
|
||||
(EGLClientBuffer) (intptr_t) name,
|
||||
attribs);
|
||||
|
||||
if (buffer->driver_buffer == NULL) {
|
||||
wl_client_post_error(client, &drm->object,
|
||||
WL_DRM_ERROR_INVALID_NAME,
|
||||
"invalid name");
|
||||
if (buffer->image == NULL) {
|
||||
/* FIXME: Define a real exception event instead of
|
||||
* abusing this one */
|
||||
wl_client_post_event(client,
|
||||
(struct wl_object *) drm->display,
|
||||
WL_DISPLAY_INVALID_OBJECT, 0);
|
||||
fprintf(stderr, "failed to create image for name %d\n", name);
|
||||
return;
|
||||
}
|
||||
|
||||
buffer->buffer.resource.object.id = id;
|
||||
buffer->buffer.resource.object.interface = &wl_buffer_interface;
|
||||
buffer->buffer.resource.object.implementation = (void (**)(void))
|
||||
&drm_buffer_interface;
|
||||
&buffer_interface;
|
||||
|
||||
buffer->buffer.resource.destroy = destroy_buffer;
|
||||
|
||||
@@ -133,10 +149,10 @@ static void
|
||||
drm_authenticate(struct wl_client *client,
|
||||
struct wl_drm *drm, uint32_t id)
|
||||
{
|
||||
if (drm->callbacks->authenticate(drm->user_data, id) < 0)
|
||||
wl_client_post_error(client, &drm->object,
|
||||
WL_DRM_ERROR_AUTHENTICATE_FAIL,
|
||||
"authenicate failed");
|
||||
if (drm->authenticate(drm->edisp, id) < 0)
|
||||
wl_client_post_event(client,
|
||||
(struct wl_object *) drm->display,
|
||||
WL_DISPLAY_INVALID_OBJECT, 0);
|
||||
else
|
||||
wl_client_post_event(client, &drm->object,
|
||||
WL_DRM_AUTHENTICATED);
|
||||
@@ -148,8 +164,7 @@ const static struct wl_drm_interface drm_interface = {
|
||||
};
|
||||
|
||||
static void
|
||||
post_drm_device(struct wl_client *client,
|
||||
struct wl_object *global, uint32_t version)
|
||||
post_drm_device(struct wl_client *client, struct wl_object *global)
|
||||
{
|
||||
struct wl_drm *drm = (struct wl_drm *) global;
|
||||
|
||||
@@ -157,17 +172,17 @@ post_drm_device(struct wl_client *client,
|
||||
}
|
||||
|
||||
struct wl_drm *
|
||||
wayland_drm_init(struct wl_display *display, char *device_name,
|
||||
struct wayland_drm_callbacks *callbacks, void *user_data)
|
||||
wayland_drm_init(struct wl_display *display, _EGLDisplay *disp,
|
||||
authenticate_t authenticate, char *device_name)
|
||||
{
|
||||
struct wl_drm *drm;
|
||||
|
||||
drm = malloc(sizeof *drm);
|
||||
|
||||
drm->display = display;
|
||||
drm->edisp = disp;
|
||||
drm->authenticate = authenticate;
|
||||
drm->device_name = strdup(device_name);
|
||||
drm->callbacks = callbacks;
|
||||
drm->user_data = user_data;
|
||||
|
||||
drm->object.interface = &wl_drm_interface;
|
||||
drm->object.implementation = (void (**)(void)) &drm_interface;
|
||||
@@ -178,7 +193,7 @@ wayland_drm_init(struct wl_display *display, char *device_name,
|
||||
}
|
||||
|
||||
void
|
||||
wayland_drm_uninit(struct wl_drm *drm)
|
||||
wayland_drm_destroy(struct wl_drm *drm)
|
||||
{
|
||||
free(drm->device_name);
|
||||
|
||||
@@ -186,18 +201,3 @@ wayland_drm_uninit(struct wl_drm *drm)
|
||||
|
||||
free(drm);
|
||||
}
|
||||
|
||||
int
|
||||
wayland_buffer_is_drm(struct wl_buffer *buffer)
|
||||
{
|
||||
return buffer->resource.object.implementation ==
|
||||
(void (**)(void)) &drm_buffer_interface;
|
||||
}
|
||||
|
||||
void *
|
||||
wayland_drm_buffer_get_buffer(struct wl_buffer *buffer_base)
|
||||
{
|
||||
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) buffer_base;
|
||||
|
||||
return buffer->driver_buffer;
|
||||
}
|
||||
|
@@ -8,27 +8,19 @@
|
||||
|
||||
struct wl_drm;
|
||||
|
||||
struct wayland_drm_callbacks {
|
||||
int (*authenticate)(void *user_data, uint32_t id);
|
||||
typedef int (*authenticate_t) (_EGLDisplay *disp, uint32_t id);
|
||||
|
||||
void *(*reference_buffer)(void *user_data, uint32_t name,
|
||||
int32_t width, int32_t height,
|
||||
uint32_t stride, struct wl_visual *visual);
|
||||
|
||||
void (*release_buffer)(void *user_data, void *buffer);
|
||||
struct wl_drm_buffer {
|
||||
struct wl_buffer buffer;
|
||||
struct wl_drm *drm;
|
||||
_EGLImage *image;
|
||||
};
|
||||
|
||||
struct wl_drm *
|
||||
wayland_drm_init(struct wl_display *display, char *device_name,
|
||||
struct wayland_drm_callbacks *callbacks, void *user_data);
|
||||
wayland_drm_init(struct wl_display *display, _EGLDisplay *disp,
|
||||
authenticate_t authenticate, char *device_name);
|
||||
|
||||
void
|
||||
wayland_drm_uninit(struct wl_drm *drm);
|
||||
|
||||
int
|
||||
wayland_buffer_is_drm(struct wl_buffer *buffer);
|
||||
|
||||
void *
|
||||
wayland_drm_buffer_get_buffer(struct wl_buffer *buffer);
|
||||
wayland_drm_destroy(struct wl_drm *drm);
|
||||
|
||||
#endif
|
||||
|
@@ -12,8 +12,20 @@ extern "C" {
|
||||
#define WL_EGL_EXPORT
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <wayland-client.h>
|
||||
|
||||
struct wl_egl_display {
|
||||
struct wl_display *display;
|
||||
|
||||
struct wl_drm *drm;
|
||||
int fd;
|
||||
char *device_name;
|
||||
bool authenticated;
|
||||
|
||||
void (*glFlush)(void);
|
||||
};
|
||||
|
||||
struct wl_egl_window {
|
||||
struct wl_surface *surface;
|
||||
struct wl_visual *visual;
|
||||
@@ -28,11 +40,13 @@ struct wl_egl_window {
|
||||
};
|
||||
|
||||
struct wl_egl_pixmap {
|
||||
struct wl_visual *visual;
|
||||
struct wl_buffer *buffer;
|
||||
struct wl_egl_display *display;
|
||||
struct wl_visual *visual;
|
||||
|
||||
int name;
|
||||
int width;
|
||||
int height;
|
||||
int stride;
|
||||
|
||||
void (*destroy) (struct wl_egl_pixmap *egl_pixmap);
|
||||
|
||||
|
@@ -1,8 +1,130 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include "wayland-egl.h"
|
||||
#include "wayland-egl-priv.h"
|
||||
#include "wayland-drm-client-protocol.h"
|
||||
#include <xf86drm.h>
|
||||
|
||||
static void
|
||||
drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
||||
{
|
||||
struct wl_egl_display *egl_display = data;
|
||||
drm_magic_t magic;
|
||||
|
||||
egl_display->device_name = strdup(device);
|
||||
|
||||
egl_display->fd = open(egl_display->device_name, O_RDWR);
|
||||
|
||||
if (egl_display->fd == -1) {
|
||||
fprintf(stderr, "wayland-egl: could not open %s (%s)",
|
||||
egl_display->device_name, strerror(errno));
|
||||
return;
|
||||
}
|
||||
drmGetMagic(egl_display->fd, &magic);
|
||||
wl_drm_authenticate(egl_display->drm, magic);
|
||||
}
|
||||
|
||||
static void
|
||||
drm_handle_authenticated(void *data, struct wl_drm *drm)
|
||||
{
|
||||
struct wl_egl_display *egl_display = data;
|
||||
|
||||
egl_display->authenticated = true;
|
||||
}
|
||||
|
||||
static const struct wl_drm_listener drm_listener = {
|
||||
drm_handle_device,
|
||||
drm_handle_authenticated
|
||||
};
|
||||
|
||||
static void
|
||||
wl_display_handle_global(struct wl_display *display, uint32_t id,
|
||||
const char *interface, uint32_t version, void *data)
|
||||
{
|
||||
struct wl_egl_display *egl_display = data;
|
||||
|
||||
if (strcmp(interface, "drm") == 0) {
|
||||
egl_display->drm = wl_drm_create(display, id);
|
||||
wl_drm_add_listener(egl_display->drm, &drm_listener,
|
||||
egl_display);
|
||||
}
|
||||
}
|
||||
|
||||
/* stolen from egl_dri2:dri2_load() */
|
||||
static void *
|
||||
get_flush_address() {
|
||||
void *handle;
|
||||
void *(*get_proc_address)(const char *procname);
|
||||
|
||||
handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);
|
||||
if (handle) {
|
||||
get_proc_address = (void* (*)(const char *))
|
||||
dlsym(handle, "_glapi_get_proc_address");
|
||||
/* no need to keep a reference */
|
||||
dlclose(handle);
|
||||
}
|
||||
|
||||
/*
|
||||
* If glapi is not available, loading DRI drivers will fail. Ideally, we
|
||||
* should load one of libGL, libGLESv1_CM, or libGLESv2 and go on. But if
|
||||
* the app has loaded another one of them with RTLD_LOCAL, there may be
|
||||
* unexpected behaviors later because there will be two copies of glapi
|
||||
* (with global variables of the same names!) in the memory.
|
||||
*/
|
||||
if (!get_proc_address) {
|
||||
fprintf(stderr, "failed to find _glapi_get_proc_address");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return get_proc_address("glFlush");
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_egl_display *
|
||||
wl_egl_display_create(struct wl_display *display)
|
||||
{
|
||||
struct wl_egl_display *egl_display;
|
||||
|
||||
egl_display = malloc(sizeof *egl_display);
|
||||
if (!egl_display)
|
||||
return NULL;
|
||||
|
||||
egl_display->display = display;
|
||||
egl_display->drm = NULL;
|
||||
egl_display->fd = -1;
|
||||
egl_display->device_name = NULL;
|
||||
egl_display->authenticated = false;
|
||||
|
||||
egl_display->glFlush = (void (*)(void)) get_flush_address();
|
||||
|
||||
wl_display_add_global_listener(display, wl_display_handle_global,
|
||||
egl_display);
|
||||
|
||||
return egl_display;
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT void
|
||||
wl_egl_display_destroy(struct wl_egl_display *egl_display)
|
||||
{
|
||||
|
||||
free(egl_display->device_name);
|
||||
close(egl_display->fd);
|
||||
|
||||
wl_drm_destroy(egl_display->drm);
|
||||
|
||||
free(egl_display);
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT void
|
||||
wl_egl_window_resize(struct wl_egl_window *egl_window,
|
||||
@@ -16,7 +138,8 @@ wl_egl_window_resize(struct wl_egl_window *egl_window,
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_egl_window *
|
||||
wl_egl_window_create(struct wl_surface *surface,
|
||||
wl_egl_window_create(struct wl_egl_display *egl_display,
|
||||
struct wl_surface *surface,
|
||||
int width, int height,
|
||||
struct wl_visual *visual)
|
||||
{
|
||||
@@ -52,7 +175,8 @@ wl_egl_window_get_attached_size(struct wl_egl_window *egl_window,
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_egl_pixmap *
|
||||
wl_egl_pixmap_create(int width, int height,
|
||||
wl_egl_pixmap_create(struct wl_egl_display *egl_display,
|
||||
int width, int height,
|
||||
struct wl_visual *visual, uint32_t flags)
|
||||
{
|
||||
struct wl_egl_pixmap *egl_pixmap;
|
||||
@@ -61,13 +185,14 @@ wl_egl_pixmap_create(int width, int height,
|
||||
if (egl_pixmap == NULL)
|
||||
return NULL;
|
||||
|
||||
egl_pixmap->display = egl_display;
|
||||
egl_pixmap->width = width;
|
||||
egl_pixmap->height = height;
|
||||
egl_pixmap->visual = visual;
|
||||
egl_pixmap->name = 0;
|
||||
egl_pixmap->stride = 0;
|
||||
|
||||
egl_pixmap->destroy = NULL;
|
||||
egl_pixmap->buffer = NULL;
|
||||
egl_pixmap->driver_private = NULL;
|
||||
|
||||
return egl_pixmap;
|
||||
}
|
||||
@@ -81,7 +206,21 @@ wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_buffer *
|
||||
wl_egl_pixmap_create_buffer(struct wl_egl_pixmap *egl_pixmap)
|
||||
wl_egl_pixmap_create_buffer(struct wl_egl_display *egl_display,
|
||||
struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
return egl_pixmap->buffer;
|
||||
if (egl_pixmap->name == 0)
|
||||
return NULL;
|
||||
|
||||
return wl_drm_create_buffer(egl_display->drm, egl_pixmap->name,
|
||||
egl_pixmap->width, egl_pixmap->height,
|
||||
egl_pixmap->stride, egl_pixmap->visual);
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT void
|
||||
wl_egl_pixmap_flush(struct wl_egl_display *egl_display,
|
||||
struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
if (egl_display->glFlush)
|
||||
egl_display->glFlush();
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ if env['drm']:
|
||||
# Needed by some state trackers
|
||||
SConscript('winsys/sw/null/SConscript')
|
||||
|
||||
if not env['embedded']:
|
||||
if env['platform'] != 'embedded':
|
||||
SConscript('state_trackers/vega/SConscript')
|
||||
SConscript('state_trackers/egl/SConscript')
|
||||
|
||||
@@ -66,8 +66,8 @@ if not env['embedded']:
|
||||
if env['dri'] and env['xorg']:
|
||||
SConscript('state_trackers/xorg/SConscript')
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
SConscript('state_trackers/wgl/SConscript')
|
||||
if env['platform'] == 'windows':
|
||||
SConscript('state_trackers/wgl/SConscript')
|
||||
|
||||
#
|
||||
# Winsys
|
||||
@@ -83,55 +83,55 @@ SConscript([
|
||||
'targets/graw-null/SConscript',
|
||||
])
|
||||
|
||||
if not env['embedded']:
|
||||
if env['platform'] != 'embedded':
|
||||
SConscript([
|
||||
'targets/egl-static/SConscript'
|
||||
])
|
||||
|
||||
if env['x11']:
|
||||
if env['x11']:
|
||||
SConscript([
|
||||
'targets/graw-xlib/SConscript',
|
||||
'targets/libgl-xlib/SConscript',
|
||||
])
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
SConscript([
|
||||
'targets/graw-gdi/SConscript',
|
||||
'targets/libgl-gdi/SConscript',
|
||||
])
|
||||
|
||||
if env['dri']:
|
||||
SConscript([
|
||||
'targets/SConscript.dri',
|
||||
'targets/dri-swrast/SConscript',
|
||||
'targets/dri-vmwgfx/SConscript',
|
||||
#'targets/dri-nouveau/SConscript',
|
||||
])
|
||||
if env['drm_intel']:
|
||||
SConscript([
|
||||
'targets/graw-xlib/SConscript',
|
||||
'targets/libgl-xlib/SConscript',
|
||||
'targets/dri-i915/SConscript',
|
||||
'targets/dri-i965/SConscript',
|
||||
])
|
||||
if env['drm_radeon']:
|
||||
SConscript([
|
||||
'targets/dri-r300/SConscript',
|
||||
'targets/dri-r600/SConscript',
|
||||
])
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
SConscript([
|
||||
'targets/graw-gdi/SConscript',
|
||||
'targets/libgl-gdi/SConscript',
|
||||
])
|
||||
|
||||
if env['dri']:
|
||||
SConscript([
|
||||
'targets/SConscript.dri',
|
||||
'targets/dri-swrast/SConscript',
|
||||
'targets/dri-vmwgfx/SConscript',
|
||||
#'targets/dri-nouveau/SConscript',
|
||||
])
|
||||
if env['drm_intel']:
|
||||
SConscript([
|
||||
'targets/dri-i915/SConscript',
|
||||
'targets/dri-i965/SConscript',
|
||||
])
|
||||
if env['drm_radeon']:
|
||||
SConscript([
|
||||
'targets/dri-r300/SConscript',
|
||||
'targets/dri-r600/SConscript',
|
||||
])
|
||||
|
||||
if env['xorg'] and env['drm']:
|
||||
SConscript([
|
||||
#'targets/xorg-i915/SConscript',
|
||||
#'targets/xorg-i965/SConscript',
|
||||
#'targets/xorg-nouveau/SConscript',
|
||||
#'targets/xorg-radeon/SConscript',
|
||||
'targets/xorg-vmwgfx/SConscript',
|
||||
])
|
||||
if env['xorg'] and env['drm']:
|
||||
SConscript([
|
||||
#'targets/xorg-i915/SConscript',
|
||||
#'targets/xorg-i965/SConscript',
|
||||
#'targets/xorg-nouveau/SConscript',
|
||||
#'targets/xorg-radeon/SConscript',
|
||||
'targets/xorg-vmwgfx/SConscript',
|
||||
])
|
||||
|
||||
|
||||
#
|
||||
# Unit tests & tools
|
||||
#
|
||||
|
||||
if not env['embedded']:
|
||||
if env['platform'] != 'embedded':
|
||||
SConscript('tests/unit/SConscript')
|
||||
SConscript('tests/graw/SConscript')
|
||||
|
@@ -44,7 +44,7 @@ C_SOURCES = \
|
||||
draw/draw_vs_exec.c \
|
||||
draw/draw_vs_ppc.c \
|
||||
draw/draw_vs_sse.c \
|
||||
draw/draw_vs_variant.c \
|
||||
draw/draw_vs_varient.c \
|
||||
indices/u_indices_gen.c \
|
||||
indices/u_unfilled_gen.c \
|
||||
os/os_misc.c \
|
||||
|
@@ -88,7 +88,7 @@ source = [
|
||||
'draw/draw_vs_exec.c',
|
||||
'draw/draw_vs_ppc.c',
|
||||
'draw/draw_vs_sse.c',
|
||||
'draw/draw_vs_variant.c',
|
||||
'draw/draw_vs_varient.c',
|
||||
#'indices/u_indices.c',
|
||||
#'indices/u_unfilled_indices.c',
|
||||
'indices/u_indices_gen.c',
|
||||
|
@@ -37,7 +37,13 @@
|
||||
|
||||
|
||||
struct cso_cache {
|
||||
struct cso_hash *hashes[CSO_CACHE_MAX];
|
||||
struct cso_hash *blend_hash;
|
||||
struct cso_hash *depth_stencil_hash;
|
||||
struct cso_hash *fs_hash;
|
||||
struct cso_hash *vs_hash;
|
||||
struct cso_hash *rasterizer_hash;
|
||||
struct cso_hash *sampler_hash;
|
||||
struct cso_hash *velements_hash;
|
||||
int max_size;
|
||||
|
||||
cso_sanitize_callback sanitize_cb;
|
||||
@@ -80,10 +86,34 @@ unsigned cso_construct_key(void *item, int item_size)
|
||||
return hash_key((item), item_size);
|
||||
}
|
||||
|
||||
static INLINE struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso_cache_type type)
|
||||
static struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso_cache_type type)
|
||||
{
|
||||
struct cso_hash *hash;
|
||||
hash = sc->hashes[type];
|
||||
struct cso_hash *hash = 0;
|
||||
|
||||
switch(type) {
|
||||
case CSO_BLEND:
|
||||
hash = sc->blend_hash;
|
||||
break;
|
||||
case CSO_SAMPLER:
|
||||
hash = sc->sampler_hash;
|
||||
break;
|
||||
case CSO_DEPTH_STENCIL_ALPHA:
|
||||
hash = sc->depth_stencil_hash;
|
||||
break;
|
||||
case CSO_RASTERIZER:
|
||||
hash = sc->rasterizer_hash;
|
||||
break;
|
||||
case CSO_FRAGMENT_SHADER:
|
||||
hash = sc->fs_hash;
|
||||
break;
|
||||
case CSO_VERTEX_SHADER:
|
||||
hash = sc->vs_hash;
|
||||
break;
|
||||
case CSO_VELEMENTS:
|
||||
hash = sc->velements_hash;
|
||||
break;
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -268,14 +298,17 @@ void * cso_take_state(struct cso_cache *sc,
|
||||
struct cso_cache *cso_cache_create(void)
|
||||
{
|
||||
struct cso_cache *sc = MALLOC_STRUCT(cso_cache);
|
||||
int i;
|
||||
if (sc == NULL)
|
||||
return NULL;
|
||||
|
||||
sc->max_size = 4096;
|
||||
for (i = 0; i < CSO_CACHE_MAX; i++)
|
||||
sc->hashes[i] = cso_hash_create();
|
||||
|
||||
sc->blend_hash = cso_hash_create();
|
||||
sc->sampler_hash = cso_hash_create();
|
||||
sc->depth_stencil_hash = cso_hash_create();
|
||||
sc->rasterizer_hash = cso_hash_create();
|
||||
sc->fs_hash = cso_hash_create();
|
||||
sc->vs_hash = cso_hash_create();
|
||||
sc->velements_hash = cso_hash_create();
|
||||
sc->sanitize_cb = sanitize_cb;
|
||||
sc->sanitize_data = 0;
|
||||
|
||||
@@ -285,9 +318,33 @@ struct cso_cache *cso_cache_create(void)
|
||||
void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
|
||||
cso_state_callback func, void *user_data)
|
||||
{
|
||||
struct cso_hash *hash = _cso_hash_for_type(sc, type);
|
||||
struct cso_hash *hash = 0;
|
||||
struct cso_hash_iter iter;
|
||||
|
||||
switch (type) {
|
||||
case CSO_BLEND:
|
||||
hash = sc->blend_hash;
|
||||
break;
|
||||
case CSO_SAMPLER:
|
||||
hash = sc->sampler_hash;
|
||||
break;
|
||||
case CSO_DEPTH_STENCIL_ALPHA:
|
||||
hash = sc->depth_stencil_hash;
|
||||
break;
|
||||
case CSO_RASTERIZER:
|
||||
hash = sc->rasterizer_hash;
|
||||
break;
|
||||
case CSO_FRAGMENT_SHADER:
|
||||
hash = sc->fs_hash;
|
||||
break;
|
||||
case CSO_VERTEX_SHADER:
|
||||
hash = sc->vs_hash;
|
||||
break;
|
||||
case CSO_VELEMENTS:
|
||||
hash = sc->velements_hash;
|
||||
break;
|
||||
}
|
||||
|
||||
iter = cso_hash_first_node(hash);
|
||||
while (!cso_hash_iter_is_null(iter)) {
|
||||
void *state = cso_hash_iter_data(iter);
|
||||
@@ -300,7 +357,6 @@ void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
|
||||
|
||||
void cso_cache_delete(struct cso_cache *sc)
|
||||
{
|
||||
int i;
|
||||
assert(sc);
|
||||
|
||||
if (!sc)
|
||||
@@ -315,20 +371,28 @@ void cso_cache_delete(struct cso_cache *sc)
|
||||
cso_for_each_state(sc, CSO_SAMPLER, delete_sampler_state, 0);
|
||||
cso_for_each_state(sc, CSO_VELEMENTS, delete_velements, 0);
|
||||
|
||||
for (i = 0; i < CSO_CACHE_MAX; i++)
|
||||
cso_hash_delete(sc->hashes[i]);
|
||||
|
||||
cso_hash_delete(sc->blend_hash);
|
||||
cso_hash_delete(sc->sampler_hash);
|
||||
cso_hash_delete(sc->depth_stencil_hash);
|
||||
cso_hash_delete(sc->rasterizer_hash);
|
||||
cso_hash_delete(sc->fs_hash);
|
||||
cso_hash_delete(sc->vs_hash);
|
||||
cso_hash_delete(sc->velements_hash);
|
||||
FREE(sc);
|
||||
}
|
||||
|
||||
void cso_set_maximum_cache_size(struct cso_cache *sc, int number)
|
||||
{
|
||||
int i;
|
||||
|
||||
sc->max_size = number;
|
||||
|
||||
for (i = 0; i < CSO_CACHE_MAX; i++)
|
||||
sanitize_hash(sc, sc->hashes[i], i, sc->max_size);
|
||||
sanitize_hash(sc, sc->blend_hash, CSO_BLEND, sc->max_size);
|
||||
sanitize_hash(sc, sc->depth_stencil_hash, CSO_DEPTH_STENCIL_ALPHA,
|
||||
sc->max_size);
|
||||
sanitize_hash(sc, sc->fs_hash, CSO_FRAGMENT_SHADER, sc->max_size);
|
||||
sanitize_hash(sc, sc->vs_hash, CSO_VERTEX_SHADER, sc->max_size);
|
||||
sanitize_hash(sc, sc->rasterizer_hash, CSO_RASTERIZER, sc->max_size);
|
||||
sanitize_hash(sc, sc->sampler_hash, CSO_SAMPLER, sc->max_size);
|
||||
sanitize_hash(sc, sc->velements_hash, CSO_VELEMENTS, sc->max_size);
|
||||
}
|
||||
|
||||
int cso_maximum_cache_size(const struct cso_cache *sc)
|
||||
|
@@ -86,14 +86,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
enum cso_cache_type {
|
||||
CSO_RASTERIZER,
|
||||
CSO_BLEND,
|
||||
CSO_SAMPLER,
|
||||
CSO_DEPTH_STENCIL_ALPHA,
|
||||
CSO_RASTERIZER,
|
||||
CSO_FRAGMENT_SHADER,
|
||||
CSO_VERTEX_SHADER,
|
||||
CSO_SAMPLER,
|
||||
CSO_VELEMENTS,
|
||||
CSO_CACHE_MAX,
|
||||
CSO_VELEMENTS
|
||||
};
|
||||
|
||||
typedef void (*cso_state_callback)(void *ctx, void *obj);
|
||||
|
@@ -128,8 +128,8 @@ boolean draw_init(struct draw_context *draw)
|
||||
ASSIGN_4V( draw->plane[4], 0, 0, 1, 1 ); /* yes these are correct */
|
||||
ASSIGN_4V( draw->plane[5], 0, 0, -1, 1 ); /* mesa's a bit wonky */
|
||||
draw->nr_planes = 6;
|
||||
draw->clip_xy = TRUE;
|
||||
draw->clip_z = TRUE;
|
||||
draw->clip_xy = 1;
|
||||
draw->clip_z = 1;
|
||||
|
||||
|
||||
draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */
|
||||
|
@@ -243,7 +243,7 @@ boolean draw_need_pipeline(const struct draw_context *draw,
|
||||
unsigned prim );
|
||||
|
||||
static INLINE int
|
||||
draw_get_shader_param(unsigned shader, enum pipe_shader_cap param)
|
||||
draw_get_shader_param(unsigned shader, enum pipe_cap param)
|
||||
{
|
||||
switch(shader) {
|
||||
case PIPE_SHADER_VERTEX:
|
||||
|
@@ -435,7 +435,6 @@ draw_llvm_create_variant(struct draw_llvm *llvm,
|
||||
return variant;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
generate_vs(struct draw_llvm *llvm,
|
||||
LLVMBuilderRef builder,
|
||||
@@ -465,7 +464,8 @@ generate_vs(struct draw_llvm *llvm,
|
||||
tgsi_dump(tokens, 0);
|
||||
}
|
||||
|
||||
if (llvm->draw->num_sampler_views && llvm->draw->num_samplers)
|
||||
if (llvm->draw->num_sampler_views &&
|
||||
llvm->draw->num_samplers)
|
||||
sampler = draw_sampler;
|
||||
|
||||
lp_build_tgsi_soa(llvm->gallivm,
|
||||
@@ -480,7 +480,8 @@ generate_vs(struct draw_llvm *llvm,
|
||||
sampler,
|
||||
&llvm->draw->vs.vertex_shader->info);
|
||||
|
||||
if (clamp_vertex_color) {
|
||||
if(clamp_vertex_color)
|
||||
{
|
||||
LLVMValueRef out;
|
||||
unsigned chan, attrib;
|
||||
struct lp_build_context bld;
|
||||
@@ -488,8 +489,8 @@ generate_vs(struct draw_llvm *llvm,
|
||||
lp_build_context_init(&bld, llvm->gallivm, vs_type);
|
||||
|
||||
for (attrib = 0; attrib < info->num_outputs; ++attrib) {
|
||||
for (chan = 0; chan < NUM_CHANNELS; ++chan) {
|
||||
if (outputs[attrib][chan]) {
|
||||
for(chan = 0; chan < NUM_CHANNELS; ++chan) {
|
||||
if(outputs[attrib][chan]) {
|
||||
switch (info->output_semantic_name[attrib]) {
|
||||
case TGSI_SEMANTIC_COLOR:
|
||||
case TGSI_SEMANTIC_BCOLOR:
|
||||
@@ -504,7 +505,6 @@ generate_vs(struct draw_llvm *llvm,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if DEBUG_STORE
|
||||
static void print_vectorf(LLVMBuilderRef builder,
|
||||
LLVMValueRef vec)
|
||||
@@ -523,7 +523,6 @@ static void print_vectorf(LLVMBuilderRef builder,
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
generate_fetch(struct gallivm_state *gallivm,
|
||||
LLVMValueRef vbuffers_ptr,
|
||||
@@ -567,7 +566,6 @@ generate_fetch(struct gallivm_state *gallivm,
|
||||
*res = draw_llvm_translate_from(gallivm, vbuffer_ptr, velem->src_format);
|
||||
}
|
||||
|
||||
|
||||
static LLVMValueRef
|
||||
aos_to_soa(struct gallivm_state *gallivm,
|
||||
LLVMValueRef val0,
|
||||
@@ -611,7 +609,6 @@ aos_to_soa(struct gallivm_state *gallivm,
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
soa_to_aos(struct gallivm_state *gallivm,
|
||||
LLVMValueRef soa[NUM_CHANNELS],
|
||||
@@ -648,7 +645,6 @@ soa_to_aos(struct gallivm_state *gallivm,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
convert_to_soa(struct gallivm_state *gallivm,
|
||||
LLVMValueRef (*aos)[NUM_CHANNELS],
|
||||
@@ -676,7 +672,6 @@ convert_to_soa(struct gallivm_state *gallivm,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
store_aos(struct gallivm_state *gallivm,
|
||||
LLVMValueRef io_ptr,
|
||||
@@ -753,7 +748,6 @@ store_aos(struct gallivm_state *gallivm,
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
store_aos_array(struct gallivm_state *gallivm,
|
||||
LLVMValueRef io_ptr,
|
||||
@@ -802,7 +796,6 @@ store_aos_array(struct gallivm_state *gallivm,
|
||||
store_aos(gallivm, io3_ptr, attr_index, aos[3], clipmask3);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
convert_to_aos(struct gallivm_state *gallivm,
|
||||
LLVMValueRef io,
|
||||
@@ -820,8 +813,8 @@ convert_to_aos(struct gallivm_state *gallivm,
|
||||
for (attrib = 0; attrib < num_outputs; ++attrib) {
|
||||
LLVMValueRef soa[4];
|
||||
LLVMValueRef aos[4];
|
||||
for (chan = 0; chan < NUM_CHANNELS; ++chan) {
|
||||
if (outputs[attrib][chan]) {
|
||||
for(chan = 0; chan < NUM_CHANNELS; ++chan) {
|
||||
if(outputs[attrib][chan]) {
|
||||
LLVMValueRef out = LLVMBuildLoad(builder, outputs[attrib][chan], "");
|
||||
lp_build_name(out, "output%u.%c", attrib, "xyzw"[chan]);
|
||||
/*lp_build_printf(builder, "output %d : %d ",
|
||||
@@ -829,10 +822,8 @@ convert_to_aos(struct gallivm_state *gallivm,
|
||||
LLVMConstInt(LLVMInt32Type(), chan, 0));
|
||||
print_vectorf(builder, out);*/
|
||||
soa[chan] = out;
|
||||
}
|
||||
else {
|
||||
} else
|
||||
soa[chan] = 0;
|
||||
}
|
||||
}
|
||||
soa_to_aos(gallivm, soa, aos);
|
||||
store_aos_array(gallivm,
|
||||
@@ -847,8 +838,7 @@ convert_to_aos(struct gallivm_state *gallivm,
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Stores original vertex positions in clip coordinates
|
||||
* There is probably a more efficient way to do this, 4 floats at once
|
||||
* rather than extracting each element one by one.
|
||||
@@ -890,7 +880,7 @@ store_clip(struct gallivm_state *gallivm,
|
||||
clip_ptr2 = draw_jit_header_clip(gallivm, io2_ptr);
|
||||
clip_ptr3 = draw_jit_header_clip(gallivm, io3_ptr);
|
||||
|
||||
for (i = 0; i<4; i++) {
|
||||
for (i = 0; i<4; i++){
|
||||
clip0_ptr = LLVMBuildGEP(builder, clip_ptr0, indices, 2, ""); /* x0 */
|
||||
clip1_ptr = LLVMBuildGEP(builder, clip_ptr1, indices, 2, ""); /* x1 */
|
||||
clip2_ptr = LLVMBuildGEP(builder, clip_ptr2, indices, 2, ""); /* x2 */
|
||||
@@ -911,9 +901,7 @@ store_clip(struct gallivm_state *gallivm,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Equivalent of _mm_set1_ps(a)
|
||||
/* Equivalent of _mm_set1_ps(a)
|
||||
*/
|
||||
static LLVMValueRef
|
||||
vec4f_from_scalar(struct gallivm_state *gallivm,
|
||||
@@ -924,7 +912,7 @@ vec4f_from_scalar(struct gallivm_state *gallivm,
|
||||
LLVMValueRef res = LLVMGetUndef(LLVMVectorType(float_type, 4));
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
for(i = 0; i < 4; ++i) {
|
||||
LLVMValueRef index = lp_build_const_int32(gallivm, i);
|
||||
res = LLVMBuildInsertElement(gallivm->builder, res, a,
|
||||
index, i == 3 ? name : "");
|
||||
@@ -933,8 +921,7 @@ vec4f_from_scalar(struct gallivm_state *gallivm,
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Transforms the outputs for viewport mapping
|
||||
*/
|
||||
static void
|
||||
@@ -955,7 +942,7 @@ generate_viewport(struct draw_llvm *llvm,
|
||||
LLVMBuildStore(builder, out3, outputs[0][3]);
|
||||
|
||||
/* Viewport Mapping */
|
||||
for (i=0; i<3; i++) {
|
||||
for (i=0; i<3; i++){
|
||||
LLVMValueRef out = LLVMBuildLoad(builder, outputs[0][i], ""); /*x0 x1 x2 x3*/
|
||||
LLVMValueRef scale;
|
||||
LLVMValueRef trans;
|
||||
@@ -986,7 +973,7 @@ generate_viewport(struct draw_llvm *llvm,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns clipmask as 4xi32 bitmask for the 4 vertices
|
||||
*/
|
||||
static LLVMValueRef
|
||||
@@ -1005,7 +992,9 @@ generate_clipmask(struct gallivm_state *gallivm,
|
||||
LLVMValueRef zero, shift;
|
||||
LLVMValueRef pos_x, pos_y, pos_z, pos_w;
|
||||
LLVMValueRef plane1, planes, plane_ptr, sum;
|
||||
|
||||
unsigned i;
|
||||
|
||||
struct lp_type f32_type = lp_type_float_vec(32);
|
||||
|
||||
mask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
|
||||
@@ -1020,7 +1009,7 @@ generate_clipmask(struct gallivm_state *gallivm,
|
||||
pos_w = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/
|
||||
|
||||
/* Cliptest, for hardwired planes */
|
||||
if (clip_xy) {
|
||||
if (clip_xy){
|
||||
/* plane 1 */
|
||||
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, pos_x , pos_w);
|
||||
temp = shift;
|
||||
@@ -1048,15 +1037,15 @@ generate_clipmask(struct gallivm_state *gallivm,
|
||||
mask = LLVMBuildOr(builder, mask, test, "");
|
||||
}
|
||||
|
||||
if (clip_z) {
|
||||
if (clip_z){
|
||||
temp = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 16);
|
||||
if (clip_halfz) {
|
||||
if (clip_halfz){
|
||||
/* plane 5 */
|
||||
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, pos_z);
|
||||
test = LLVMBuildAnd(builder, test, temp, "");
|
||||
mask = LLVMBuildOr(builder, mask, test, "");
|
||||
}
|
||||
else {
|
||||
else{
|
||||
/* plane 5 */
|
||||
test = LLVMBuildFAdd(builder, pos_z, pos_w, "");
|
||||
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, test);
|
||||
@@ -1070,7 +1059,7 @@ generate_clipmask(struct gallivm_state *gallivm,
|
||||
mask = LLVMBuildOr(builder, mask, test, "");
|
||||
}
|
||||
|
||||
if (clip_user) {
|
||||
if (clip_user){
|
||||
LLVMValueRef planes_ptr = draw_jit_context_planes(gallivm, context_ptr);
|
||||
LLVMValueRef indices[3];
|
||||
temp = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 32);
|
||||
@@ -1116,8 +1105,7 @@ generate_clipmask(struct gallivm_state *gallivm,
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns boolean if any clipping has occurred
|
||||
* Used zero/non-zero i32 value to represent boolean
|
||||
*/
|
||||
@@ -1131,7 +1119,7 @@ clipmask_bool(struct gallivm_state *gallivm,
|
||||
LLVMValueRef temp;
|
||||
int i;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
for (i=0; i<4; i++){
|
||||
temp = LLVMBuildExtractElement(builder, clipmask,
|
||||
lp_build_const_int32(gallivm, i) , "");
|
||||
ret = LLVMBuildOr(builder, ret, temp, "");
|
||||
@@ -1140,7 +1128,6 @@ clipmask_bool(struct gallivm_state *gallivm,
|
||||
LLVMBuildStore(builder, ret, ret_ptr);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
{
|
||||
@@ -1185,8 +1172,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
variant->function = LLVMAddFunction(gallivm->module, "draw_llvm_shader",
|
||||
func_type);
|
||||
LLVMSetFunctionCallConv(variant->function, LLVMCCallConv);
|
||||
for (i = 0; i < Elements(arg_types); ++i)
|
||||
if (LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
|
||||
for(i = 0; i < Elements(arg_types); ++i)
|
||||
if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
|
||||
LLVMAddAttribute(LLVMGetParam(variant->function, i), LLVMNoAliasAttribute);
|
||||
|
||||
context_ptr = LLVMGetParam(variant->function, 0);
|
||||
@@ -1284,7 +1271,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
store_clip(gallivm, io, outputs);
|
||||
|
||||
/* do cliptest */
|
||||
if (enable_cliptest) {
|
||||
if (enable_cliptest){
|
||||
/* allocate clipmask, assign it integer type */
|
||||
clipmask = generate_clipmask(gallivm, outputs,
|
||||
variant->key.clip_xy,
|
||||
@@ -1296,12 +1283,12 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
/* return clipping boolean value for function */
|
||||
clipmask_bool(gallivm, clipmask, ret_ptr);
|
||||
}
|
||||
else {
|
||||
else{
|
||||
clipmask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
|
||||
}
|
||||
|
||||
/* do viewport mapping */
|
||||
if (!bypass_viewport) {
|
||||
if (!bypass_viewport){
|
||||
generate_viewport(llvm, builder, outputs, context_ptr);
|
||||
}
|
||||
|
||||
@@ -1321,7 +1308,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
* Translate the LLVM IR into machine code.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
if (LLVMVerifyFunction(variant->function, LLVMPrintMessageAction)) {
|
||||
if(LLVMVerifyFunction(variant->function, LLVMPrintMessageAction)) {
|
||||
lp_debug_dump_value(variant->function);
|
||||
assert(0);
|
||||
}
|
||||
@@ -1388,8 +1375,8 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
|
||||
|
||||
variant->function_elts = LLVMAddFunction(gallivm->module, "draw_llvm_shader_elts", func_type);
|
||||
LLVMSetFunctionCallConv(variant->function_elts, LLVMCCallConv);
|
||||
for (i = 0; i < Elements(arg_types); ++i)
|
||||
if (LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
|
||||
for(i = 0; i < Elements(arg_types); ++i)
|
||||
if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
|
||||
LLVMAddAttribute(LLVMGetParam(variant->function_elts, i),
|
||||
LLVMNoAliasAttribute);
|
||||
|
||||
@@ -1496,7 +1483,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
|
||||
store_clip(gallivm, io, outputs);
|
||||
|
||||
/* do cliptest */
|
||||
if (enable_cliptest) {
|
||||
if (enable_cliptest){
|
||||
/* allocate clipmask, assign it integer type */
|
||||
clipmask = generate_clipmask(gallivm, outputs,
|
||||
variant->key.clip_xy,
|
||||
@@ -1508,12 +1495,12 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
|
||||
/* return clipping boolean value for function */
|
||||
clipmask_bool(gallivm, clipmask, ret_ptr);
|
||||
}
|
||||
else {
|
||||
else{
|
||||
clipmask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
|
||||
}
|
||||
|
||||
/* do viewport mapping */
|
||||
if (!bypass_viewport) {
|
||||
if (!bypass_viewport){
|
||||
generate_viewport(llvm, builder, outputs, context_ptr);
|
||||
}
|
||||
|
||||
@@ -1536,7 +1523,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
|
||||
* Translate the LLVM IR into machine code.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
if (LLVMVerifyFunction(variant->function_elts, LLVMPrintMessageAction)) {
|
||||
if(LLVMVerifyFunction(variant->function_elts, LLVMPrintMessageAction)) {
|
||||
lp_debug_dump_value(variant->function_elts);
|
||||
assert(0);
|
||||
}
|
||||
@@ -1608,7 +1595,6 @@ draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
draw_llvm_set_mapped_texture(struct draw_context *draw,
|
||||
unsigned sampler_idx,
|
||||
@@ -1623,6 +1609,7 @@ draw_llvm_set_mapped_texture(struct draw_context *draw,
|
||||
|
||||
assert(sampler_idx < PIPE_MAX_VERTEX_SAMPLERS);
|
||||
|
||||
|
||||
jit_tex = &draw->llvm->jit_context.textures[sampler_idx];
|
||||
|
||||
jit_tex->width = width;
|
||||
|
@@ -163,7 +163,6 @@ static void interp( const struct clip_stage *clip,
|
||||
*/
|
||||
static void emit_poly( struct draw_stage *stage,
|
||||
struct vertex_header **inlist,
|
||||
const boolean *edgeflags,
|
||||
unsigned n,
|
||||
const struct prim_header *origPrim)
|
||||
{
|
||||
@@ -182,9 +181,6 @@ static void emit_poly( struct draw_stage *stage,
|
||||
edge_last = DRAW_PIPE_EDGE_FLAG_1;
|
||||
}
|
||||
|
||||
if (!edgeflags[0])
|
||||
edge_first = 0;
|
||||
|
||||
/* later stages may need the determinant, but only the sign matters */
|
||||
header.det = origPrim->det;
|
||||
header.flags = DRAW_PIPE_RESET_STIPPLE | edge_first | edge_middle;
|
||||
@@ -203,11 +199,7 @@ static void emit_poly( struct draw_stage *stage,
|
||||
header.v[2] = inlist[0]; /* the provoking vertex */
|
||||
}
|
||||
|
||||
if (!edgeflags[i-1]) {
|
||||
header.flags &= ~edge_middle;
|
||||
}
|
||||
|
||||
if (i == n - 1 && edgeflags[i])
|
||||
if (i == n-1)
|
||||
header.flags |= edge_last;
|
||||
|
||||
if (0) {
|
||||
@@ -256,33 +248,15 @@ do_clip_tri( struct draw_stage *stage,
|
||||
unsigned tmpnr = 0;
|
||||
unsigned n = 3;
|
||||
unsigned i;
|
||||
boolean aEdges[MAX_CLIPPED_VERTICES];
|
||||
boolean bEdges[MAX_CLIPPED_VERTICES];
|
||||
boolean *inEdges = aEdges;
|
||||
boolean *outEdges = bEdges;
|
||||
|
||||
inlist[0] = header->v[0];
|
||||
inlist[1] = header->v[1];
|
||||
inlist[2] = header->v[2];
|
||||
|
||||
/*
|
||||
* Note: at this point we can't just use the per-vertex edge flags.
|
||||
* We have to observe the edge flag bits set in header->flags which
|
||||
* were set during primitive decomposition. Put those flags into
|
||||
* an edge flags array which parallels the vertex array.
|
||||
* Later, in the 'unfilled' pipeline stage we'll draw the edge if both
|
||||
* the header.flags bit is set AND the per-vertex edgeflag field is set.
|
||||
*/
|
||||
inEdges[0] = !!(header->flags & DRAW_PIPE_EDGE_FLAG_0);
|
||||
inEdges[1] = !!(header->flags & DRAW_PIPE_EDGE_FLAG_1);
|
||||
inEdges[2] = !!(header->flags & DRAW_PIPE_EDGE_FLAG_2);
|
||||
|
||||
while (clipmask && n >= 3) {
|
||||
const unsigned plane_idx = ffs(clipmask)-1;
|
||||
const boolean is_user_clip_plane = plane_idx >= 6;
|
||||
const float *plane = clipper->plane[plane_idx];
|
||||
struct vertex_header *vert_prev = inlist[0];
|
||||
boolean *edge_prev = &inEdges[0];
|
||||
float dp_prev = dot4( vert_prev->clip, plane );
|
||||
unsigned outcount = 0;
|
||||
|
||||
@@ -292,11 +266,9 @@ do_clip_tri( struct draw_stage *stage,
|
||||
if (n >= MAX_CLIPPED_VERTICES)
|
||||
return;
|
||||
inlist[n] = inlist[0]; /* prevent rotation of vertices */
|
||||
inEdges[n] = inEdges[0];
|
||||
|
||||
for (i = 1; i <= n; i++) {
|
||||
struct vertex_header *vert = inlist[i];
|
||||
boolean *edge = &inEdges[i];
|
||||
|
||||
float dp = dot4( vert->clip, plane );
|
||||
|
||||
@@ -304,13 +276,11 @@ do_clip_tri( struct draw_stage *stage,
|
||||
assert(outcount < MAX_CLIPPED_VERTICES);
|
||||
if (outcount >= MAX_CLIPPED_VERTICES)
|
||||
return;
|
||||
outEdges[outcount] = *edge_prev;
|
||||
outlist[outcount++] = vert_prev;
|
||||
}
|
||||
|
||||
if (DIFFERENT_SIGNS(dp, dp_prev)) {
|
||||
struct vertex_header *new_vert;
|
||||
boolean *new_edge;
|
||||
|
||||
assert(tmpnr < MAX_CLIPPED_VERTICES + 1);
|
||||
if (tmpnr >= MAX_CLIPPED_VERTICES + 1)
|
||||
@@ -320,8 +290,6 @@ do_clip_tri( struct draw_stage *stage,
|
||||
assert(outcount < MAX_CLIPPED_VERTICES);
|
||||
if (outcount >= MAX_CLIPPED_VERTICES)
|
||||
return;
|
||||
|
||||
new_edge = &outEdges[outcount];
|
||||
outlist[outcount++] = new_vert;
|
||||
|
||||
if (IS_NEGATIVE(dp)) {
|
||||
@@ -331,22 +299,10 @@ do_clip_tri( struct draw_stage *stage,
|
||||
float t = dp / (dp - dp_prev);
|
||||
interp( clipper, new_vert, t, vert, vert_prev );
|
||||
|
||||
/* Whether or not to set edge flag for the new vert depends
|
||||
* on whether it's a user-defined clipping plane. We're
|
||||
* copying NVIDIA's behaviour here.
|
||||
/* Force edgeflag true in this case:
|
||||
*/
|
||||
if (is_user_clip_plane) {
|
||||
/* we want to see an edge along the clip plane */
|
||||
*new_edge = TRUE;
|
||||
new_vert->edgeflag = TRUE;
|
||||
}
|
||||
else {
|
||||
/* we don't want to see an edge along the frustum clip plane */
|
||||
*new_edge = *edge_prev;
|
||||
new_vert->edgeflag = FALSE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
new_vert->edgeflag = 1;
|
||||
} else {
|
||||
/* Coming back in.
|
||||
*/
|
||||
float t = dp_prev / (dp_prev - dp);
|
||||
@@ -355,12 +311,10 @@ do_clip_tri( struct draw_stage *stage,
|
||||
/* Copy starting vert's edgeflag:
|
||||
*/
|
||||
new_vert->edgeflag = vert_prev->edgeflag;
|
||||
*new_edge = *edge_prev;
|
||||
}
|
||||
}
|
||||
|
||||
vert_prev = vert;
|
||||
edge_prev = edge;
|
||||
dp_prev = dp;
|
||||
}
|
||||
|
||||
@@ -371,12 +325,6 @@ do_clip_tri( struct draw_stage *stage,
|
||||
outlist = tmp;
|
||||
n = outcount;
|
||||
}
|
||||
{
|
||||
boolean *tmp = inEdges;
|
||||
inEdges = outEdges;
|
||||
outEdges = tmp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* If flat-shading, copy provoking vertex color to polygon vertex[0]
|
||||
@@ -405,7 +353,7 @@ do_clip_tri( struct draw_stage *stage,
|
||||
|
||||
/* Emit the polygon as triangles to the setup stage:
|
||||
*/
|
||||
emit_poly( stage, inlist, inEdges, n, header );
|
||||
emit_poly( stage, inlist, n, header );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -341,16 +341,6 @@ vbuf_flush_vertices( struct vbuf_stage *vbuf )
|
||||
vbuf->max_vertices = vbuf->nr_vertices = 0;
|
||||
vbuf->vertex_ptr = vbuf->vertices = NULL;
|
||||
}
|
||||
|
||||
/* Reset point/line/tri function pointers.
|
||||
* If (for example) we transition from points to tris and back to points
|
||||
* again, we need to call the vbuf_first_point() function again to flush
|
||||
* the triangles before drawing more points. This can happen when drawing
|
||||
* with front polygon mode = filled and back polygon mode = line or point.
|
||||
*/
|
||||
vbuf->stage.point = vbuf_first_point;
|
||||
vbuf->stage.line = vbuf_first_line;
|
||||
vbuf->stage.tri = vbuf_first_tri;
|
||||
}
|
||||
|
||||
|
||||
@@ -388,6 +378,10 @@ vbuf_flush( struct draw_stage *stage, unsigned flags )
|
||||
struct vbuf_stage *vbuf = vbuf_stage( stage );
|
||||
|
||||
vbuf_flush_vertices( vbuf );
|
||||
|
||||
stage->point = vbuf_first_point;
|
||||
stage->line = vbuf_first_line;
|
||||
stage->tri = vbuf_first_tri;
|
||||
}
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user