Compare commits
22 Commits
useful
...
android-x8
Author | SHA1 | Date | |
---|---|---|---|
|
f189dfe9e9 | ||
|
d1ccafa5b7 | ||
|
f7a0636329 | ||
|
6269411b81 | ||
|
88721c8555 | ||
|
4128957d30 | ||
|
07a8209c3f | ||
|
b0a79b3512 | ||
|
121fc671f4 | ||
|
8148db591a | ||
|
0d4dcb2584 | ||
|
1337551451 | ||
|
6719d59a85 | ||
|
3fe7753b70 | ||
|
017c563cff | ||
|
bf21df37c6 | ||
|
17935c0191 | ||
|
7aceb74db7 | ||
|
88e9712a68 | ||
|
2e9e27c0f7 | ||
|
455a7585de | ||
|
25ed79d830 |
3
Android.mk
Normal file
3
Android.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
ifneq ($(TARGET_SIMULATOR),true)
|
||||
include $(call all-subdir-makefiles)
|
||||
endif
|
79
Makefile
79
Makefile
@@ -5,10 +5,7 @@ TOP = .
|
||||
SUBDIRS = src
|
||||
|
||||
|
||||
# The git command below generates an empty string when we're not
|
||||
# building in a GIT tree (i.e., building from a release tarball).
|
||||
default: $(TOP)/configs/current
|
||||
@$(TOP)/bin/extract_git_sha1
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1 ; \
|
||||
@@ -183,7 +180,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.11-devel
|
||||
VERSION=7.10-devel
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
GLUT_NAME = MesaGLUT-$(VERSION)
|
||||
@@ -202,7 +199,6 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/aclocal.m4 \
|
||||
$(DIRECTORY)/bin/config.guess \
|
||||
$(DIRECTORY)/bin/config.sub \
|
||||
$(DIRECTORY)/bin/extract_git_sha1 \
|
||||
$(DIRECTORY)/bin/install-sh \
|
||||
$(DIRECTORY)/bin/mklib \
|
||||
$(DIRECTORY)/bin/minstall \
|
||||
@@ -213,6 +209,7 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/docs/README.* \
|
||||
$(DIRECTORY)/docs/RELNOTES* \
|
||||
$(DIRECTORY)/docs/*.spec \
|
||||
$(DIRECTORY)/include/GL/internal/glcore.h \
|
||||
$(DIRECTORY)/include/GL/gl.h \
|
||||
$(DIRECTORY)/include/GL/glext.h \
|
||||
$(DIRECTORY)/include/GL/gl_mangle.h \
|
||||
@@ -235,7 +232,6 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/glsl/README \
|
||||
$(DIRECTORY)/src/glsl/glcpp/*.[chly] \
|
||||
$(DIRECTORY)/src/glsl/glcpp/README \
|
||||
$(DIRECTORY)/src/glsl/builtins \
|
||||
$(DIRECTORY)/src/Makefile \
|
||||
$(DIRECTORY)/src/mesa/Makefile* \
|
||||
$(DIRECTORY)/src/mesa/sources.mak \
|
||||
@@ -287,7 +283,8 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/x86/*.S \
|
||||
$(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/x86-64/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/x86-64/Makefile
|
||||
$(DIRECTORY)/src/mesa/x86-64/Makefile \
|
||||
$(DIRECTORY)/windows/VC8/
|
||||
|
||||
MAPI_FILES = \
|
||||
$(DIRECTORY)/include/GLES/*.h \
|
||||
@@ -311,7 +308,8 @@ MAPI_FILES = \
|
||||
$(DIRECTORY)/src/mapi/mapi/*.[ch] \
|
||||
$(DIRECTORY)/src/mapi/vgapi/Makefile \
|
||||
$(DIRECTORY)/src/mapi/vgapi/vgapi.csv \
|
||||
$(DIRECTORY)/src/mapi/vgapi/vg.pc.in
|
||||
$(DIRECTORY)/src/mapi/vgapi/vg.pc.in \
|
||||
$(DIRECTORY)/src/mapi/vgapi/*.h
|
||||
|
||||
EGL_FILES = \
|
||||
$(DIRECTORY)/include/KHR/*.h \
|
||||
@@ -424,22 +422,10 @@ LIB_FILES = \
|
||||
$(GLW_FILES)
|
||||
|
||||
|
||||
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_parse.tab.c program_parse.tab.h
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
ARCHIVES = $(LIB_NAME).tar.gz \
|
||||
$(LIB_NAME).tar.bz2 \
|
||||
$(LIB_NAME).zip \
|
||||
$(GLUT_NAME).tar.gz \
|
||||
$(GLUT_NAME).tar.bz2 \
|
||||
$(GLUT_NAME).zip
|
||||
tarballs: rm_depend configure aclocal.m4 lib_gz glut_gz \
|
||||
lib_bz2 glut_bz2 lib_zip glut_zip md5
|
||||
|
||||
tarballs: md5
|
||||
rm -f ../$(LIB_NAME).tar
|
||||
|
||||
# Helper for autoconf builds
|
||||
ACLOCAL = aclocal
|
||||
@@ -448,7 +434,7 @@ AUTOCONF = autoconf
|
||||
AC_FLAGS =
|
||||
aclocal.m4: configure.ac acinclude.m4
|
||||
$(ACLOCAL) $(ACLOCAL_FLAGS)
|
||||
configure: rm_depend configure.ac aclocal.m4 acinclude.m4
|
||||
configure: configure.ac aclocal.m4 acinclude.m4
|
||||
$(AUTOCONF) $(AC_FLAGS)
|
||||
|
||||
rm_depend:
|
||||
@@ -457,41 +443,47 @@ rm_depend:
|
||||
touch $$dep ; \
|
||||
done
|
||||
|
||||
rm_config: parsers
|
||||
rm_config:
|
||||
rm -f configs/current
|
||||
rm -f configs/autoconf
|
||||
|
||||
$(LIB_NAME).tar: rm_config
|
||||
cd .. ; tar -cf $(DIRECTORY)/$(LIB_NAME).tar $(LIB_FILES)
|
||||
lib_gz: rm_config
|
||||
cd .. ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
gzip $(LIB_NAME).tar ; \
|
||||
mv $(LIB_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
$(LIB_NAME).tar.gz: $(LIB_NAME).tar
|
||||
gzip --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.gz
|
||||
glut_gz:
|
||||
cd .. ; \
|
||||
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
|
||||
gzip $(GLUT_NAME).tar ; \
|
||||
mv $(GLUT_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
$(GLUT_NAME).tar: rm_depend
|
||||
cd .. ; tar -cf $(DIRECTORY)/$(GLUT_NAME).tar $(GLUT_FILES)
|
||||
lib_bz2: rm_config
|
||||
cd .. ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
bzip2 $(LIB_NAME).tar ; \
|
||||
mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
$(GLUT_NAME).tar.gz: $(GLUT_NAME).tar
|
||||
gzip --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.gz
|
||||
glut_bz2:
|
||||
cd .. ; \
|
||||
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
|
||||
bzip2 $(GLUT_NAME).tar ; \
|
||||
mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
$(LIB_NAME).tar.bz2: $(LIB_NAME).tar
|
||||
bzip2 --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.bz2
|
||||
|
||||
$(GLUT_NAME).tar.bz2: $(GLUT_NAME).tar
|
||||
bzip2 --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.bz2
|
||||
|
||||
$(LIB_NAME).zip: rm_config
|
||||
lib_zip: rm_config
|
||||
rm -f $(LIB_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
|
||||
mv $(LIB_NAME).zip $(DIRECTORY)
|
||||
|
||||
$(GLUT_NAME).zip:
|
||||
glut_zip:
|
||||
rm -f $(GLUT_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
|
||||
mv $(GLUT_NAME).zip $(DIRECTORY)
|
||||
|
||||
md5: $(ARCHIVES)
|
||||
md5:
|
||||
@-md5sum $(LIB_NAME).tar.gz
|
||||
@-md5sum $(LIB_NAME).tar.bz2
|
||||
@-md5sum $(LIB_NAME).zip
|
||||
@@ -499,4 +491,7 @@ md5: $(ARCHIVES)
|
||||
@-md5sum $(GLUT_NAME).tar.bz2
|
||||
@-md5sum $(GLUT_NAME).zip
|
||||
|
||||
.PHONY: tarballs rm_depend rm_config md5
|
||||
.PHONY: tarballs rm_depend rm_config md5 \
|
||||
lib_gz glut_gz \
|
||||
lib_bz2 glut_bz2 \
|
||||
lib_zip glut_zip
|
||||
|
51
SConstruct
51
SConstruct
@@ -56,12 +56,6 @@ else:
|
||||
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
# fail early for a common error on windows
|
||||
if env['gles']:
|
||||
try:
|
||||
import libxml2
|
||||
except ImportError:
|
||||
raise SCons.Errors.UserError, "GLES requires libxml2-python to build"
|
||||
|
||||
#######################################################################
|
||||
# Environment setup
|
||||
@@ -121,52 +115,9 @@ if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
# for debugging
|
||||
#print env.Dump()
|
||||
|
||||
|
||||
#######################################################################
|
||||
# Invoke host SConscripts
|
||||
#
|
||||
# For things that are meant to be run on the native host build machine, instead
|
||||
# of the target machine.
|
||||
#
|
||||
|
||||
# Create host environent
|
||||
if env['crosscompile'] and env['platform'] != 'embedded':
|
||||
host_env = Environment(
|
||||
options = opts,
|
||||
# no tool used
|
||||
tools = [],
|
||||
toolpath = ['#scons'],
|
||||
ENV = os.environ,
|
||||
)
|
||||
|
||||
# Override options
|
||||
host_env['platform'] = common.host_platform
|
||||
host_env['machine'] = common.host_machine
|
||||
host_env['toolchain'] = 'default'
|
||||
host_env['llvm'] = False
|
||||
|
||||
host_env.Tool('gallium')
|
||||
|
||||
host_env['hostonly'] = True
|
||||
assert host_env['crosscompile'] == False
|
||||
|
||||
if host_env['msvc']:
|
||||
host_env.Append(CPPPATH = ['#include/c99'])
|
||||
|
||||
target_env = env
|
||||
env = host_env
|
||||
Export('env')
|
||||
|
||||
SConscript(
|
||||
'src/SConscript',
|
||||
variant_dir = host_env['build_dir'],
|
||||
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||
)
|
||||
|
||||
env = target_env
|
||||
|
||||
Export('env')
|
||||
|
||||
|
||||
#######################################################################
|
||||
# Invoke SConscripts
|
||||
|
||||
|
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
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
|
||||
fi
|
16
bin/mklib
16
bin/mklib
@@ -307,7 +307,7 @@ fi
|
||||
#
|
||||
case $ARCH in
|
||||
|
||||
'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/* | 'NetBSD')
|
||||
'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
|
||||
# we assume gcc
|
||||
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
@@ -574,6 +574,20 @@ case $ARCH in
|
||||
fi
|
||||
;;
|
||||
|
||||
'NetBSD')
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}_pic.a"
|
||||
echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
|
||||
echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ld -x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
fi
|
||||
;;
|
||||
|
||||
'IRIX' | 'IRIX64')
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
|
36
common.py
36
common.py
@@ -14,16 +14,22 @@ import SCons.Script.SConscript
|
||||
#######################################################################
|
||||
# Defaults
|
||||
|
||||
host_platform = _platform.system().lower()
|
||||
if host_platform.startswith('cygwin'):
|
||||
host_platform = 'cygwin'
|
||||
_platform_map = {
|
||||
'linux2': 'linux',
|
||||
'win32': 'windows',
|
||||
}
|
||||
|
||||
default_platform = sys.platform
|
||||
default_platform = _platform_map.get(default_platform, default_platform)
|
||||
|
||||
# Search sys.argv[] for a "platform=foo" argument since we don't have
|
||||
# an 'env' variable at this point.
|
||||
if 'platform' in SCons.Script.ARGUMENTS:
|
||||
target_platform = SCons.Script.ARGUMENTS['platform']
|
||||
selected_platform = SCons.Script.ARGUMENTS['platform']
|
||||
else:
|
||||
target_platform = host_platform
|
||||
selected_platform = default_platform
|
||||
|
||||
cross_compiling = selected_platform != default_platform
|
||||
|
||||
_machine_map = {
|
||||
'x86': 'x86',
|
||||
@@ -32,22 +38,19 @@ _machine_map = {
|
||||
'i586': 'x86',
|
||||
'i686': 'x86',
|
||||
'ppc' : 'ppc',
|
||||
'AMD64': 'x86_64',
|
||||
'x86_64': 'x86_64',
|
||||
}
|
||||
|
||||
|
||||
# find host_machine value
|
||||
# find default_machine value
|
||||
if 'PROCESSOR_ARCHITECTURE' in os.environ:
|
||||
host_machine = os.environ['PROCESSOR_ARCHITECTURE']
|
||||
default_machine = os.environ['PROCESSOR_ARCHITECTURE']
|
||||
else:
|
||||
host_machine = _platform.machine()
|
||||
host_machine = _machine_map.get(host_machine, 'generic')
|
||||
|
||||
default_machine = host_machine
|
||||
default_machine = _platform.machine()
|
||||
default_machine = _machine_map.get(default_machine, 'generic')
|
||||
default_toolchain = 'default'
|
||||
|
||||
if target_platform == 'windows' and host_platform != 'windows':
|
||||
if selected_platform == 'windows' and cross_compiling:
|
||||
default_machine = 'x86'
|
||||
default_toolchain = 'crossmingw'
|
||||
|
||||
@@ -58,7 +61,7 @@ if 'LLVM' in os.environ:
|
||||
else:
|
||||
default_llvm = 'no'
|
||||
try:
|
||||
if target_platform != 'windows' and \
|
||||
if selected_platform != 'windows' and \
|
||||
subprocess.call(['llvm-config', '--version'], stdout=subprocess.PIPE) == 0:
|
||||
default_llvm = 'yes'
|
||||
except:
|
||||
@@ -82,10 +85,9 @@ def AddOptions(opts):
|
||||
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', 'embedded', 'cygwin', 'sunos', 'freebsd8')))
|
||||
opts.Add(EnumOption('platform', 'target platform', default_platform,
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos5', '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'))
|
||||
|
@@ -15,13 +15,11 @@ ASM_FLAGS = @ASM_FLAGS@
|
||||
PIC_FLAGS = @PIC_FLAGS@
|
||||
DEFINES = @DEFINES@
|
||||
API_DEFINES = @API_DEFINES@
|
||||
SHARED_GLAPI = @SHARED_GLAPI@
|
||||
CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \
|
||||
GLES_OVERLAY = @GLES_OVERLAY@
|
||||
CFLAGS = @CPPFLAGS@ @CFLAGS@ \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \
|
||||
CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@
|
||||
CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
|
||||
RADEON_CFLAGS = @RADEON_CFLAGS@
|
||||
@@ -35,9 +33,9 @@ LLVM_LDFLAGS = @LLVM_LDFLAGS@
|
||||
LLVM_LIBS = @LLVM_LIBS@
|
||||
GLW_CFLAGS = @GLW_CFLAGS@
|
||||
GLUT_CFLAGS = @GLUT_CFLAGS@
|
||||
GLX_TLS = @GLX_TLS@
|
||||
DRI_CFLAGS = @DRI_CFLAGS@
|
||||
DRI_CXXFLAGS = @DRI_CXXFLAGS@
|
||||
|
||||
TALLOC_LIBS = @TALLOC_LIBS@
|
||||
TALLOC_CFLAGS = @TALLOC_CFLAGS@
|
||||
|
||||
# dlopen
|
||||
DLOPEN_LIBS = @DLOPEN_LIBS@
|
||||
@@ -67,8 +65,6 @@ OSMESA_LIB = @OSMESA_LIB@
|
||||
GLESv1_CM_LIB = GLESv1_CM
|
||||
GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
GLAPI_LIB = glapi
|
||||
WAYLAND_EGL_LIB = wayland-egl
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = @GL_LIB_NAME@
|
||||
@@ -80,8 +76,6 @@ EGL_LIB_NAME = @EGL_LIB_NAME@
|
||||
GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@
|
||||
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@
|
||||
|
||||
# Globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = @GL_LIB_GLOB@
|
||||
@@ -93,8 +87,6 @@ EGL_LIB_GLOB = @EGL_LIB_GLOB@
|
||||
GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@
|
||||
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@
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = @LIB_DIR@
|
||||
@@ -111,10 +103,7 @@ GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
|
||||
# Driver specific build vars
|
||||
DRI_DIRS = @DRI_DIRS@
|
||||
DRICORE_GLSL_LIBS = @DRICORE_GLSL_LIBS@
|
||||
DRICORE_LIBS = @DRICORE_LIBS@
|
||||
DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@
|
||||
DRI_DIRS = @DRI_DIRS@
|
||||
EGL_PLATFORMS = @EGL_PLATFORMS@
|
||||
EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
|
||||
|
||||
@@ -140,16 +129,12 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
|
||||
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_LIBPATH) @WAYLAND_EGL_LIB_DEPS@
|
||||
|
||||
# DRI dependencies
|
||||
MESA_MODULES = @MESA_MODULES@
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
|
||||
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
|
||||
LIBDRM_LIB = @LIBDRM_LIBS@
|
||||
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
|
||||
GLPROTO_CFLAGS = @GLPROTO_CFLAGS@
|
||||
EXPAT_INCLUDES = @EXPAT_INCLUDES@
|
||||
|
||||
# Autoconf directories
|
||||
@@ -197,16 +182,11 @@ GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
|
||||
EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
|
||||
EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
|
||||
EGL_PC_CFLAGS = @GL_PC_CFLAGS@
|
||||
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@
|
||||
|
||||
XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
|
||||
XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
|
||||
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
|
||||
LIBUDEV_LIBS = @LIBUDEV_LIBS@
|
||||
WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
|
||||
WAYLAND_LIBS = @WAYLAND_LIBS@
|
||||
|
||||
MESA_LLVM = @MESA_LLVM@
|
||||
|
||||
|
@@ -9,7 +9,7 @@ CONFIG_NAME = default
|
||||
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=11
|
||||
MESA_MINOR=10
|
||||
MESA_TINY=0
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
@@ -25,7 +25,6 @@ CXXFLAGS = -O
|
||||
LDFLAGS =
|
||||
HOST_CFLAGS = $(CFLAGS)
|
||||
GLU_CFLAGS =
|
||||
GLX_TLS = no
|
||||
|
||||
# Compiler for building demos/tests/etc
|
||||
APP_CC = $(CC)
|
||||
@@ -59,8 +58,6 @@ EGL_LIB = EGL
|
||||
GLESv1_CM_LIB = GLESv1_CM
|
||||
GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
GLAPI_LIB = glapi
|
||||
WAYLAND_EGL_LIB = wayland-egl
|
||||
|
||||
|
||||
# Library names (actual file names)
|
||||
@@ -73,8 +70,6 @@ EGL_LIB_NAME = lib$(EGL_LIB).so
|
||||
GLESv1_CM_LIB_NAME = lib$(GLESv1_CM_LIB).so
|
||||
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
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = $(GL_LIB_NAME)*
|
||||
@@ -86,11 +81,9 @@ EGL_LIB_GLOB = $(EGL_LIB_NAME)*
|
||||
GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)*
|
||||
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)*
|
||||
|
||||
DRI_CFLAGS = $(CFLAGS)
|
||||
DRI_CXXFLAGS = $(CXXFLAGS)
|
||||
TALLOC_LIBS = `pkg-config --libs talloc`
|
||||
TALLOC_CFLAGS = `pkg-config --cflags talloc`
|
||||
|
||||
# Optional assembly language optimization files for libGL
|
||||
MESA_ASM_SOURCES =
|
||||
@@ -114,7 +107,7 @@ EGL_DRIVERS_DIRS = glx
|
||||
# Gallium directories and
|
||||
GALLIUM_DIRS = auxiliary drivers state_trackers
|
||||
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad i915 i965 svga r300 nvfx nv50 failover
|
||||
GALLIUM_DRIVERS_DIRS = softpipe trace rbug identity galahad i915 i965 svga r300 nvfx nv50 failover
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_WINSYS_DIRS = sw sw/xlib
|
||||
GALLIUM_TARGET_DIRS = libgl-xlib
|
||||
@@ -126,7 +119,7 @@ EGL_CLIENT_APIS = $(GL_LIB)
|
||||
|
||||
# Library dependencies
|
||||
#EXTRA_LIB_PATH ?=
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread $(TALLOC_LIBS)
|
||||
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
|
||||
OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
@@ -136,8 +129,6 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
|
||||
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
|
||||
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
|
||||
|
||||
# Program dependencies - specific GL/glut libraries added in Makefiles
|
||||
APP_LIB_DEPS = -lm
|
||||
@@ -186,6 +177,3 @@ GLESv2_PC_CFLAGS =
|
||||
VG_PC_REQ_PRIV =
|
||||
VG_PC_LIB_PRIV =
|
||||
VG_PC_CFLAGS =
|
||||
WAYLAND_EGL_PC_REQ_PRIV =
|
||||
WAYLAND_EGL_PC_LIB_PRIV =
|
||||
WAYLAND_EGL_PC_CFLAGS =
|
||||
|
@@ -30,11 +30,9 @@ ASM_SOURCES =
|
||||
MESA_ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
|
||||
|
||||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
||||
DRI_LIB_DEPS = $(MESA_MODULES) -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
|
||||
DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -pthread $(LIBDRM_LIB)
|
||||
|
||||
|
@@ -43,11 +43,9 @@ MESA_ASM_SOURCES =
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
|
||||
|
||||
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
|
||||
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
|
||||
DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl -ltalloc $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread -ldl $(LIBDRM_LIB)
|
||||
|
||||
@@ -63,7 +61,7 @@ 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 r128 r200 r300 r600 radeon \
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
|
||||
savage sis tdfx unichrome swrast
|
||||
|
||||
INTEL_LIBS = `pkg-config --libs libdrm_intel`
|
||||
|
@@ -41,11 +41,9 @@ MESA_ASM_SOURCES =
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11)
|
||||
|
||||
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
|
||||
|
||||
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
|
||||
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
|
||||
DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
|
||||
$(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
|
||||
|
||||
|
@@ -38,11 +38,9 @@ MESA_ASM_SOURCES =
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
|
||||
|
||||
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
|
||||
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
|
||||
DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread -ldl \
|
||||
$(LIBDRM_LIB)
|
||||
|
@@ -42,8 +42,7 @@ MESA_ASM_SOURCES =
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
|
||||
DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
|
||||
|
||||
|
||||
|
@@ -12,7 +12,7 @@ GALLIUM_DRIVERS_DIRS += llvmpipe
|
||||
OPT_FLAGS = -O3 -ansi -pedantic
|
||||
ARCH_FLAGS = -mmmx -msse -msse2 -mstackrealign
|
||||
|
||||
DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE
|
||||
DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
|
||||
|
||||
# override -std=c99
|
||||
CFLAGS += -std=gnu99
|
||||
@@ -31,9 +31,9 @@ endif
|
||||
|
||||
ifeq ($(MESA_LLVM),1)
|
||||
LLVM_CFLAGS=`llvm-config --cppflags`
|
||||
LLVM_CXXFLAGS=`llvm-config --cxxflags` -Wno-long-long
|
||||
LLVM_LDFLAGS = $(shell llvm-config --ldflags)
|
||||
LLVM_LIBS = $(shell llvm-config --libs)
|
||||
LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
|
||||
LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
|
||||
LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation)
|
||||
MKLIB_OPTIONS=-cplusplus
|
||||
else
|
||||
LLVM_CFLAGS=
|
||||
@@ -41,4 +41,4 @@ else
|
||||
endif
|
||||
|
||||
LD = g++
|
||||
GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++
|
||||
GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -ltalloc -lstdc++ -ludis86
|
||||
|
311
configure.ac
311
configure.ac
@@ -18,12 +18,11 @@ AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl Versions for external dependencies
|
||||
LIBDRM_REQUIRED=2.4.24
|
||||
LIBDRM_RADEON_REQUIRED=2.4.24
|
||||
LIBDRM_INTEL_REQUIRED=2.4.24
|
||||
LIBDRM_REQUIRED=2.4.15
|
||||
LIBDRM_RADEON_REQUIRED=2.4.17
|
||||
DRI2PROTO_REQUIRED=2.1
|
||||
GLPROTO_REQUIRED=1.4.11
|
||||
LIBDRM_XORG_REQUIRED=2.4.24
|
||||
LIBDRM_XORG_REQUIRED=2.4.17
|
||||
LIBKMS_XORG_REQUIRED=1.0.0
|
||||
|
||||
dnl Check for progs
|
||||
@@ -151,13 +150,9 @@ if test "x$GCC" = xyes; then
|
||||
# Enable -fvisibility=hidden if using a gcc that supports it
|
||||
save_CFLAGS="$CFLAGS"
|
||||
AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
|
||||
VISIBILITY_CFLAGS="-fvisibility=hidden"
|
||||
CFLAGS="$CFLAGS $VISIBILITY_CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
|
||||
[VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]);
|
||||
|
||||
# Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
|
||||
CFLAGS=$save_CFLAGS
|
||||
[CFLAGS="$save_CFLAGS" ; AC_MSG_RESULT([no])]);
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
@@ -168,21 +163,14 @@ if test "x$GXX" = xyes; then
|
||||
# Enable -fvisibility=hidden if using a gcc that supports it
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
|
||||
VISIBILITY_CXXFLAGS="-fvisibility=hidden"
|
||||
CXXFLAGS="$CXXFLAGS $VISIBILITY_CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
|
||||
[VISIBILITY_CXXFLAGS="" ; AC_MSG_RESULT([no])]);
|
||||
|
||||
# Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed.
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
[CXXFLAGS="$save_CXXFLAGS" ; AC_MSG_RESULT([no])]);
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
|
||||
fi
|
||||
|
||||
AC_SUBST([VISIBILITY_CFLAGS])
|
||||
AC_SUBST([VISIBILITY_CXXFLAGS])
|
||||
|
||||
dnl These should be unnecessary, but let the user set them if they want
|
||||
AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler.
|
||||
Default is to use CFLAGS.])
|
||||
@@ -328,8 +316,6 @@ EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
|
||||
GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION}
|
||||
GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION}
|
||||
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}
|
||||
|
||||
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}'*'
|
||||
@@ -341,8 +327,6 @@ EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTE
|
||||
GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
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}'*'
|
||||
|
||||
AC_SUBST([GL_LIB_NAME])
|
||||
AC_SUBST([GLU_LIB_NAME])
|
||||
@@ -353,8 +337,6 @@ AC_SUBST([EGL_LIB_NAME])
|
||||
AC_SUBST([GLESv1_CM_LIB_NAME])
|
||||
AC_SUBST([GLESv2_LIB_NAME])
|
||||
AC_SUBST([VG_LIB_NAME])
|
||||
AC_SUBST([GLAPI_LIB_NAME])
|
||||
AC_SUBST([WAYLAND_EGL_LIB_NAME])
|
||||
|
||||
AC_SUBST([GL_LIB_GLOB])
|
||||
AC_SUBST([GLU_LIB_GLOB])
|
||||
@@ -365,8 +347,6 @@ AC_SUBST([EGL_LIB_GLOB])
|
||||
AC_SUBST([GLESv1_CM_LIB_GLOB])
|
||||
AC_SUBST([GLESv2_LIB_GLOB])
|
||||
AC_SUBST([VG_LIB_GLOB])
|
||||
AC_SUBST([GLAPI_LIB_GLOB])
|
||||
AC_SUBST([WAYLAND_EGL_LIB_GLOB])
|
||||
|
||||
dnl
|
||||
dnl Arch/platform-specific settings
|
||||
@@ -397,14 +377,14 @@ if test "x$enable_asm" = xyes; then
|
||||
case "$host_cpu" in
|
||||
i?86)
|
||||
case "$host_os" in
|
||||
linux* | *freebsd* | dragonfly* | *netbsd*)
|
||||
linux* | *freebsd* | dragonfly*)
|
||||
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
x86_64)
|
||||
case "$host_os" in
|
||||
linux* | *freebsd* | dragonfly* | *netbsd*)
|
||||
linux* | *freebsd* | dragonfly*)
|
||||
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
|
||||
;;
|
||||
esac
|
||||
@@ -503,9 +483,9 @@ AC_ARG_ENABLE([gles2],
|
||||
[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"],
|
||||
[])
|
||||
[build separate OpenGL ES only libraries @<:@default=no@:>@])],
|
||||
[enable_gles_overlay="$enableval"],
|
||||
[enable_gles_overlay=no])
|
||||
|
||||
AC_ARG_ENABLE([openvg],
|
||||
[AS_HELP_STRING([--enable-openvg],
|
||||
@@ -526,11 +506,13 @@ fi
|
||||
if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles1" = xno -a \
|
||||
"x$enable_gles2" = xno -a \
|
||||
"x$enable_gles_overlay" = xno -a \
|
||||
"x$enable_openvg" = xno; then
|
||||
AC_MSG_ERROR([at least one API should be enabled])
|
||||
fi
|
||||
|
||||
API_DEFINES=""
|
||||
GLES_OVERLAY=0
|
||||
if test "x$enable_opengl" = xno; then
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_GL=0"
|
||||
else
|
||||
@@ -542,19 +524,11 @@ fi
|
||||
if test "x$enable_gles2" = xyes; then
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_ES2=1"
|
||||
fi
|
||||
AC_SUBST([API_DEFINES])
|
||||
|
||||
AC_ARG_ENABLE([shared-glapi],
|
||||
[AS_HELP_STRING([--enable-shared-glapi],
|
||||
[EXPERIMENTAL. Enable shared glapi for OpenGL @<:@default=no@:>@])],
|
||||
[enable_shared_glapi="$enableval"],
|
||||
[enable_shared_glapi=no])
|
||||
|
||||
SHARED_GLAPI="0"
|
||||
if test "x$enable_shared_glapi" = xyes; then
|
||||
SHARED_GLAPI="1"
|
||||
if test "x$enable_gles_overlay" = xyes; then
|
||||
GLES_OVERLAY=1
|
||||
fi
|
||||
AC_SUBST([SHARED_GLAPI])
|
||||
AC_SUBST([API_DEFINES])
|
||||
AC_SUBST([GLES_OVERLAY])
|
||||
|
||||
dnl
|
||||
dnl Driver configuration. Options are xlib, dri and osmesa right now.
|
||||
@@ -568,7 +542,7 @@ linux*)
|
||||
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
|
||||
esac
|
||||
;;
|
||||
*freebsd* | dragonfly* | *netbsd*)
|
||||
*freebsd* | dragonfly*)
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
|
||||
esac
|
||||
@@ -598,6 +572,10 @@ xno)
|
||||
;;
|
||||
esac
|
||||
|
||||
PKG_CHECK_MODULES([TALLOC], [talloc])
|
||||
AC_SUBST([TALLOC_LIBS])
|
||||
AC_SUBST([TALLOC_CFLAGS])
|
||||
|
||||
dnl
|
||||
dnl Driver specific build directories
|
||||
dnl
|
||||
@@ -610,30 +588,20 @@ GLU_DIRS="sgi"
|
||||
GALLIUM_DIRS="auxiliary drivers state_trackers"
|
||||
GALLIUM_TARGET_DIRS=""
|
||||
GALLIUM_WINSYS_DIRS="sw"
|
||||
GALLIUM_DRIVERS_DIRS="softpipe failover galahad trace rbug noop identity"
|
||||
GALLIUM_DRIVERS_DIRS="softpipe failover galahad trace rbug identity"
|
||||
GALLIUM_STATE_TRACKERS_DIRS=""
|
||||
|
||||
# build shared-glapi if enabled for OpenGL or if OpenGL ES is enabled
|
||||
case "x$enable_shared_glapi$enable_gles1$enable_gles2" in
|
||||
x*yes*)
|
||||
CORE_DIRS="$CORE_DIRS mapi/shared-glapi"
|
||||
;;
|
||||
esac
|
||||
|
||||
# build glapi if OpenGL is enabled
|
||||
if test "x$enable_opengl" = xyes; then
|
||||
CORE_DIRS="$CORE_DIRS mapi/glapi"
|
||||
fi
|
||||
|
||||
# build es1api if OpenGL ES 1.x is enabled
|
||||
if test "x$enable_gles1" = xyes; then
|
||||
CORE_DIRS="$CORE_DIRS mapi/es1api"
|
||||
fi
|
||||
|
||||
# build es2api if OpenGL ES 2.x is enabled
|
||||
if test "x$enable_gles2" = xyes; then
|
||||
CORE_DIRS="$CORE_DIRS mapi/es2api"
|
||||
fi
|
||||
# build es1api and es2api if OpenGL ES is enabled
|
||||
case "x$enable_gles1$enable_gles2$enable_gles_overlay" in
|
||||
x*yes*)
|
||||
CORE_DIRS="$CORE_DIRS mapi/es1api mapi/es2api"
|
||||
;;
|
||||
esac
|
||||
|
||||
# build vgapi if OpenVG is enabled
|
||||
if test "x$enable_openvg" = xyes; then
|
||||
@@ -641,7 +609,7 @@ if test "x$enable_openvg" = xyes; then
|
||||
fi
|
||||
|
||||
# build glsl and mesa if OpenGL or OpenGL ES is enabled
|
||||
case "x$enable_opengl$enable_gles1$enable_gles2" in
|
||||
case "x$enable_opengl$enable_gles1$enable_gles2$enable_gles_overlay" in
|
||||
x*yes*)
|
||||
CORE_DIRS="$CORE_DIRS glsl mesa"
|
||||
;;
|
||||
@@ -729,27 +697,6 @@ else
|
||||
enable_xcb=no
|
||||
fi
|
||||
|
||||
dnl Direct rendering or just indirect rendering
|
||||
case "$host_os" in
|
||||
gnu*)
|
||||
dnl Disable by default on GNU/Hurd
|
||||
driglx_direct_default="no"
|
||||
;;
|
||||
cygwin*)
|
||||
dnl Disable by default on cygwin
|
||||
driglx_direct_default="no"
|
||||
;;
|
||||
*)
|
||||
driglx_direct_default="yes"
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE([driglx-direct],
|
||||
[AS_HELP_STRING([--disable-driglx-direct],
|
||||
[enable direct rendering in GLX and EGL for DRI \
|
||||
@<:@default=auto@:>@])],
|
||||
[driglx_direct="$enableval"],
|
||||
[driglx_direct="$driglx_direct_default"])
|
||||
|
||||
dnl
|
||||
dnl libGL configuration per driver
|
||||
dnl
|
||||
@@ -767,8 +714,8 @@ xlib)
|
||||
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
|
||||
GL_PC_CFLAGS="$X11_INCLUDES"
|
||||
fi
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
|
||||
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $TALLOC_LIBS"
|
||||
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $TALLOC_LIBS"
|
||||
|
||||
# if static, move the external libraries to the programs
|
||||
# and empty the libraries for libGL
|
||||
@@ -783,17 +730,12 @@ dri|no) # these checks are still desired when there is no mesa_driver
|
||||
AC_MSG_ERROR([Can't use static libraries for DRI drivers])
|
||||
fi
|
||||
|
||||
# Check for libdrm
|
||||
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
|
||||
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
|
||||
PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
|
||||
GL_PC_REQ_PRIV="glproto >= $GLPROTO_REQUIRED"
|
||||
DRI_PC_REQ_PRIV=""
|
||||
|
||||
if test x"$driglx_direct" = xyes; then
|
||||
# Check for libdrm
|
||||
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
|
||||
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
|
||||
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
|
||||
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
|
||||
fi
|
||||
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED"
|
||||
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
|
||||
|
||||
# find the DRI deps for libGL
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
@@ -853,48 +795,11 @@ AC_SUBST([GLESv1_CM_PC_LIB_PRIV])
|
||||
AC_SUBST([GLESv2_LIB_DEPS])
|
||||
AC_SUBST([GLESv2_PC_LIB_PRIV])
|
||||
|
||||
GLAPI_LIB_DEPS="-lpthread"
|
||||
AC_SUBST([GLAPI_LIB_DEPS])
|
||||
|
||||
|
||||
dnl Setup default DRI CFLAGS
|
||||
DRI_CFLAGS='$(CFLAGS)'
|
||||
DRI_CXXFLAGS='$(CXXFLAGS)'
|
||||
DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
|
||||
MESA_MODULES='$(TOP)/src/mesa/libmesa.a'
|
||||
|
||||
AC_ARG_ENABLE([shared-dricore],
|
||||
[AS_HELP_STRING([--enable-shared-dricore],
|
||||
[link DRI modules with shared core DRI routines @<:@default=disabled@:>@])],
|
||||
[enable_dricore="$enableval"],
|
||||
[enable_dricore=no])
|
||||
if test "$mesa_driver" = dri ; then
|
||||
if test "$enable_dricore" = yes ; then
|
||||
if test "$GCC$GXX" != yesyes ; then
|
||||
AC_MSG_WARN([Shared dricore requires GCC-compatible rpath handling. Disabling shared dricore])
|
||||
enable_dricore=no
|
||||
else
|
||||
DRICORE_GLSL_LIBS='$(TOP)/$(LIB_DIR)/libglsl.so'
|
||||
DRICORE_LIBS='$(TOP)/$(LIB_DIR)/libdricore.so'
|
||||
DRICORE_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lglsl'
|
||||
DRI_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore -lglsl'
|
||||
DRI_CFLAGS='$(CFLAGS_NOVISIBILITY) -DUSE_DRICORE'
|
||||
DRI_CXXFLAGS='$(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE'
|
||||
MESA_MODULES='$(DRICORE_LIBS) $(DRICORE_GLSL_LIBS)'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([DRICORE_LIBS])
|
||||
AC_SUBST([DRICORE_GLSL_LIBS])
|
||||
AC_SUBST([DRICORE_LIB_DEPS])
|
||||
AC_SUBST([DRI_CXXFLAGS])
|
||||
AC_SUBST([DRI_CFLAGS])
|
||||
AC_SUBST([MESA_MODULES])
|
||||
|
||||
AC_SUBST([HAVE_XF86VIDMODE])
|
||||
|
||||
PKG_CHECK_MODULES([LIBDRM_RADEON],
|
||||
[libdrm_radeon >= $LIBDRM_RADEON_REQUIRED],
|
||||
[libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED],
|
||||
HAVE_LIBDRM_RADEON=yes,
|
||||
HAVE_LIBDRM_RADEON=no)
|
||||
|
||||
@@ -906,22 +811,13 @@ if test "$mesa_driver" = xlib; then
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl TLS detection
|
||||
dnl More DRI setup
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE([glx-tls],
|
||||
[AS_HELP_STRING([--enable-glx-tls],
|
||||
[enable TLS support in GLX @<:@default=disabled@:>@])],
|
||||
[GLX_USE_TLS="$enableval"],
|
||||
[GLX_USE_TLS=no])
|
||||
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
|
||||
|
||||
AS_IF([test "x$GLX_USE_TLS" = xyes],
|
||||
[DEFINES="${DEFINES} -DGLX_USE_TLS -DPTHREADS"])
|
||||
|
||||
dnl
|
||||
dnl More DRI setup
|
||||
dnl
|
||||
dnl Directory for DRI drivers
|
||||
AC_ARG_WITH([dri-driverdir],
|
||||
[AS_HELP_STRING([--with-dri-driverdir=DIR],
|
||||
@@ -936,6 +832,12 @@ AC_ARG_WITH([dri-searchpath],
|
||||
[DRI_DRIVER_SEARCH_DIR="$withval"],
|
||||
[DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}'])
|
||||
AC_SUBST([DRI_DRIVER_SEARCH_DIR])
|
||||
dnl Direct rendering or just indirect rendering
|
||||
AC_ARG_ENABLE([driglx-direct],
|
||||
[AS_HELP_STRING([--disable-driglx-direct],
|
||||
[enable direct rendering in GLX and EGL for DRI @<:@default=enabled@:>@])],
|
||||
[driglx_direct="$enableval"],
|
||||
[driglx_direct="yes"])
|
||||
dnl Which drivers to build - default is chosen by platform
|
||||
AC_ARG_WITH([dri-drivers],
|
||||
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
|
||||
@@ -968,6 +870,11 @@ esac
|
||||
|
||||
dnl Set DRI_DIRS, DEFINES and LIB_DEPS
|
||||
if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
|
||||
# Use TLS in GLX?
|
||||
if test "x$GLX_USE_TLS" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
|
||||
fi
|
||||
|
||||
# Platform specific settings and drivers to build
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
@@ -1002,13 +909,16 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd* | dragonfly* | *netbsd*)
|
||||
freebsd* | dragonfly*)
|
||||
DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
|
||||
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
|
||||
if test "x$driglx_direct" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
|
||||
fi
|
||||
if test "x$GXX" = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS -ansi -pedantic"
|
||||
fi
|
||||
|
||||
if test "x$DRI_DIRS" = "xyes"; then
|
||||
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
|
||||
@@ -1026,16 +936,6 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
|
||||
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
|
||||
fi
|
||||
;;
|
||||
cygwin*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
|
||||
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
|
||||
if test "x$driglx_direct" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
|
||||
fi
|
||||
if test "x$DRI_DIRS" = "xyes"; then
|
||||
DRI_DIRS="swrast"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# default drivers
|
||||
@@ -1063,8 +963,8 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
|
||||
[AC_MSG_ERROR([Expat required for DRI.])])
|
||||
fi
|
||||
|
||||
# put all the necessary libs together, including possibly libdricore
|
||||
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
|
||||
# put all the necessary libs together
|
||||
DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS $TALLOC_LIBS"
|
||||
fi
|
||||
AC_SUBST([DRI_DIRS])
|
||||
AC_SUBST([EXPAT_INCLUDES])
|
||||
@@ -1072,7 +972,7 @@ AC_SUBST([DRI_LIB_DEPS])
|
||||
|
||||
case $DRI_DIRS in
|
||||
*i915*|*i965*)
|
||||
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
|
||||
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= 2.4.21])
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1140,12 +1040,12 @@ case "$DRIVER_DIRS" in
|
||||
*osmesa*)
|
||||
# only link libraries with osmesa if shared
|
||||
if test "$enable_static" = no; then
|
||||
OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
|
||||
OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS $TALLOC_LIBS"
|
||||
else
|
||||
OSMESA_LIB_DEPS=""
|
||||
fi
|
||||
OSMESA_MESA_DEPS=""
|
||||
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
|
||||
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS $TALLOC_LIBS"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([OSMESA_LIB_DEPS])
|
||||
@@ -1192,9 +1092,6 @@ if test "x$enable_egl" = xyes; then
|
||||
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"])
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1430,6 +1327,8 @@ if test "x$enable_gallium" = xno -a "x$enable_openvg" = xyes; then
|
||||
fi
|
||||
if test "x$enable_gallium" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
|
||||
AC_CHECK_HEADER([udis86.h], [HAS_UDIS86="yes"],
|
||||
[HAS_UDIS86="no"])
|
||||
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
|
||||
fi
|
||||
|
||||
@@ -1453,7 +1352,7 @@ if test "x$enable_gallium_egl" = xauto; then
|
||||
enable_gallium_egl=$enable_egl
|
||||
;;
|
||||
*)
|
||||
enable_gallium_egl=$enable_openvg
|
||||
enable_gallium_egl=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -1529,7 +1428,6 @@ yes)
|
||||
if test "x$enable_openvg" != xyes; then
|
||||
AC_MSG_ERROR([cannot build vega state tracker without --enable-openvg])
|
||||
fi
|
||||
have_st_vega="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1544,14 +1442,6 @@ yes)
|
||||
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
|
||||
|
||||
@@ -1564,6 +1454,9 @@ x*yes*)
|
||||
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
|
||||
;;
|
||||
esac
|
||||
if test "x$enable_gles_overlay" = xyes; then
|
||||
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GLESv1_CM_LIB) $(GLESv2_LIB)'
|
||||
fi
|
||||
if test "x$enable_openvg" = xyes; then
|
||||
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
|
||||
VG_LIB_DEPS="$VG_LIB_DEPS -lpthread"
|
||||
@@ -1574,6 +1467,10 @@ AC_SUBST([EGL_CLIENT_APIS])
|
||||
|
||||
if test "x$HAVE_ST_EGL" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl"
|
||||
# define GLX_DIRECT_RENDERING even when the driver is not dri
|
||||
if test "x$mesa_driver" != xdri -a "x$driglx_direct" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$HAVE_ST_XORG" = xyes; then
|
||||
@@ -1594,8 +1491,6 @@ AC_ARG_WITH([egl-displays],
|
||||
[with_egl_platforms="$withval"])
|
||||
|
||||
EGL_PLATFORMS=""
|
||||
WAYLAND_EGL_LIB_DEPS=""
|
||||
|
||||
case "$with_egl_platforms" in
|
||||
yes)
|
||||
if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then
|
||||
@@ -1613,31 +1508,16 @@ yes)
|
||||
egl_platforms=`IFS=', '; echo $with_egl_platforms`
|
||||
for plat in $egl_platforms; do
|
||||
test -d "$srcdir/src/gallium/state_trackers/egl/$plat" || \
|
||||
AC_MSG_ERROR([EGL platform '$plat' doesn't exist])
|
||||
AC_MSG_ERROR([EGL platform '$plat' does't exist])
|
||||
if test "$plat" = "fbdev"; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev"
|
||||
fi
|
||||
if test "$plat" = "wayland"; then
|
||||
PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \
|
||||
[AC_MSG_ERROR([cannot find libwayland-client])])
|
||||
WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS"
|
||||
fi
|
||||
done
|
||||
EGL_PLATFORMS="$egl_platforms"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([EGL_PLATFORMS])
|
||||
|
||||
AC_SUBST([WAYLAND_EGL_LIB_DEPS])
|
||||
WAYLAND_EGL_PC_REQ_PRIV="wayland-client libdrm"
|
||||
WAYLAND_EGL_PC_LIB_PRIV=
|
||||
WAYLAND_EGL_PC_CFLAGS=
|
||||
|
||||
AC_SUBST([WAYLAND_EGL_PC_REQ_PRIV])
|
||||
AC_SUBST([WAYLAND_EGL_PC_LIB_PRIV])
|
||||
AC_SUBST([WAYLAND_EGL_PC_CFLAGS])
|
||||
|
||||
|
||||
AC_ARG_WITH([egl-driver-dir],
|
||||
[AS_HELP_STRING([--with-egl-driver-dir=DIR],
|
||||
[directory for EGL drivers [[default=${libdir}/egl]]])],
|
||||
@@ -1679,8 +1559,12 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
if test "x$LLVM_CONFIG" != xno; then
|
||||
LLVM_VERSION=`$LLVM_CONFIG --version`
|
||||
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
|
||||
LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++"
|
||||
LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen bitwriter` -lstdc++"
|
||||
|
||||
if test "x$HAS_UDIS86" != xno; then
|
||||
LLVM_LIBS="$LLVM_LIBS -ludis86"
|
||||
DEFINES="$DEFINES -DHAVE_UDIS86"
|
||||
fi
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
|
||||
DEFINES="$DEFINES -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS"
|
||||
@@ -1764,12 +1648,20 @@ AC_ARG_ENABLE([gallium-radeon],
|
||||
[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"
|
||||
if test "x$HAVE_LIBDRM_RADEON" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
|
||||
gallium_check_st "radeon/drm" "dri-r300"
|
||||
else
|
||||
AC_MSG_WARN([libdrm_radeon is missing, not building gallium-radeon (r300)])
|
||||
fi
|
||||
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"
|
||||
if test "x$HAVE_LIBDRM_RADEON" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
|
||||
gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon"
|
||||
else
|
||||
AC_MSG_ERROR([libdrm_radeon is missing, cannot build gallium-radeon (r300)])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
@@ -1781,8 +1673,12 @@ AC_ARG_ENABLE([gallium-r600],
|
||||
[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"
|
||||
if test "x$HAVE_LIBDRM_RADEON" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
|
||||
gallium_check_st "r600/drm" "dri-r600"
|
||||
else
|
||||
AC_MSG_ERROR([libdrm_radeon is missing, cannot build gallium-r600])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
@@ -1794,7 +1690,7 @@ AC_ARG_ENABLE([gallium-nouveau],
|
||||
[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_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50"
|
||||
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau"
|
||||
fi
|
||||
|
||||
@@ -1812,6 +1708,19 @@ if test "x$enable_gallium_swrast" = xyes || test "x$enable_gallium_swrast" = xau
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium noop configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-noop],
|
||||
[AS_HELP_STRING([--enable-gallium-noop],
|
||||
[build gallium radeon @<:@default=disabled@:>@])],
|
||||
[enable_gallium_noop="$enableval"],
|
||||
[enable_gallium_noop=auto])
|
||||
if test "x$enable_gallium_noop" = xyes; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS noop"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-noop"
|
||||
fi
|
||||
|
||||
dnl prepend CORE_DIRS to SRC_DIRS
|
||||
SRC_DIRS="$CORE_DIRS $SRC_DIRS"
|
||||
|
||||
@@ -1844,6 +1753,7 @@ echo " includedir: $includedir"
|
||||
dnl API info
|
||||
echo ""
|
||||
echo " OpenGL: $enable_opengl (ES1: $enable_gles1 ES2: $enable_gles2)"
|
||||
echo " GLES overlay: $enable_gles_overlay"
|
||||
echo " OpenVG: $enable_openvg"
|
||||
|
||||
dnl Driver info
|
||||
@@ -1865,7 +1775,6 @@ if test "$mesa_driver" != no; then
|
||||
fi
|
||||
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
|
||||
echo " Use XCB: $enable_xcb"
|
||||
echo " Shared dricore: $enable_dricore"
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
@@ -1881,7 +1790,7 @@ if test "$enable_egl" = yes; then
|
||||
|
||||
egl_drivers=""
|
||||
for d in $EGL_DRIVERS_DIRS; do
|
||||
egl_drivers="$egl_drivers builtin:egl_$d"
|
||||
egl_drivers="$egl_drivers egl_$d"
|
||||
done
|
||||
|
||||
if test "$enable_gallium" = yes -a "$HAVE_ST_EGL" = yes; then
|
||||
|
@@ -1,4 +0,0 @@
|
||||
Known issues in the ARB_color_buffer_float implementation:
|
||||
- Rendering to multiple render targets, some fixed-point, some floating-point, with FIXED_ONLY fragment clamping and polygon smooth enabled may write incorrect values to the fixed point buffers (depends on spec interpretation)
|
||||
- For fragment programs with ARB_fog_* options, colors are clamped before fog application regardless of the fragment clamping setting (this depends on spec interpretation)
|
||||
|
27
docs/GL3.txt
27
docs/GL3.txt
@@ -15,45 +15,40 @@ GL 3.0:
|
||||
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) 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
|
||||
Float textures, renderbuffers some infrastructure done
|
||||
(incl. GL_EXT_packed_float, GL_EXT_shared_exponent)
|
||||
Framebuffer objects (GL_EXT_framebuffer_object) DONE
|
||||
Half-float DONE
|
||||
Half-float some infrastructure done
|
||||
Multisample blit DONE
|
||||
Non-normalized Integer texture/framebuffer formats ~50% done
|
||||
1D/2D Texture arrays core Mesa, swrast done
|
||||
Packed depth/stencil formats DONE
|
||||
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE
|
||||
GL_EXT_texture_compression_rgtc DONE (swrast, gallium r600)
|
||||
GL_EXT_texture_compression_rgtc not started
|
||||
Red and red/green texture formats DONE (swrast, i965, gallium)
|
||||
Transform feedback (GL_EXT_transform_feedback) ~50% done
|
||||
glBindFragDataLocation, glGetFragDataLocation,
|
||||
glBindBufferRange, glBindBufferBase commands
|
||||
Vertex array objects (GL_APPLE_vertex_array_object) DONE
|
||||
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) core GL done (i965, gallium), GLX todo
|
||||
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) not started
|
||||
glClearBuffer commands DONE
|
||||
glGetStringi command DONE
|
||||
glTexParameterI, glGetTexParameterI commands DONE
|
||||
glVertexAttribI commands DONE (but converts int
|
||||
values to floats)
|
||||
Depth format cube textures 0% done
|
||||
|
||||
|
||||
|
||||
GL 3.1:
|
||||
|
||||
GLSL 1.30 and 1.40 not started
|
||||
Instanced drawing (GL_ARB_draw_instanced) DONE (gallium, swrast)
|
||||
Instanced drawing (GL_ARB_draw_instanced) ~50% done
|
||||
Buffer copying (GL_ARB_copy_buffer) DONE
|
||||
Primitive restart (GL_NV_primitive_restart) DONE (gallium)
|
||||
16 vertex texture image units not started
|
||||
Texture buffer objs (GL_ARB_texture_buffer_object) not started
|
||||
Rectangular textures (GL_ARB_texture_rectangle) DONE
|
||||
Uniform buffer objs (GL_ARB_uniform_buffer_object) not started
|
||||
Signed normalized textures (GL_EXT_texture_snorm) DONE (gallium)
|
||||
Signed normalized texture formats ~50% done
|
||||
|
||||
|
||||
GL 3.2:
|
||||
@@ -76,12 +71,12 @@ GL 3.3:
|
||||
GLSL 3.30 not started
|
||||
GL_ARB_blend_func_extended not started
|
||||
GL_ARB_explicit_attrib_location DONE (swrast, i915, i965)
|
||||
GL_ARB_occlusion_query2 DONE (swrast, gallium)
|
||||
GL_ARB_sampler_objects DONE (gallium)
|
||||
GL_ARB_occlusion_query2 not started
|
||||
GL_ARB_sampler_objects not started
|
||||
GL_ARB_texture_rgb10_a2ui not started
|
||||
GL_ARB_texture_swizzle DONE (same as EXT version)
|
||||
GL_ARB_timer_query DONE (only Xlib sw driver)
|
||||
GL_ARB_instanced_arrays DONE (gallium)
|
||||
GL_ARB_instanced_arrays not started
|
||||
GL_ARB_vertex_type_2_10_10_10_rev not started
|
||||
|
||||
|
||||
@@ -89,7 +84,7 @@ GL 4.0:
|
||||
|
||||
GLSL 4.0 not started
|
||||
GL_ARB_texture_query_lod not started
|
||||
GL_ARB_draw_buffers_blend DONE (gallium softpipe)
|
||||
GL_ARB_draw_buffers_blend not started
|
||||
GL_ARB_draw_indirect not started
|
||||
GL_ARB_gpu_shader_fp64 not started
|
||||
GL_ARB_sample_shading not started
|
||||
|
@@ -67,7 +67,7 @@ Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors)
|
||||
On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV
|
||||
and freed with glXFreeMemoryNV. Sometimes it's useful to know where a
|
||||
block of AGP memory is located with respect to the start of the AGP
|
||||
aperture. The function
|
||||
aperature. The function
|
||||
|
||||
GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
|
||||
|
||||
|
@@ -24,7 +24,7 @@ Number
|
||||
|
||||
Dependencies
|
||||
|
||||
Requires EGL 1.4 or later. This extension is written against the
|
||||
Reguires EGL 1.4 or later. This extension is written against the
|
||||
wording of the EGL 1.4 specification.
|
||||
|
||||
EGL_KHR_base_image is required.
|
||||
@@ -134,7 +134,7 @@ Issues
|
||||
RESOLVED: The eglQueryImage function has been proposed often,
|
||||
but it goes against the EGLImage design. EGLImages are opaque
|
||||
handles to a 2D array of pixels, which can be passed between
|
||||
client APIs. By referencing an EGLImage in a client API, the
|
||||
client APIs. By referenceing an EGLImage in a client API, the
|
||||
EGLImage target (a texture, a renderbuffer or such) can be
|
||||
used to query the attributes of the EGLImage. We don't have a
|
||||
full client API for creating and querying DRM buffers, though,
|
||||
|
@@ -1,158 +0,0 @@
|
||||
Name
|
||||
|
||||
MESA_multithread_makecurrent
|
||||
|
||||
Name Strings
|
||||
|
||||
GLX_MESA_multithread_makecurrent
|
||||
|
||||
Contact
|
||||
|
||||
Eric Anholt (eric@anholt.net)
|
||||
|
||||
Status
|
||||
|
||||
Not shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 21 February 2011
|
||||
|
||||
Number
|
||||
|
||||
TBD
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.0 or later is required.
|
||||
GLX 1.3 or later is required.
|
||||
|
||||
Overview
|
||||
|
||||
The GLX context setup encourages multithreaded applications to
|
||||
create a context per thread which each operate on their own
|
||||
objects in parallel, and leaves synchronization for write access
|
||||
to shared objects up to the application.
|
||||
|
||||
For some applications, maintaining per-thread contexts and
|
||||
ensuring that the glFlush happens in one thread before another
|
||||
thread starts working on that object is difficult. For them,
|
||||
using the same context across multiple threads and protecting its
|
||||
usage with a mutex is both higher performance and easier to
|
||||
implement. This extension gives those applications that option by
|
||||
relaxing the context binding requirements.
|
||||
|
||||
This new behavior matches the requirements of AGL, while providing
|
||||
a feature not specified in WGL.
|
||||
|
||||
IP Status
|
||||
|
||||
Open-source; freely implementable.
|
||||
|
||||
Issues
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Changes to Chapter 2 of the GLX 1.3 Specification (Functions and Errors)
|
||||
|
||||
Replace the following sentence from section 2.2 Rendering Contexts:
|
||||
In addition, a rendering context can be current for only one
|
||||
thread at a time.
|
||||
with:
|
||||
In addition, an indirect rendering context can be current for
|
||||
only one thread at a time. A direct rendering context may be
|
||||
current to multiple threads, with synchronization of access to
|
||||
the context thruogh the GL managed by the application through
|
||||
mutexes.
|
||||
|
||||
Changes to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
|
||||
|
||||
Replace the following sentence from section 3.3.7 Rendering Contexts:
|
||||
If ctx is current to some other thread, then
|
||||
glXMakeContextCurrent will generate a BadAccess error.
|
||||
with:
|
||||
If ctx is an indirect context current to some other thread,
|
||||
then glXMakeContextCurrent will generate a BadAccess error.
|
||||
|
||||
Replace the following sentence from section 3.5 Rendering Contexts:
|
||||
If ctx is current to some other thread, then
|
||||
glXMakeCurrent will generate a BadAccess error.
|
||||
with:
|
||||
If ctx is an indirect context current to some other thread,
|
||||
then glXMakeCurrent will generate a BadAccess error.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None. The GLX extension only extends to direct rendering contexts.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
(1) What happens if the app binds a context/drawable in multiple
|
||||
threads, then binds a different context/thread in one of them?
|
||||
|
||||
As with binding a new context from the current thread, the old
|
||||
context's refcount is reduced and the new context's refcount is
|
||||
increased.
|
||||
|
||||
(2) What happens if the app binds a context/drawable in multiple
|
||||
threads, then binds None/None in one of them?
|
||||
|
||||
The GLX context is unreferenced from that thread, and the other
|
||||
threads retain their GLX context binding.
|
||||
|
||||
(3) What happens if the app binds a context/drawable in 7 threads,
|
||||
then destroys the context in one of them?
|
||||
|
||||
As with GLX context destruction previously, the XID is destroyed
|
||||
but the context remains usable by threads that have the context
|
||||
current.
|
||||
|
||||
(4) What happens if the app binds a new drawable/readable with
|
||||
glXMakeCurrent() when it is already bound to another thread?
|
||||
|
||||
The context becomes bound to the new drawable/readable, and
|
||||
further rendering in either thread will use the new
|
||||
drawable/readable.
|
||||
|
||||
(5) What requirements should be placed on the user managing contexts
|
||||
from multiple threads?
|
||||
|
||||
The intention is to allow multithreaded access to the GL at the
|
||||
minimal performance cost, so requiring that the GL do general
|
||||
synchronization (beyond that already required by context sharing)
|
||||
is not an option, and synchronizing of GL's access to the GL
|
||||
context between multiple threads is left to the application to do
|
||||
across GL calls. However, it would be unfortunate for a library
|
||||
doing multithread_makecurrent to require that other libraries
|
||||
share in synchronization for binding of their own contexts, so the
|
||||
refcounting of the contexts is required to be threadsafe.
|
||||
|
||||
(6) Does this apply to indirect contexts?
|
||||
|
||||
This was ignored in the initial revision of the spec. Behavior
|
||||
for indirect contexts is left as-is.
|
||||
|
||||
Revision History
|
||||
|
||||
20 November 2009 Eric Anholt - initial specification
|
||||
22 November 2009 Eric Anholt - added issues from Ian Romanick.
|
||||
3 February 2011 Eric Anholt - updated with resolution to issues 1-3
|
||||
3 February 2011 Eric Anholt - added issue 4, 5
|
||||
21 February 2011 Eric Anholt - Include glXMakeCurrent() sentence
|
||||
along with glXMakeContextCurrent() for removal.
|
@@ -48,7 +48,7 @@ IP Status
|
||||
|
||||
Issues
|
||||
|
||||
1. Should we also define UNPACK_INVERT_MESA for glDrawPixels, etc?
|
||||
1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc?
|
||||
|
||||
Resolved: No, we're only concerned with pixel packing. There are other
|
||||
solutions for inverting images when using glDrawPixels (negative Y pixel
|
||||
|
@@ -31,12 +31,12 @@ Overview
|
||||
|
||||
Mesa's implementation of GLX is entirely implemented on the client side.
|
||||
Therefore, Mesa cannot immediately detect when an X window or pixmap is
|
||||
destroyed in order to free any ancillary data associated with the window
|
||||
destroyed in order to free any ancilliary data associated with the window
|
||||
or pixmap.
|
||||
|
||||
The glxMesaReleaseBuffers() function can be used to explicitly indicate
|
||||
when the back color buffer, depth buffer, stencil buffer, and/or accumu-
|
||||
lation buffer associated with a drawable can be freed.
|
||||
when the back color buffer, depth buffer, stencil buffer, and/or accum-
|
||||
ulation buffer associated with a drawable can be freed.
|
||||
|
||||
IP Status
|
||||
|
||||
@@ -60,7 +60,7 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
|
||||
|
||||
Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
|
||||
|
||||
causes all software ancillary buffers (back buffer, depth, stencil,
|
||||
causes all software ancilliary buffers (back buffer, depth, stencil,
|
||||
accum, etc) associated with the named drawable to be immediately
|
||||
deallocated. True is returned if <d> is a valid Mesa GLX drawable,
|
||||
else False is returned. After calling glXReleaseBuffersMESA, the
|
||||
|
@@ -35,7 +35,7 @@ Overview
|
||||
|
||||
Mesa's glViewport command queries the current window size and updates
|
||||
its internal data structors accordingly. This normally works fine
|
||||
since most applications call glViewport in response to window size
|
||||
since most applications call glViewport in responce to window size
|
||||
changes.
|
||||
|
||||
In some situations, however, the application may not call glViewport
|
||||
@@ -65,7 +65,7 @@ Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated if glResizeBuffersMESA is called between
|
||||
INVALID_OPERATION is generated if ResizeBuffersMESA is called betweeen
|
||||
Begin and End.
|
||||
|
||||
New State
|
||||
|
@@ -88,8 +88,8 @@ Additions to the GLX 1.3 Specification
|
||||
this is typically the time required to display both the even and odd
|
||||
fields of a frame of video data.
|
||||
|
||||
If <interval> is set to a value of 0, buffer swaps are not synchro-
|
||||
nized to a video frame. The <interval> value is silently clamped to
|
||||
If <interval> is set to a value of 0, buffer swaps are not synchron-
|
||||
ized to a video frame. The <interval> value is silently clamped to
|
||||
the maximum implementation-dependent value supported before being
|
||||
stored.
|
||||
|
||||
|
@@ -328,7 +328,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
|
||||
|
||||
-- Section 3.8.10 "Texture Completeness"
|
||||
|
||||
Change the second paragraph (page 177) to say (spec changes identical
|
||||
Change the second paragaph (page 177) to say (spec changes identical
|
||||
to EXT_texture_array):
|
||||
|
||||
"For one-, two-, or three-dimensional textures and one- or
|
||||
@@ -443,10 +443,10 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
|
||||
Change second through fourth paragraphs (page 188) to say:
|
||||
|
||||
"Let D_t be the depth texture value, in the range [0, 1]. For
|
||||
texture lookups from one- and two-dimensional, rectangle, and
|
||||
texture lookups from one- and two-dimesional, rectangle, and
|
||||
one-dimensional array targets, let R be the interpolated <r>
|
||||
texture coordinate, clamped to the range [0, 1]. For texture lookups
|
||||
from two-dimensional array texture targets, let R be the interpolated
|
||||
from two-dimesional array texture targets, let R be the interpolated
|
||||
<q> texture coordinate, clamped to the range [0, 1]. Then the
|
||||
effective texture value L_t, I_t, or A_t is computed as follows:
|
||||
|
||||
@@ -604,7 +604,7 @@ Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
|
||||
|
||||
-- Section 5.4 "Display Lists"
|
||||
|
||||
Change the first paragraph on page 242 to say (spec changes
|
||||
Change the first paragraphi on page 242 to say (spec changes
|
||||
identical to EXT_texture_array):
|
||||
|
||||
"TexImage3D, TexImage2D, TexImage1D, Histogram, and ColorTable are
|
||||
|
@@ -44,7 +44,7 @@ Overview
|
||||
ARB_texture_compression_rgtc introduces some compressed red and
|
||||
red_green signed formats but no uncompressed ones, which might
|
||||
still be useful. NV_texture_shader adds signed texture formats,
|
||||
but also a lot of functionality which has been superseded by fragment
|
||||
but also a lot of functionality which has been superceded by fragment
|
||||
shaders.
|
||||
It is usually possible to get the same functionality
|
||||
using a unsigned format by doing scale and bias in a shader, but this
|
||||
@@ -105,7 +105,7 @@ Issues
|
||||
This is also different to what NV_texture_shader used.
|
||||
The above mapping should be considered the reference, but there
|
||||
is some leeway so other mappings are allowed for implementations which
|
||||
cannot do this. Particularly the mapping given in NV_texture_shader or
|
||||
cannot do this. Particulary the mapping given in NV_texture_shader or
|
||||
the standard OpenGL byte/float mapping is considered acceptable too, as
|
||||
might be a mapping which represents -1.0 by -128, 0.0 by 0 and 1.0 by
|
||||
127 (that is, uses different scale factors for negative and positive
|
||||
|
@@ -88,7 +88,7 @@ Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation)
|
||||
WindosPos4MESA takes four values indicating x, y, z, and w.
|
||||
WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only
|
||||
x, y, and z with w implicitly set to 1 (or only x and y with z
|
||||
implicitly set to 0 and w implicitly set to 1).
|
||||
implicititly set to 0 and w implicitly set to 1).
|
||||
|
||||
WindowPosMESA operates like RasterPos except that the current modelview
|
||||
matrix, projection matrix and viewport parameters are ignored and the
|
||||
@@ -108,7 +108,7 @@ GLX Protocol
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated if WindowPosMESA is called between
|
||||
INVALID_OPERATION is generated if WindowPosMESA is called betweeen
|
||||
Begin and End.
|
||||
|
||||
New State
|
||||
|
@@ -26,7 +26,7 @@ Number
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.0 or later is required
|
||||
This extension is written against the OpenGL 1.4 Specification.
|
||||
This extensions is written against the OpenGL 1.4 Specification.
|
||||
NV_texture_rectangle effects the definition of this extension.
|
||||
|
||||
Overview
|
||||
@@ -104,7 +104,7 @@ Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
|
||||
|
||||
|
||||
In section 3.6.4, Rasterization of Pixel Rectangles, on page 104,
|
||||
add the following to Table 3.12 (Packed pixel field assignments):
|
||||
add the following to Table 3.12 (Packed pixel fiedl assignments):
|
||||
|
||||
First Second Third Fourth
|
||||
Format Element Element Element Element
|
||||
|
@@ -1,10 +1,6 @@
|
||||
File: docs/README.WIN32
|
||||
|
||||
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.
|
||||
|
||||
Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
|
||||
|
||||
Quick Start
|
||||
----- -----
|
||||
@@ -134,5 +130,11 @@ 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.
|
||||
If you have a Windows-related build problem or question, it is
|
||||
probably better to direct it to me (kschultz@users.sourceforge.net),
|
||||
rather than directly to the other Mesa developers. I will help you as
|
||||
much as I can. I also monitor the Mesa mailing lists and will answer
|
||||
questions in this area there as well.
|
||||
|
||||
|
||||
Karl Schultz
|
||||
|
@@ -1,92 +0,0 @@
|
||||
Name
|
||||
|
||||
WL_bind_wayland_display
|
||||
|
||||
Name Strings
|
||||
|
||||
EGL_WL_bind_wayland_display
|
||||
|
||||
Contact
|
||||
|
||||
Kristian Høgsberg <krh@bitplanet.net>
|
||||
Benjamin Franzke <benjaminfranzke@googlemail.com>
|
||||
|
||||
Status
|
||||
|
||||
Proposal
|
||||
|
||||
Version
|
||||
|
||||
Version 1, March 1, 2011
|
||||
|
||||
Number
|
||||
|
||||
EGL Extension #not assigned
|
||||
|
||||
Dependencies
|
||||
|
||||
Requires EGL 1.4 or later. This extension is written against the
|
||||
wording of the EGL 1.4 specification.
|
||||
|
||||
EGL_KHR_base_image is required.
|
||||
|
||||
Overview
|
||||
|
||||
This extension provides entry points for binding and unbinding the
|
||||
wl_display of a Wayland compositor to an EGLDisplay. Binding a
|
||||
wl_display means that the EGL implementation should provide one or
|
||||
more interfaces in the Wayland protocol to allow clients to create
|
||||
wl_buffer objects. On the server side, this extension also
|
||||
provides a new target for eglCreateImageKHR, to create an EGLImage
|
||||
from a wl_buffer
|
||||
|
||||
Adding an implementation specific wayland interface, allows the
|
||||
EGL implementation to define specific wayland requests and events,
|
||||
needed for buffer sharing in an EGL wayland platform.
|
||||
|
||||
IP Status
|
||||
|
||||
Open-source; freely implementable.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
EGLBoolean eglBindWaylandDisplayWL(EGLDisplay dpy,
|
||||
struct wl_display *display);
|
||||
|
||||
EGLBoolean eglUnbindWaylandDisplayWL(EGLDisplay dpy,
|
||||
struct wl_display *display);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted as <target> in eglCreateImageKHR
|
||||
|
||||
EGL_WAYLAND_BUFFER_WL 0x31D5
|
||||
|
||||
Additions to the EGL 1.4 Specification:
|
||||
|
||||
To bind a server side wl_display to an EGLDisplay, call
|
||||
|
||||
EGLBoolean eglBindWaylandDisplayWL(EGLDisplay dpy,
|
||||
struct wl_display *display);
|
||||
|
||||
To unbind a server side wl_display from an EGLDisplay, call
|
||||
|
||||
EGLBoolean eglUnbindWaylandDisplayWL(EGLDisplay dpy,
|
||||
struct wl_display *display);
|
||||
|
||||
eglBindWaylandDisplayWL returns EGL_FALSE when there is already a
|
||||
wl_display bound to EGLDisplay otherwise EGL_TRUE.
|
||||
|
||||
eglUnbindWaylandDisplayWL returns EGL_FALSE when there is no
|
||||
wl_display bound to the EGLDisplay currently otherwise EGL_TRUE.
|
||||
|
||||
Import a wl_buffer by calling eglCreateImageKHR with
|
||||
wl_buffer as EGLClientBuffer, EGL_WAYLAND_BUFFER_WL as the target,
|
||||
and an empty attribute_list.
|
||||
|
||||
Issues
|
||||
|
||||
Revision History
|
||||
|
||||
Version 1, March 1, 2011
|
||||
Initial draft (Benjamin Franzke)
|
@@ -62,7 +62,6 @@ a:visited {
|
||||
<LI><A HREF="perf.html" target="MainFrame">Performance Tips</A>
|
||||
<LI><A HREF="extensions.html" target="MainFrame">Mesa Extensions</A>
|
||||
<LI><A HREF="mangling.html" target="MainFrame">Function Name Mangling</A>
|
||||
<LI><A href="llvmpipe.html" target="MainFrame">Gallium llvmpipe driver</A>
|
||||
</ul>
|
||||
|
||||
<b>Developer Topics</b>
|
||||
|
@@ -21,52 +21,76 @@ When a new release is coming, release candidates (betas) may be found
|
||||
|
||||
|
||||
<p>
|
||||
The Mesa package is named MesaLib-x.y.z.{tar.bz2, tar.gz, zip} where x.y.z
|
||||
is the version. There are three types of compressed archives.
|
||||
Mesa is distributed in several parts:
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>MesaLib-x.y.z</b> - the main Mesa library source code, drivers
|
||||
and documentation.
|
||||
</li>
|
||||
<li><b>MesaDemos-x.y.z</b> - OpenGL demonstration and test programs.
|
||||
Most of the programs require GLUT (either the
|
||||
<a href="http://www.opengl.org/resources/libraries/glut"
|
||||
target="_parent">original GLUT by Mark Kilgard</a> or
|
||||
<a href="http://freeglut.sourceforge.net" target="_parent">freeglut</a> or
|
||||
<a href="http://openglut.sourceforge.net" target="_parent">OpenGLUT</a>).
|
||||
</li>
|
||||
<li><b>MesaGLUT-x.y.z</b> - Mark Kilgard's GLUT, easily compiled and used
|
||||
with Mesa. Plus, other implementation of GLUT for DOS, OS/2, BeOS, etc.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
There's also the MesaGLUT-x.y.z.{tar.bz2, tar.gz, zip} packages which
|
||||
contain Mark Kilgard's GLUT library.
|
||||
This is optional.
|
||||
Most Linux distributions include an implementation of GLUT (such as freeglut).
|
||||
</p>
|
||||
<p>
|
||||
In the past, the Mesa demos collection was distributed as
|
||||
MesaDemos-x.y.z.{tar.bz2, tar.gz, zip}.
|
||||
Now, the
|
||||
<a href="ftp://ftp.freedesktop.org/pub/mesa/demos/" target="_parent">
|
||||
Mesa demos</a> are distributed separately.
|
||||
If you're not interested in running the demos, you'll only need the first
|
||||
package.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you're new to this and not sure what you're doing, grab all three packages.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The packages are available in .tar.gz, .tar.bz2 and .zip formats.
|
||||
Other sites might offer additional package formats.
|
||||
</p>
|
||||
|
||||
<H1>Unpacking</H1>
|
||||
|
||||
<p>
|
||||
To unpack .tar.gz files:
|
||||
All the packages should be in the same directory prior to unpacking.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>To unpack .tar.gz files:
|
||||
<pre>
|
||||
tar zxf MesaLib-x.y.z.tar.gz
|
||||
tar zxf MesaLib-X.Y.tar.gz
|
||||
tar zxf MesaDemos-X.Y.tar.gz
|
||||
tar zxf MesaGLUT-X.Y.tar.gz
|
||||
</pre>
|
||||
or
|
||||
<pre>
|
||||
gzcat MesaLib-x.y.z.tar.gz | tar xf -
|
||||
gzcat MesaLib-X.Y.tar.gz | tar xf -
|
||||
gzcat MesaDemos-X.Y.tar.gz | tar xf -
|
||||
gzcat MesaGLUT-X.Y.tar.gz | tar xf -
|
||||
</pre>
|
||||
or
|
||||
<pre>
|
||||
gunzip MesaLib-x.y.z.tar.gz ; tar xf MesaLib-x.y.z.tar
|
||||
gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
|
||||
gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaDemos-X.Y.tar
|
||||
gunzip MesaGLUT-X.Y.tar.gz ; tar xf MesaGLUT-X.Y.tar
|
||||
</pre>
|
||||
<p>
|
||||
To unpack .tar.bz2 files:
|
||||
</p>
|
||||
<li>To unpack .tar.bz2 files:
|
||||
<pre>
|
||||
bunzip2 -c MesaLib-x.y.z.tar.gz | tar xf -
|
||||
bunzip2 -c MesaLib-X.Y.tar.gz | tar xf -
|
||||
bunzip2 -c MesaDemos-X.Y.tar.gz | tar xf -
|
||||
bunzip2 -c MesaGLUT-X.Y.tar.gz | tar xf -
|
||||
</pre>
|
||||
<p>
|
||||
To unpack .zip files:
|
||||
</p>
|
||||
<li>To unpack .zip files:
|
||||
<pre>
|
||||
unzip MesaLib-x.y.z.zip
|
||||
unzip MesaLib-X.Y.zip
|
||||
unzip MesaDemos-X.Y.zip
|
||||
unzip MesaGLUT-X.Y.zip
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1>Contents</h1>
|
||||
@@ -82,13 +106,22 @@ bin/ - shell scripts for making shared libraries, etc
|
||||
docs/ - documentation
|
||||
src/ - source code for libraries
|
||||
src/mesa - sources for the main Mesa library and device drivers
|
||||
src/gallium - sources for Gallium and Gallium drivers
|
||||
src/glu - libGLU source code
|
||||
src/glx - sources for building libGL with full GLX and DRI support
|
||||
src/glw - Xt/Motif/OpenGL widget code
|
||||
</pre>
|
||||
|
||||
If you downloaded and unpacked the MesaGLUT.x.y.z package:
|
||||
If you downloaded and unpacked the MesaDemos.X.Y package:
|
||||
|
||||
<pre>
|
||||
progs/demos - original Mesa demos
|
||||
progs/xdemos - GLX OpenGL/Mesa demos
|
||||
progs/redbook - examples from the OpenGL Programming Guide
|
||||
progs/samples - examples from SGI
|
||||
progs/images/ - image files
|
||||
</pre>
|
||||
|
||||
If you downloaded and unpacked the MesaGLUT.X.Y package:
|
||||
<pre>
|
||||
src/glut - GLUT library source code
|
||||
</pre>
|
||||
|
@@ -19,7 +19,10 @@ API entry points and helper functions for use by the drivers. Drivers are
|
||||
dynamically loaded by the main library and most of the EGL API calls are
|
||||
directly dispatched to the drivers.</p>
|
||||
|
||||
<p>The driver in use decides the window system to support.</p>
|
||||
<p>The driver in use decides the window system to support. For drivers that
|
||||
support hardware rendering, there are usually multiple drivers supporting the
|
||||
same window system. Each one of of them supports a certain range of graphics
|
||||
cards.</p>
|
||||
|
||||
<h2>Build EGL</h2>
|
||||
|
||||
@@ -83,8 +86,16 @@ select the right platforms automatically.</p>
|
||||
|
||||
<li><code>--enable-gles1</code> and <code>--enable-gles2</code>
|
||||
|
||||
<p>These options enable OpenGL ES support in OpenGL. The result is one big
|
||||
internal library that supports multiple APIs.</p>
|
||||
<p>These options enable OpenGL ES support in OpenGL. The result is
|
||||
one big library that supports multiple APIs.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--enable-gles-overlay</code>
|
||||
|
||||
<p>This option enables OpenGL ES as separate libraries. This is an alternative
|
||||
approach to enable OpenGL ES. It is only supported by
|
||||
<code>egl_gallium</code>.</p>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -123,24 +134,13 @@ colon-separated directories where the main library will look for drivers, in
|
||||
addition to the default directory. This variable is ignored for setuid/setgid
|
||||
binaries.</p>
|
||||
|
||||
<p>This variable is usually set to test an uninstalled build. For example, one
|
||||
may set</p>
|
||||
|
||||
<pre>
|
||||
$ export LD_LIBRARY_PATH=$mesa/lib
|
||||
$ export EGL_DRIVERS_PATH=$mesa/lib/egl
|
||||
</pre>
|
||||
|
||||
<p>to test a build without installation</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>EGL_DRIVER</code>
|
||||
|
||||
<p>This variable specifies a full path to or the name of an EGL driver. It
|
||||
forces the specified EGL driver to be loaded. It comes in handy when one wants
|
||||
to test a specific driver. This variable is ignored for setuid/setgid
|
||||
binaries.</p>
|
||||
<p>This variable specifies a full path to an EGL driver and it forces the
|
||||
specified EGL driver to be loaded. It comes in handy when one wants to test a
|
||||
specific driver. This variable is ignored for setuid/setgid binaries.</p>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -180,10 +180,8 @@ variable to true forces the use of software rendering.</p>
|
||||
<li><code>egl_dri2</code>
|
||||
|
||||
<p>This driver supports both <code>x11</code> and <code>drm</code> platforms.
|
||||
It functions as a DRI driver loader. For <code>x11</code> support, it talks to
|
||||
the X server directly using (XCB-)DRI2 protocol.</p>
|
||||
|
||||
<p>This driver can share DRI drivers with <code>libGL</code>.</p>
|
||||
It functions as a DRI2 driver loader. For <code>x11</code> support, it talks
|
||||
to the X server directly using (XCB-)DRI2 protocol.</p>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -193,10 +191,6 @@ the X server directly using (XCB-)DRI2 protocol.</p>
|
||||
hardwares supported by Gallium3D. It is the only driver that supports OpenVG.
|
||||
The supported platforms are X11, DRM, FBDEV, and GDI.</p>
|
||||
|
||||
<p>This driver comes with its own hardware drivers
|
||||
(<code>pipe_<hw></code>) and client API modules
|
||||
(<code>st_<api></code>).</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>egl_glx</code>
|
||||
@@ -208,21 +202,6 @@ is not available in GLX or GLX extensions.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Packaging</h2>
|
||||
|
||||
<p>The ABI between the main library and its drivers are not stable. Nor is
|
||||
there a plan to stabilize it at the moment. Of the EGL drivers,
|
||||
<code>egl_gallium</code> has its own hardware drivers and client API modules.
|
||||
They are considered internal to <code>egl_gallium</code> and there is also no
|
||||
stable ABI between them. These should be kept in mind when packaging for
|
||||
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>
|
||||
may either be disabled with <code>--disable-gallium-egl</code> or packaged
|
||||
separately.</p>
|
||||
|
||||
<h2>Developers</h2>
|
||||
|
||||
<p>The sources of the main library and the classic drivers can be found at
|
||||
|
@@ -9,38 +9,17 @@
|
||||
<H1>Environment Variables</H1>
|
||||
|
||||
<p>
|
||||
Normally, no environment variables need to be set. Most of the environment
|
||||
variables used by Mesa/Gallium are for debugging purposes, but they can
|
||||
sometimes be useful for debugging end-user issues.
|
||||
Mesa supports the following environment variables:
|
||||
</p>
|
||||
|
||||
|
||||
<H2>LibGL environment variables</H2>
|
||||
|
||||
<ul>
|
||||
<li>LIBGL_DEBUG - If defined debug information will be printed to stderr.
|
||||
If set to 'verbose' additional information will be printed.
|
||||
<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
|
||||
<li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
|
||||
<li>LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering
|
||||
<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<H2>Core Mesa environment variables</H2>
|
||||
|
||||
<ul>
|
||||
<li>MESA_NO_ASM - if set, disables all assembly language optimizations
|
||||
<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
|
||||
<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
|
||||
<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
|
||||
<li>MESA_DEBUG - if set, error messages are printed to stderr. For example,
|
||||
if the application generates a GL_INVALID_ENUM error, a corresponding error
|
||||
message indicating where the error occured, and possibly why, will be
|
||||
printed to stderr.<br>
|
||||
If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will
|
||||
generate exceptions.
|
||||
<li>MESA_DEBUG - if set, error messages are printed to stderr.
|
||||
If the value of MESA_DEBUG is "FP" floating point arithmetic errors will
|
||||
generate exceptions.
|
||||
<li>MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER)
|
||||
<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
|
||||
fragment programs (intended for developers only)
|
||||
<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
|
||||
@@ -49,23 +28,11 @@ Setting this variable automatically sets the MESA_TEX_PROG variable as well.
|
||||
<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
|
||||
A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
|
||||
and disable the GL_EXT_bar extension.
|
||||
<li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
|
||||
by extension year.
|
||||
If this variable is set to year X, only extensions defined on or before year
|
||||
X will be reported.
|
||||
This is to work-around a bug in some games where the extension string is
|
||||
copied into a fixed-size buffer without truncating.
|
||||
If the extension string is too long, the buffer overrun can cause the game
|
||||
to crash.
|
||||
This is a work-around for that.
|
||||
<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
|
||||
<li>MESA_GLSL - <a href="shading.html#envvars">shading language options</a>
|
||||
</ul>
|
||||
|
||||
|
||||
<H2>Mesa Xlib driver environment variables</H2>
|
||||
|
||||
<p>
|
||||
The following are only applicable to the Mesa Xlib software driver.
|
||||
The following are only applicable to the Xlib software driver.
|
||||
See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
|
||||
</p>
|
||||
<ul>
|
||||
@@ -84,8 +51,9 @@ See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>i945/i965 driver environment variables (non-Gallium)</h2>
|
||||
|
||||
<p>
|
||||
These environment variables are for the Intel i945/i965 drivers:
|
||||
</p>
|
||||
<ul>
|
||||
<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
|
||||
OpenGL conformance. If set to 2, always use software rendering.
|
||||
@@ -94,71 +62,17 @@ See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Radeon R300 driver environment variables (non-Gallium)</h2>
|
||||
|
||||
<p>
|
||||
These environment variables are for the Radeon R300 driver:
|
||||
</p>
|
||||
<ul>
|
||||
<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>EGL environment variables</h2>
|
||||
|
||||
<p>
|
||||
Mesa EGL supports different sets of environment variables. See the
|
||||
<a href="egl.html">Mesa EGL</a> page for the details.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Gallium environment variables</h2>
|
||||
|
||||
<ul>
|
||||
<li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
|
||||
variables which are used, and their current values.
|
||||
<li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
|
||||
shader execution
|
||||
<li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
|
||||
shader execution
|
||||
<li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
|
||||
<li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
|
||||
print any errors to stderr.
|
||||
<LI>DRAW_FSE - ???
|
||||
<LI>DRAW_NO_FSE - ???
|
||||
<li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
|
||||
shaders, vertex fetch, etc.
|
||||
</ul>
|
||||
|
||||
<h3>Softpipe driver environment variables</h3>
|
||||
<ul>
|
||||
<li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
|
||||
to stderr
|
||||
<li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
|
||||
to stderr
|
||||
<li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>LLVMpipe driver environment variables</h3>
|
||||
<ul>
|
||||
<li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
|
||||
<li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
|
||||
source code for details.
|
||||
<li>LP_PERF - a comma-separated list of options to selectively no-op various
|
||||
parts of the driver. See the source code for details.
|
||||
<li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
|
||||
Zero turns of threading completely. The default value is the number of CPU
|
||||
cores present.
|
||||
</ul>
|
||||
|
||||
|
||||
<p>
|
||||
Other Gallium drivers have their own environment variables. These may change
|
||||
frequently so the source code should be consulted for details.
|
||||
</p>
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
@@ -12,16 +12,16 @@
|
||||
<ol>
|
||||
<li><a href="#unix-x11">Unix / X11</a>
|
||||
<ul>
|
||||
<li><a href="#prereq-general">General prerequisites for building</a>
|
||||
<li><a href="#prereq-dri">Prerequisites for DRI and hardware acceleration</a>
|
||||
<li><a href="#prereq">Prerequisites for DRI and hardware acceleration</a>
|
||||
<li><a href="#autoconf">Building with autoconf</a>
|
||||
<li><a href="#traditional">Building with traditional Makefiles</a>
|
||||
<li><a href="#libs">The Libraries</a>
|
||||
<li><a href="#demos">Running the demos
|
||||
<li><a href="#install">Installing the header and library files
|
||||
<li><a href="#pkg-config">Building OpenGL programs with pkg-config
|
||||
</ul>
|
||||
<li><a href="#windows">Windows</a>
|
||||
<li><a href="#scons">Building with SCons</a>
|
||||
<li><a href="#scons">SCons</a>
|
||||
<li><a href="#other">Other</a>
|
||||
</ol>
|
||||
<br>
|
||||
@@ -31,22 +31,8 @@
|
||||
<H2>1. Unix/X11 Compilation and Installation</H1>
|
||||
|
||||
|
||||
<a name="prereq-general">
|
||||
<h3>1.1 General prerequisites for building</h3>
|
||||
|
||||
<ul>
|
||||
<li>lex / yacc - for building the GLSL compiler.
|
||||
On Linux systems, flex and bison are used.
|
||||
Versions 2.5.35 and 2.4.1, respectively, (or later) should work.
|
||||
</li>
|
||||
<li>python - Python is needed for building the Gallium components.
|
||||
Version 2.6.4 or later should work.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="prereq-dri">
|
||||
<h3>1.2 Prerequisites for DRI and hardware acceleration</h3>
|
||||
<a name="prereq">
|
||||
<h3>1.1 Prerequisites for DRI and hardware acceleration</h3>
|
||||
|
||||
<p>
|
||||
The following are required for DRI-based hardware acceleration with Mesa:
|
||||
@@ -63,7 +49,7 @@ version 2.4.15 or later
|
||||
|
||||
|
||||
<a name="autoconf">
|
||||
<h3>1.3 Building with Autoconf</h3>
|
||||
<h3>1.2 Building with Autoconf</h3>
|
||||
|
||||
<p>
|
||||
Mesa may be <a href="autoconf.html">built using autoconf</a>.
|
||||
@@ -73,7 +59,7 @@ If that fails the traditional Mesa build system is available.
|
||||
|
||||
|
||||
<a name="traditional">
|
||||
<h3>1.4 Building with traditional Makefiles</h3>
|
||||
<h3>1.3 Building with traditional Makefiles</h3>
|
||||
|
||||
<p>
|
||||
The traditional Mesa build system is based on a collection of pre-defined
|
||||
@@ -140,7 +126,7 @@ Later, if you want to rebuild for a different configuration run
|
||||
|
||||
|
||||
<a name="libs">
|
||||
<h3>1.5 The libraries</h3>
|
||||
<h3>1.4 The libraries</h3>
|
||||
|
||||
<p>
|
||||
When compilation has finished, look in the top-level <code>lib/</code>
|
||||
@@ -199,11 +185,81 @@ If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
||||
-rwxr-xr-x 1 brian users 10997120 Jul 21 12:13 unichrome_dri.so
|
||||
</pre>
|
||||
|
||||
|
||||
<a name="demos">
|
||||
<h3>1.5 Running the demos</h3>
|
||||
|
||||
<p>
|
||||
If you built with Gallium support, look in lib/gallium/ for Gallium-based
|
||||
versions of libGL and device drivers.
|
||||
If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
|
||||
obtained Mesa from CVS, the <b>progs/</b> directory will contain a
|
||||
bunch of demonstration programs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Before running a demo, you'll probably have to set two environment variables
|
||||
to indicate where the libraries are located. For example:
|
||||
<p>
|
||||
<blockquote>
|
||||
<b>cd lib/</b>
|
||||
<br>
|
||||
<b>export LD_LIBRARY_PATH=${PWD}</b>
|
||||
<br>
|
||||
<b>export LIBGL_DRIVERS_PATH=${PWD}</b> (if using DRI drivers)
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
Next, change to the Mesa/demos/ directory:
|
||||
</p>
|
||||
<blockquote>
|
||||
<b>cd ../progs/demos</b>
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
Run a demo such as gears:
|
||||
</p>
|
||||
<blockquote>
|
||||
<b>./gears</b>
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
If this doesn't work, try the <b>Mesa/progs/xdemos/glxinfo</b> program
|
||||
and see that it prints the expected Mesa version number.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you're using Linux or a similar OS, verify that the demo program is
|
||||
being linked with the proper library files:
|
||||
</p>
|
||||
<blockquote>
|
||||
<b>ldd gears</b>
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
You should see something like this:
|
||||
</p>
|
||||
<pre>
|
||||
libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
|
||||
libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
|
||||
libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
|
||||
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
|
||||
libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
|
||||
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
|
||||
libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
|
||||
libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
|
||||
libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
|
||||
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
|
||||
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
|
||||
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
|
||||
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
|
||||
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
|
||||
libdl.so.2 => /lib/libdl.so.2 (0x40644000)
|
||||
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
|
||||
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Retrace your steps if this doesn't look right.
|
||||
</p>
|
||||
|
||||
|
||||
<a name="install">
|
||||
|
@@ -11,22 +11,6 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<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 release.
|
||||
</p>
|
||||
|
||||
<h2>March 2, 2011</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.9.2.html">Mesa 7.9.2</a> and
|
||||
<a href="relnotes-7.10.1.html">Mesa 7.10.1</a> are released. These are
|
||||
stable releases containing bug fixes since the 7.9.1 and 7.10 releases.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>October 4, 2010</h2>
|
||||
|
||||
<p>
|
||||
|
@@ -17,7 +17,7 @@ target="_parent"> http://www.khronos.org/opengles/</a>.</p>
|
||||
|
||||
<h2>Build the Libraries</h2>
|
||||
<ol>
|
||||
<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code> and enable the Gallium driver for your hardware.</li>
|
||||
<li>Run <code>configure</code> with <code>--enable-gles-overlay</code> and enable the Gallium driver for your hardware.</li>
|
||||
<li>Build and install Mesa as usual.</li>
|
||||
</ol>
|
||||
|
||||
@@ -53,6 +53,8 @@ your build. For example,</p>
|
||||
<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>
|
||||
<tr><td><code>libes1gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>y</td><td>n</td></tr>
|
||||
<tr><td><code>libes2gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>n</td><td>y</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Dispatch Table</h3>
|
||||
|
@@ -1,380 +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.1 Release Notes / TBD</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.10.1 is a bug fix release which fixes bugs found since the 7.10 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.10.1 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
4b4cee19f3bf16eb78bd4cc278ccf812 MesaLib-7.10.1.tar.gz
|
||||
efe8da4d80c2a5d32a800770b8ce5dfa MesaLib-7.10.1.tar.bz2
|
||||
0fd2b1a025934de3f8cecf9fb9b57f4c MesaLib-7.10.1.zip
|
||||
42beb0f5188d544476c19496f725fa67 MesaGLUT-7.10.1.tar.gz
|
||||
637bb8a20fdad89f7382b4ea83f896e3 MesaGLUT-7.10.1.tar.bz2
|
||||
bdbf3ffb2606d6aa8afabb6c6243b91b MesaGLUT-7.10.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<p>This list is likely incomplete.</p>
|
||||
<ul>
|
||||
<li>Fix an off-by-one bug in a vsplit assertion.</li>
|
||||
<li>Fix incorrect handling of <tt>layout</tt> qualifier
|
||||
with <tt>in</tt>, <tt>out</tt>, <tt>attribute</tt>, and <tt>varying</tt>.</li>
|
||||
|
||||
<li>Fix an i965 shader bug where the negative absolute value was generated instead of the absolute value of a negation.</li>
|
||||
|
||||
<li>Fix numerous issues handling precision qualifiers in GLSL ES.</li>
|
||||
|
||||
<li>Fixed a few GLX protocol encoder bugs (Julien Cristau)</li>
|
||||
|
||||
<li>Assorted Gallium llvmpipe driver bug fixes</li>
|
||||
|
||||
<li>Assorted Mesa/Gallium state tracker bug fixes</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26795">Bug 26795</a> - gl_FragCoord off by one in Gallium drivers.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29164">Bug 29164</a> - [GLSL 1.20] invariant variable shouldn't be used before declaration</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29823">Bug 29823</a> - GetUniform[if]v busted</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29927">Bug 29927</a> - [glsl2] fail to compile shader with constructor for array of struct type</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30156">Bug 30156</a> - [i965] After updating to Mesa 7.9, Civilization IV starts to show garbage</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31923">Bug 31923</a> - [GLSL 1.20] allowing inconsistent centroid declaration between two vertex shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31925">Bug 31925</a> - [GLSL 1.20] "#pragma STDGL invariant(all)" fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32214">Bug 32214</a> - [gles2]no link error happens when missing vertex shader or frag shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32375">Bug 32375</a> - [gl gles2] Not able to get the attribute by function glGetVertexAttribfv</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32541">Bug 32541</a> - Segmentation Fault while running an HDR (high dynamic range) rendering demo</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32569">Bug 32569</a> - [gles2] glGetShaderPrecisionFormat not implemented yet</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32695">Bug 32695</a> - [glsl] SIGSEGV glcpp/glcpp-parse.y:833</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32831">Bug 32831</a> - [glsl] division by zero crashes GLSL compiler</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32910">Bug 32910</a> - Keywords 'in' and 'out' not handled properly for GLSL 1.20 shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33219">Bug 33219</a> -[GLSL bisected] implicit sized array triggers segfault in ir_to_mesa_visitor::copy_propagate</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33306">Bug 33306</a> - GLSL integer division by zero crashes GLSL compiler</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33308">Bug 33308</a> -[glsl] ast_to_hir.cpp:3016: virtual ir_rvalue* ast_jump_statement::hir(exec_list*, _mesa_glsl_parse_state*): Assertion `ret != __null' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33316">Bug 33316</a> - uniform array will be allocate one line more and initialize it when it was freed will abort</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33386">Bug 33386</a> - Dubious assembler in read_rgba_span_x86.S</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33388">Bug 33388</a> - Dubious assembler in xform4.S</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33433">Bug 33433</a> - Error in x86-64 API dispatch code.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33507">Bug 33507</a> - [glsl] GLSL preprocessor modulus by zero crash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33508">Bug 33508</a> - [glsl] GLSL compiler modulus by zero crash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33916">Bug 33916</a> - Compiler accepts reserved operators % and %=</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34030">Bug 34030</a> - [bisected] Starcraft 2: some effects are corrupted or too big</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34047">Bug 34047</a> - Assert in _tnl_import_array() when using GLfixed vertex datatypes with GLESv2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34114">Bug 34114</a> - Sun Studio build fails due to standard library functions not being in global namespace</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34179">Bug 34179</a> - Nouveau 3D driver: nv50_pc_emit.c:863 assertion error kills Compiz</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34198">Bug 34198</a> - [GLSL] implicit sized array with index 0 used gets assertion</li>
|
||||
|
||||
<li><a href="https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/691653">Ubuntu bug 691653</a> - compiz crashes when using alt-tab (the radeon driver kills it) </li>
|
||||
|
||||
<li><a href="https://bugs.meego.com/show_bug.cgi?id=13005">Meego bug 13005</a> - Graphics GLSL issue lead to camera preview fail on Pinetrail</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..mesa-7.10.1
|
||||
</pre>
|
||||
|
||||
<p>Alberto Milone (1):
|
||||
<ul>
|
||||
<li>r600c: add evergreen ARL support.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Brian Paul (21):
|
||||
<ul>
|
||||
<li>draw: Fix an off-by-one bug in a vsplit assertion.</li>
|
||||
<li>docs: add links to 7.9.1 and 7.10 release notes</li>
|
||||
<li>docs: added news item for 7.9.1 and 7.10 release</li>
|
||||
<li>gallivm: work around LLVM 2.6 bug when calling C functions</li>
|
||||
<li>gallivm: fix copy&paste error from previous commit</li>
|
||||
<li>mesa: fix a few format table mistakes, assertions</li>
|
||||
<li>mesa: fix num_draw_buffers==0 in fixed-function fragment program generation</li>
|
||||
<li>mesa: don't assert in GetIntegerIndexed, etc</li>
|
||||
<li>mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
|
||||
<li>llvmpipe: make sure binning is active when we begin/end a query</li>
|
||||
<li>st/mesa: fix incorrect fragcoord.x translation</li>
|
||||
<li>softpipe: fix off-by-one error in setup_fragcoord_coeff()</li>
|
||||
<li>cso: fix loop bound in cso_set_vertex_samplers()</li>
|
||||
<li>st/mesa: fix incorrect glCopyPixels position on fallback path</li>
|
||||
<li>st/mesa: set renderbuffer _BaseFormat in a few places</li>
|
||||
<li>st/mesa: fix the default case in st_format_datatype()</li>
|
||||
<li>st/mesa: need to translate clear color according to surface's base format</li>
|
||||
<li>docs: update 7.9.2 release notes with Brian's cherry-picks</li>
|
||||
<li>docs: add link to 7.10.1 release notes</li>
|
||||
<li>mesa: implement glGetShaderPrecisionFormat()</li>
|
||||
<li>docs: updated environment variable list</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Bryce Harrington (1):
|
||||
<ul>
|
||||
<li>r300g: Null pointer check for buffer deref in gallium winsys</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chad Versace (20):
|
||||
<ul>
|
||||
<li>glsl: At link-time, check that globals have matching centroid qualifiers</li>
|
||||
<li>glcpp: Fix segfault when validating macro redefinitions</li>
|
||||
<li>glsl: Fix parser rule for type_specifier</li>
|
||||
<li>glsl: Change default value of ast_type_specifier::precision</li>
|
||||
<li>glsl: Add semantic checks for precision qualifiers</li>
|
||||
<li>glsl: Add support for default precision statements</li>
|
||||
<li>glsl: Remove redundant semantic check in parser</li>
|
||||
<li>glsl: Fix semantic checks on precision qualifiers</li>
|
||||
<li>glsl: Fix segfault due to missing printf argument</li>
|
||||
<li>glsl: Mark 'in' variables at global scope as read-only</li>
|
||||
<li>mesa: Refactor handling of extension strings</li>
|
||||
<li>mesa: Add/remove extensions in extension string</li>
|
||||
<li>mesa: Change dependencies of some OES extension strings</li>
|
||||
<li>mesa: Change OES_point_sprite to depend on ARB_point_sprite</li>
|
||||
<li>mesa: Change OES_standard_derivatives to be stand-alone extension</li>
|
||||
<li>i915: Disable extension OES_standard_derivatives</li>
|
||||
<li>glcpp: Raise error when modulus is zero</li>
|
||||
<li>glsl: Set operators '%' and '%=' to be reserved when GLSL < 1.30</li>
|
||||
<li>glsl: Reinstate constant-folding for division by zero</li>
|
||||
<li>tnl: Add support for datatype GL_FIXED in vertex arrays</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chia-I Wu (1):
|
||||
<ul>
|
||||
<li>mesa: Add glDepthRangef and glClearDepthf to APIspec.xml.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Christoph Bumiller (1):
|
||||
<ul>
|
||||
<li>nv50,nvc0: do not forget to apply sign mode to saved TGSI inputs</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Cyril Brulebois (1):
|
||||
<ul>
|
||||
<li>Point to bugs.freedesktop.org rather than bugzilla.freedesktop.org</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dave Airlie (3):
|
||||
<ul>
|
||||
<li>radeon/r200: fix fbo-clearmipmap + gen-teximage</li>
|
||||
<li>radeon: calculate complete texture state inside TFP function</li>
|
||||
<li>radeon: avoid segfault on 3D textures.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dimitry Andric (4):
|
||||
<ul>
|
||||
<li>mesa: s/movzx/movzbl/</li>
|
||||
<li>mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S</li>
|
||||
<li>glapi: adding @ char before type specifier in glapi_x86.S</li>
|
||||
<li>glapi: add @GOTPCREL relocation type</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Eric Anholt (16):
|
||||
<ul>
|
||||
<li>glsl: Fix the lowering of variable array indexing to not lose write_masks.</li>
|
||||
<li>i965/fs: When producing ir_unop_abs of an operand, strip negate.</li>
|
||||
<li>i965/vs: When MOVing to produce ABS, strip negate of the operand.</li>
|
||||
<li>i965/fs: Do flat shading when appropriate.</li>
|
||||
<li>i965: Avoid double-negation of immediate values in the VS.</li>
|
||||
<li>intel: Make renderbuffer tiling choice match texture tiling choice.</li>
|
||||
<li>i965: Fix dead pointers to fp->Parameters->ParameterValues[] after realloc.</li>
|
||||
<li>docs: Add a relnote for the Civ IV on i965.</li>
|
||||
<li>glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility.</li>
|
||||
<li>mesa: Add extension enable bit for GL_ARB_ES2_compatibility.</li>
|
||||
<li>mesa: Add actual support for glReleaseShaderCompiler from ES2.</li>
|
||||
<li>mesa: Add support for glDepthRangef and glClearDepthf.</li>
|
||||
<li>mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.</li>
|
||||
<li>mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.</li>
|
||||
<li>i965: Fix a bug in i965 compute-to-MRF.</li>
|
||||
<li>i965/fs: Add a helper function for detecting math opcodes.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Fredrik Höglund (1):
|
||||
<ul>
|
||||
<li>st/mesa: fix a regression from cae2bb76</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Ian Romanick (42):
|
||||
<ul>
|
||||
<li>docs: Add 7.10 md5sums</li>
|
||||
<li>glsl: Support the 'invariant(all)' pragma</li>
|
||||
<li>glcpp: Generate an error for division by zero</li>
|
||||
<li>glsl: Add version_string containing properly formatted GLSL version</li>
|
||||
<li>glsl & glcpp: Refresh autogenerated lexer and parser files.</li>
|
||||
<li>glsl: Disallow 'in' and 'out' on globals in GLSL 1.20</li>
|
||||
<li>glsl: Track variable usage, use that to enforce semantics</li>
|
||||
<li>glsl: Allow 'in' and 'out' when 'layout' is also available</li>
|
||||
<li>docs: Initial bits of 7.10.1 release notes</li>
|
||||
<li>mesa: bump version to 7.10.1-devel</li>
|
||||
<li>doc: Update 7.10.1 release notes</li>
|
||||
<li>glsl: Emit errors or warnings when 'layout' is used with 'attribute' or 'varying'</li>
|
||||
<li>docs: Update 7.10.1 release notes</li>
|
||||
<li>glsl: Refresh autogenerated lexer and parser files.</li>
|
||||
<li>glsl: Don't assert when the value returned by a function has no rvalue</li>
|
||||
<li>linker: Set sizes for non-global arrays as well</li>
|
||||
<li>linker: Propagate max_array_access while linking functions</li>
|
||||
<li>docs: Update 7.10.1 release notes</li>
|
||||
<li>mesa: glGetUniform only returns a single element of an array</li>
|
||||
<li>linker: Generate link errors when ES shaders are missing stages</li>
|
||||
<li>mesa: Fix error checks in GetVertexAttrib functions</li>
|
||||
<li>Use C-style system headers in C++ code to avoid issues with std:: namespace</li>
|
||||
<li>docs: Update 7.10.1 release notes</li>
|
||||
<li>glapi: Regenerate for GL_ARB_ES2_compatibility.</li>
|
||||
<li>mesa: Connect glGetShaderPrecisionFormat into the dispatch table</li>
|
||||
<li>i965: Set correct values for range/precision of fragment shader types</li>
|
||||
<li>i915: Set correct values for range/precision of fragment shader types</li>
|
||||
<li>intel: Fix typeos from 3d028024 and 790ff232</li>
|
||||
<li>glsl: Ensure that all GLSL versions are supported in the stand-alone compiler</li>
|
||||
<li>glsl: Reject shader versions not supported by the implementation</li>
|
||||
<li>mesa: Initial size for secondary color array is 3</li>
|
||||
<li>glsl: Finish out the reduce/reduce error fixes</li>
|
||||
<li>glsl: Regenerate compiler and glcpp files from cherry picks</li>
|
||||
<li>linker: Fix off-by-one error implicit array sizing</li>
|
||||
<li>docs: update 7.10.1 release notes with Ian's recent cherry picks</li>
|
||||
<li>i915: Only mark a register as available if all components are written</li>
|
||||
<li>i915: Calculate partial result to temp register first</li>
|
||||
<li>i915: Force lowering of all types of indirect array accesses in the FS</li>
|
||||
<li>docs: Update 7.10.1 with (hopefully) the last of the cherry picks</li>
|
||||
<li>docs: Clean up bug fixes list</li>
|
||||
<li>intel: Remove driver date and related bits from renderer string</li>
|
||||
<li>mesa: set version string to 7.10.1 (final)</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Jian Zhao (1):
|
||||
<ul>
|
||||
<li>mesa: fix an error in uniform arrays in row calculating.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Julien Cristau (3):
|
||||
<ul>
|
||||
<li>glx: fix request lengths</li>
|
||||
<li>glx: fix GLXChangeDrawableAttributesSGIX request</li>
|
||||
<li>glx: fix length of GLXGetFBConfigsSGIX</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Keith Packard (1):
|
||||
<ul>
|
||||
<li>glsl: Eliminate reduce/reduce conflicts in glsl grammar</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kenneth Graunke (20):
|
||||
<ul>
|
||||
<li>glsl: Expose a public glsl_type::void_type const pointer.</li>
|
||||
<li>glsl: Don't bother unsetting a destructor that was never set.</li>
|
||||
<li>glsl, i965: Remove unnecessary talloc includes.</li>
|
||||
<li>glcpp: Remove use of talloc reference counting.</li>
|
||||
<li>ralloc: Add a fake implementation of ralloc based on talloc.</li>
|
||||
<li>Convert everything from the talloc API to the ralloc API.</li>
|
||||
<li>ralloc: a new MIT-licensed recursive memory allocator.</li>
|
||||
<li>Remove talloc from the make and automake build systems.</li>
|
||||
<li>Remove talloc from the SCons build system.</li>
|
||||
<li>Remove the talloc sources from the Mesa repository.</li>
|
||||
<li>glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.</li>
|
||||
<li>i965/fs: Apply source modifier workarounds to POW as well.</li>
|
||||
<li>i965: Fix shaders that write to gl_PointSize on Sandybridge.</li>
|
||||
<li>i965/fs: Avoid register coalescing away gen6 MATH workarounds.</li>
|
||||
<li>i965/fs: Correctly set up gl_FragCoord.w on Sandybridge.</li>
|
||||
<li>i965: Increase Sandybridge point size clamp.</li>
|
||||
<li>i965/fs: Refactor control flow stack handling.</li>
|
||||
<li>i965: Increase Sandybridge point size clamp in the clip state.</li>
|
||||
<li>glsl: Use reralloc instead of plain realloc.</li>
|
||||
<li>Revert "i965/fs: Correctly set up gl_FragCoord.w on Sandybridge."</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Marek Olšák (4):
|
||||
<ul>
|
||||
<li>docs: fix messed up names with special characters in relnotes-7.10</li>
|
||||
<li>docs: fix messed up names with special characters in relnotes-7.9.1</li>
|
||||
<li>mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2</li>
|
||||
<li>st/dri: Track drawable context bindings</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Paulo Zanoni (1):
|
||||
<ul>
|
||||
<li>dri_util: fail driCreateNewScreen if InitScreen is NULL</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Sam Hocevar (2):
|
||||
<ul>
|
||||
<li>docs: add glsl info</li>
|
||||
<li>docs: fix glsl_compiler name</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Tom Fogal (1):
|
||||
<ul>
|
||||
<li>Regenerate gl_mangle.h.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Tom Stellard (2):
|
||||
<ul>
|
||||
<li>r300/compiler: Disable register rename pass on r500</li>
|
||||
<li>r300/compiler: Don't erase sources when converting RGB->Alpha</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Vinson Lee (3):
|
||||
<ul>
|
||||
<li>ralloc: Add missing va_end following va_copy.</li>
|
||||
<li>mesa: Move declaration before code in extensions.c.</li>
|
||||
<li>mesa: Move loop variable declarations outside for loop in extensions.c.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>nobled (1):
|
||||
<ul>
|
||||
<li>glx: Put null check before use</li>
|
||||
</ul></p>
|
||||
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,206 +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.2 Release Notes / April 6, 2011</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.10.2 is a bug fix release which fixes bugs found since the 7.10 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.10.2 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
2f9f444265534a2cfd9a99d1a8291089 MesaLib-7.10.2.tar.gz
|
||||
f5de82852f1243f42cc004039e10b771 MesaLib-7.10.2.tar.bz2
|
||||
47836e37bab6fcafe3ac90c9544ba0e9 MesaLib-7.10.2.zip
|
||||
175120325828f313621cc5bc6c504803 MesaGLUT-7.10.2.tar.gz
|
||||
8c71d273f5f8d6c5eda4ffc39e0fe03e MesaGLUT-7.10.2.tar.bz2
|
||||
03036c8efe7b791a90fa0f2c41b43f43 MesaGLUT-7.10.2.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=29172">Bug 29172</a> - Arrandale - Pill Popper Pops Pills</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31159">Bug 31159</a> - shadow problem in 0ad game</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32688">Bug 32688</a> - [RADEON:KMS:R300G] some games have a wireframe or outline visible</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32949">Bug 32949</a> - [glsl wine] Need for Speed renders incorrectly with GLSL enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34203">Bug 34203</a> - [GLSL] fail to call long chains across shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34376">Bug 34376</a> - [GLSL] allowing assignment to unsized array
|
||||
<ul>
|
||||
<li>The commit message incorrectly
|
||||
lists <a href="https://bugs.freedesktop.org/show_bug.cgi?id=34367">bug
|
||||
34367</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34370">Bug 34370</a> - [GLSL] "i<5 && i<4" in for loop fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34374">Bug 34374</a> - [GLSL] fail to redeclare an array using initializer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=35073">Bug 35073</a> - [GM45] Alpha test is broken when rendering to FBO with no color attachment</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=35483">Bug 35483</a> - util_blit_pixels_writemask: crash in line 322 of src/gallium/auxiliary/util/u_blit.c</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.1..mesa-7.10.2
|
||||
</pre>
|
||||
|
||||
<p><em>Note:</em> Reverted commits and the reverts are not included in this list.</p>
|
||||
|
||||
<p>Alex Deucher (2):
|
||||
<ul>
|
||||
<li>r600c: add new ontario pci ids</li>
|
||||
<li>r600g: add some additional ontario pci ids</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Benjamin Franzke (1):
|
||||
<ul>
|
||||
<li>st/dri: Fix surfaceless gl using contexts with previous bound surfaces</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Brian Paul (9):
|
||||
<ul>
|
||||
<li>docs: pull 7.9.2 release notes into 7.10 branch</li>
|
||||
<li>docs: update news.html with 7.10.1 and 7.9.2 releases</li>
|
||||
<li>docs: fill in 7.10.1 release data</li>
|
||||
<li>docs: add, fix release notes links</li>
|
||||
<li>docs: update info about Mesa packaging/contents</li>
|
||||
<li>docs: update prerequisites, remove old demo info</li>
|
||||
<li>mesa: Guard against null pointer deref in fbo validation</li>
|
||||
<li>st/mesa: Apply LOD bias from correct texture unit</li>
|
||||
<li>glsl: silence warning in printf() with a cast</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chad Versace (1):
|
||||
<ul>
|
||||
<li>i965: Fix tex_swizzle when depth mode is GL_RED</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dave Airlie (1):
|
||||
<ul>
|
||||
<li>r600: don't close fd on failed load</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Eric Anholt (2):
|
||||
<ul>
|
||||
<li>i965: Apply a workaround for the Ironlake "vertex flashing".</li>
|
||||
<li>i965: Fix alpha testing when there is no color buffer in the FBO.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Fabian Bieler (1):
|
||||
<ul>
|
||||
<li>st/mesa: Apply LOD from texture object</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Henri Verbeet (1):
|
||||
<ul>
|
||||
<li>st/mesa: Validate state before doing blits.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Ian Romanick (13):
|
||||
<ul>
|
||||
<li>docs: Add 7.10.1 md5sums</li>
|
||||
<li>glsl: Refactor AST-to-HIR code handling variable initializers</li>
|
||||
<li>glsl: Refactor AST-to-HIR code handling variable redeclarations</li>
|
||||
<li>glsl: Process redeclarations before initializers</li>
|
||||
<li>glsl: Function signatures cannot have NULL return type</li>
|
||||
<li>glsl: Add several function / call related validations</li>
|
||||
<li>linker: Add imported functions to the linked IR</li>
|
||||
<li>glsl: Use insert_before for lists instead of open coding it</li>
|
||||
<li>glsl: Only allow unsized array assignment in an initializer</li>
|
||||
<li>glcpp: Refresh autogenerated lexer files</li>
|
||||
<li>docs: Initial bits of 7.10.2 release notes</li>
|
||||
<li>mesa: set version string to 7.10.2</li>
|
||||
<li>mesa: Remove nonexistant files from _FILES lists</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Jerome Glisse (1):
|
||||
<ul>
|
||||
<li>r600g: move user fence into base radeon structure</li>
|
||||
</ul></p>
|
||||
|
||||
<p>José Fonseca (2):
|
||||
<ul>
|
||||
<li>mesa: Fix typo glGet*v(GL_TEXTURE_COORD_ARRAY_*).</li>
|
||||
<li>mesa: More glGet* fixes.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kenneth Graunke (4):
|
||||
<ul>
|
||||
<li>glcpp: Rework lexer to use a SKIP state rather than REJECT.</li>
|
||||
<li>glcpp: Remove trailing contexts from #if rules.</li>
|
||||
<li>i965/fs: Fix linear gl_Color interpolation on pre-gen6 hardware.</li>
|
||||
<li>glsl: Accept precision qualifiers on sampler types, but only in ES.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Marek Olšák (15):
|
||||
<ul>
|
||||
<li>st/mesa: fix crash when DrawBuffer->_ColorDrawBuffers[0] is NULL</li>
|
||||
<li>st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format fails</li>
|
||||
<li>r300/compiler: fix the saturate modifier when applied to TEX instructions</li>
|
||||
<li>r300/compiler: fix translating the src negate bits in pair_translate</li>
|
||||
<li>r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)</li>
|
||||
<li>r300/compiler: TEX instructions don't support negation on source arguments</li>
|
||||
<li>r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500</li>
|
||||
<li>r300/compiler: saturate Z before the shadow comparison</li>
|
||||
<li>r300/compiler: fix equal and notequal shadow compare functions</li>
|
||||
<li>r300/compiler: remove unused variables</li>
|
||||
<li>st/mesa: fix crash when using both user and vbo buffers with the same stride</li>
|
||||
<li>r300g: fix alpha-test with no colorbuffer</li>
|
||||
<li>r300g: tell the GLSL compiler to lower the continue opcode</li>
|
||||
<li>r300/compiler: propagate SaturateMode down to the result of shadow comparison</li>
|
||||
<li>r300/compiler: apply the texture swizzle to shadow pass and fail values too</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Michel Dänzer (1):
|
||||
<ul>
|
||||
<li>Use proper source row stride when getting depth/stencil texels.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Tom Stellard (4):
|
||||
<ul>
|
||||
<li>r300/compiler: Use a 4-bit writemask in pair instructions</li>
|
||||
<li>prog_optimize: Fix reallocating registers for shaders with loops</li>
|
||||
<li>r300/compiler: Fix vertex shader MAD instructions with constant swizzles</li>
|
||||
<li>r300/compiler: Don't try to convert RGB to Alpha in full instructions</li>
|
||||
</ul></p>
|
||||
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
@@ -1,63 +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.11 Release Notes / (release date TBD)</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.11 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 7.11.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.11 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>GL_ARB_draw_instanced extension (gallium drivers, swrast)
|
||||
<li>GL_ARB_instanced_arrays extension (gallium drivers)
|
||||
<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_ARB_sampler_objects (gallium drivers)
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<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 alterantive.
|
||||
<li>Removed GL_SGI_texture_color_table support from swrast driver - the only
|
||||
driver that implemented it.
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,406 +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.9.1 Release Notes / January 7, 2011</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.9.1 is a bug fix release which fixes bugs found since the 7.9 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.9.1 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
78422843ea875ad4eac35b9b8584032b MesaLib-7.9.1.tar.gz
|
||||
07dc6cfb5928840b8b9df5bd1b3ae434 MesaLib-7.9.1.tar.bz2
|
||||
c8eaea5b3c3d6dee784bd8c2db91c80f MesaLib-7.9.1.zip
|
||||
ee9ecae4ca56fbb2d14dc15e3a0a7640 MesaGLUT-7.9.1.tar.gz
|
||||
41fc477d524e7dc5c84da8ef22422bea MesaGLUT-7.9.1.tar.bz2
|
||||
90b287229afdf19317aa989d19462e7a MesaGLUT-7.9.1.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=28800">Bug 28800</a> - [r300c, r300g] Texture corruption with World of Warcraft</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29420">Bug 29420</a> - Amnesia / HPL2 RendererFeatTest - not rendering correctly</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29946">Bug 29946</a> - [swrast] piglit valgrind glsl-array-bounds-04 fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30261">Bug 30261</a> - [GLSL 1.20] allowing inconsistent invariant declaration between two vertex shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30632">Bug 30632</a> - [softpipe] state_tracker/st_manager.c:489: st_context_notify_invalid_framebuffer: Assertion `stfb && stfb->iface == stfbi' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30694">Bug 30694</a> - wincopy will crash on Gallium drivers when going to front buffer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30787">Bug 30787</a> - Invalid asm shader does not generate draw-time error when used with GLSL shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30993">Bug 30993</a> - getFramebufferAttachmentParameteriv wrongly generates error</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31101">Bug 31101</a> - [glsl2] abort() in ir_validate::visit_enter(ir_assignment *ir)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31193">Bug 31193</a> - [regression] aa43176e break water reflections</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31194">Bug 31194</a> - The mesa meta save/restore code doesn't ref the current GLSL program</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31371">Bug 31371</a> - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type >= 0) && (type->base_type <= 3)' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31439">Bug 31439</a> - Crash in glBufferSubData() with size == 0</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31495">Bug 31495</a> - [i965 gles2c bisected] OpenGL ES 2.0 conformance GL2Tests_GetBIFD_input.run regressed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31514">Bug 31514</a> - isBuffer returns true for unbound buffers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31560">Bug 31560</a> - [tdfx] tdfx_tex.c:702: error: ‘const struct gl_color_table’ has no member named ‘Format’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31617">Bug 31617</a> - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31648">Bug 31648</a> - [GLSL] array-struct-array gets assertion: `(size >= 1) && (size <= 4)' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31650">Bug 31650</a> - [GLSL] varying gl_TexCoord fails to be re-declared to different size in the second shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31673">Bug 31673</a> - GL_FRAGMENT_PRECISION_HIGH preprocessor macro undefined in GLSL ES</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31690">Bug 31690</a> - i915 shader compiler fails to flatten if in Aquarium webgl demo.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31832">Bug 31832</a> - [i915] Bad renderbuffer format: 21</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31841">Bug 31841</a> - [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31894">Bug 31894</a> - Writing to gl_PointSize with GLES2 corrupts other varyings</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31909">Bug 31909</a> - [i965] brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): Assertion `expr->operands[i]->type->is_scalar()' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31934">Bug 31934</a> - [gallium] Mapping empty buffer object causes SIGSEGV</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31983">Bug 31983</a> - [i915 gles2] "if (expression with builtin/varying variables) discard" breaks linkage</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31985">Bug 31985</a> - [GLSL 1.20] initialized uniform array considered as "unsized"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31987">Bug 31987</a> - [gles2] if input a wrong pname(GL_NONE) to glGetBoolean, it will not case GL_INVALID_ENUM</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32035">Bug 32035</a> - [GLSL bisected] comparing unsized array gets segfault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32070">Bug 32070</a> - llvmpipe renders stencil demo incorrectly</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32273">Bug 32273</a> - assertion fails when starting vdrift 2010 release with shaders enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32287">Bug 32287</a> - [bisected GLSL] float-int failure</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32311">Bug 32311</a> - [965 bisected] Array look-ups broken on GM45</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32520">Bug 32520</a> - [gles2] glBlendFunc(GL_ZERO, GL_DST_COLOR) will result in GL_INVALID_ENUM</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32825">Bug 32825</a> - egl_glx driver completely broken in 7.9 branch [fix in master]</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.9..mesa-7.9.1
|
||||
</pre>
|
||||
|
||||
<p>Alex Deucher (5):
|
||||
<ul>
|
||||
<li>r100: revalidate after radeon_update_renderbuffers</li>
|
||||
<li>r600c: add missing radeon_prepare_render() call on evergreen</li>
|
||||
<li>r600c: properly align mipmaps to group size</li>
|
||||
<li>gallium/egl: fix r300 vs r600 loading</li>
|
||||
<li>r600c: fix some opcodes on evergreen</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Aras Pranckevicius (2):
|
||||
<ul>
|
||||
<li>glsl: fix crash in loop analysis when some controls can't be determined</li>
|
||||
<li>glsl: fix matrix type check in ir_algebraic</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Brian Paul (27):
|
||||
<ul>
|
||||
<li>swrast: fix choose_depth_texture_level() to respect mipmap filtering state</li>
|
||||
<li>st/mesa: replace assertion w/ conditional in framebuffer invalidation</li>
|
||||
<li>egl/i965: include inline_wrapper_sw_helper.h</li>
|
||||
<li>mesa: Add missing else in do_row_3D</li>
|
||||
<li>mesa: add missing formats in _mesa_format_to_type_and_comps()</li>
|
||||
<li>mesa: handle more pixel types in mipmap generation code</li>
|
||||
<li>mesa: make glIsBuffer() return false for never bound buffers</li>
|
||||
<li>mesa: fix glDeleteBuffers() regression</li>
|
||||
<li>swrast: init alpha value to 1.0 in opt_sample_rgb_2d()</li>
|
||||
<li>meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear</li>
|
||||
<li>st/mesa: fix mapping of zero-sized buffer objects</li>
|
||||
<li>mesa: check for posix_memalign() errors</li>
|
||||
<li>llvmpipe: fix broken stencil writemask</li>
|
||||
<li>mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query</li>
|
||||
<li>mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type</li>
|
||||
<li>mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUM</li>
|
||||
<li>mesa: test for cube map completeness in glGenerateMipmap()</li>
|
||||
<li>tnl: Initialize gl_program_machine memory in run_vp.</li>
|
||||
<li>tnl: a better way to initialize the gl_program_machine memory</li>
|
||||
<li>mesa, st/mesa: disable GL_ARB_geometry_shader4</li>
|
||||
<li>glsl: fix off by one in register index assertion</li>
|
||||
<li>st/mesa: fix mipmap generation bug</li>
|
||||
<li>glsl: new glsl_strtod() wrapper to fix decimal point interpretation</li>
|
||||
<li>mesa: no-op glBufferSubData() on size==0</li>
|
||||
<li>tdfx: s/Format/_BaseFormat/</li>
|
||||
<li>st/mesa: fix renderbuffer pointer check in st_Clear()</li>
|
||||
<li>mesa: Bump the number of bits in the register index.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chad Versace (5):
|
||||
<ul>
|
||||
<li>glsl: Fix lexer rule for ^=</li>
|
||||
<li>glsl: Fix ast-to-hir for ARB_fragment_coord_conventions</li>
|
||||
<li>glsl: Fix ir_expression::constant_expression_value()</li>
|
||||
<li>glsl: Fix erroneous cast in ast_jump_statement::hir()</li>
|
||||
<li>glsl: Fix linker bug in cross_validate_globals()</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chia-I Wu (10):
|
||||
<ul>
|
||||
<li>targets/egl: Fix linking with libdrm.</li>
|
||||
<li>st/vega: Fix version check in context creation.</li>
|
||||
<li>st/egl: Do not finish a fence that is NULL.</li>
|
||||
<li>egl: Fix a false negative check in _eglCheckMakeCurrent.</li>
|
||||
<li>st/mesa: Unreference the sampler view in st_bind_surface.</li>
|
||||
<li>egl_dri2: Fix __DRI_DRI2 version 1 support.</li>
|
||||
<li>st/vega: Do not wait NULL fences.</li>
|
||||
<li>mesa: Do not advertise GL_OES_texture_3D.</li>
|
||||
<li>egl_glx: Fix borken driver.</li>
|
||||
<li>egl: Check extensions.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Daniel Lichtenberger (1):
|
||||
<ul>
|
||||
<li>radeon: fix potential segfault in renderbuffer update</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Daniel Vetter (1):
|
||||
<ul>
|
||||
<li>r200: revalidate after radeon_update_renderbuffers</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dave Airlie (1):
|
||||
<ul>
|
||||
<li>r300g: fixup rs690 tiling stride alignment calculations.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Eric Anholt (13):
|
||||
<ul>
|
||||
<li>intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.</li>
|
||||
<li>glsl: Free the loop state context when we free the loop state.</li>
|
||||
<li>i965: Allow OPCODE_SWZ to put immediates in the first arg.</li>
|
||||
<li>i965: Add support for rendering to SARGB8 FBOs.</li>
|
||||
<li>glsl: Add a helper constructor for expressions that works out result type.</li>
|
||||
<li>glsl: Fix structure and array comparisions.</li>
|
||||
<li>glsl: Quiet unreachable no-return-from-function warning.</li>
|
||||
<li>glsl: Mark the array access for whole-array comparisons.</li>
|
||||
<li>glsl: Fix flipped return of has_value() for array constants.</li>
|
||||
<li>mesa: Add getters for the rest of the supported draw buffers.</li>
|
||||
<li>mesa: Add getters for ARB_copy_buffer's attachment points.</li>
|
||||
<li>i965: Correct the dp_read message descriptor setup on g4x.</li>
|
||||
<li>glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Fabian Bieler (1):
|
||||
<ul>
|
||||
<li>glsl: fix lowering conditional returns in subroutines</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Francisco Jerez (3):
|
||||
<ul>
|
||||
<li>meta: Don't leak alpha function/reference value changes.</li>
|
||||
<li>meta: Fix incorrect rendering of the bitmap alpha component.</li>
|
||||
<li>meta: Don't try to disable cube maps if the driver doesn't expose the extension.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Henri Verbeet (2):
|
||||
<ul>
|
||||
<li>r600: Evergreen has two extra frac_bits for the sampler LOD state.</li>
|
||||
<li>st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Ian Romanick (33):
|
||||
<ul>
|
||||
<li>Add 7.9 md5sums</li>
|
||||
<li>docs: Import 7.8.x release notes from 7.8 branch.</li>
|
||||
<li>docs: download.html does not need to be updated for each release</li>
|
||||
<li>docs: Update mailing lines from sf.net to freedesktop.org</li>
|
||||
<li>docs: added news item for 7.9 release</li>
|
||||
<li>mesa: Validate assembly shaders when GLSL shaders are used</li>
|
||||
<li>linker: Reject shaders that have unresolved function calls</li>
|
||||
<li>mesa: Refactor validation of shader targets</li>
|
||||
<li>glsl: Slightly change the semantic of _LinkedShaders</li>
|
||||
<li>linker: Improve handling of unread/unwritten shader inputs/outputs</li>
|
||||
<li>glsl: Commit lexer files changed by previous cherry picking</li>
|
||||
<li>mesa: Make metaops use program refcounts instead of names.</li>
|
||||
<li>glsl: Fix incorrect gl_type of sampler2DArray and sampler1DArrayShadow</li>
|
||||
<li>mesa: Allow query of MAX_SAMPLES with EXT_framebuffer_multisample</li>
|
||||
<li>glsl: better handling of linker failures</li>
|
||||
<li>mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.</li>
|
||||
<li>i915: Disallow alpha, red, RG, and sRGB as render targets</li>
|
||||
<li>glsl/linker: Free any IR discarded by optimization passes.</li>
|
||||
<li>glsl: Add an optimization pass to simplify discards.</li>
|
||||
<li>glsl: Add a lowering pass to move discards out of if-statements.</li>
|
||||
<li>i915: Correctly generate unconditional KIL instructions</li>
|
||||
<li>glsl: Add unary ir_expression constructor</li>
|
||||
<li>glsl: Ensure that equality comparisons don't return a NULL IR tree</li>
|
||||
<li>glcpp: Commit changes in generated files cause by previous commit</li>
|
||||
<li>glsl: Inherrit type of declared variable from initializer</li>
|
||||
<li>glsl: Inherrit type of declared variable from initializer after processing assignment</li>
|
||||
<li>linker: Ensure that unsized arrays have a size after linking</li>
|
||||
<li>linker: Fix regressions caused by previous commit</li>
|
||||
<li>linker: Allow built-in arrays to have different sizes between shader stages</li>
|
||||
<li>ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors</li>
|
||||
<li>Refresh autogenerated file builtin_function.cpp.</li>
|
||||
<li>docs: Initial set of release notes for 7.9.1</li>
|
||||
<li>mesa: set version string to 7.9.1</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Julien Cristau (1):
|
||||
<ul>
|
||||
<li>Makefile: don't include the same files twice in the tarball</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kenneth Graunke (19):
|
||||
<ul>
|
||||
<li>glcpp: Return NEWLINE token for newlines inside multi-line comments.</li>
|
||||
<li>generate_builtins.py: Output large strings as arrays of characters.</li>
|
||||
<li>glsl: Fix constant component count in vector constructor emitting.</li>
|
||||
<li>ir_dead_functions: Actually free dead functions and signatures.</li>
|
||||
<li>glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.</li>
|
||||
<li>glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.</li>
|
||||
<li>glsl: Fix constant expression handling for <, >, <=, >= on vectors.</li>
|
||||
<li>glsl: Use do_common_optimization in the standalone compiler.</li>
|
||||
<li>glsl: Don't inline function prototypes.</li>
|
||||
<li>glsl: Add a virtual as_discard() method.</li>
|
||||
<li>glsl: Remove "discard" support from lower_jumps.</li>
|
||||
<li>glsl: Refactor get_num_operands.</li>
|
||||
<li>glcpp: Don't emit SPACE tokens in conditional_tokens production.</li>
|
||||
<li>glsl: Clean up code by adding a new is_break() function.</li>
|
||||
<li>glsl: Consider the "else" branch when looking for loop breaks.</li>
|
||||
<li>Remove OES_compressed_paletted_texture from the ES2 extension list.</li>
|
||||
<li>glsl/builtins: Compute the correct value for smoothstep(vec, vec, vec).</li>
|
||||
<li>Fix build on systems where "python" is python 3.</li>
|
||||
<li>i965: Internally enable GL_NV_blend_square on ES2.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kristian Høgsberg (1):
|
||||
<ul>
|
||||
<li>i965: Don't write mrf assignment for pointsize output</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Luca Barbieri (1):
|
||||
<ul>
|
||||
<li>glsl: Unroll loops with conditional breaks anywhere (not just the end)</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Marek Olšák (17):
|
||||
<ul>
|
||||
<li>r300g: fix microtiling for 16-bits-per-channel formats</li>
|
||||
<li>r300g: fix texture border for 16-bits-per-channel formats</li>
|
||||
<li>r300g: add a default channel ordering of texture border for unhandled formats</li>
|
||||
<li>r300g: fix texture border color for all texture formats</li>
|
||||
<li>r300g: fix rendering with no vertex elements</li>
|
||||
<li>r300/compiler: fix rc_rewrite_depth_out for it to work with any instruction</li>
|
||||
<li>r300g: fix texture border color once again</li>
|
||||
<li>r300g: fix texture swizzling with compressed textures on r400-r500</li>
|
||||
<li>r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only</li>
|
||||
<li>mesa, st/mesa: fix gl_FragCoord with FBOs in Gallium</li>
|
||||
<li>st/mesa: initialize key in st_vp_varient</li>
|
||||
<li>r300/compiler: fix swizzle lowering with a presubtract source operand</li>
|
||||
<li>r300g: fix rendering with a vertex attrib having a zero stride</li>
|
||||
<li>ir_to_mesa: Add support for conditional discards.</li>
|
||||
<li>r300g: finally fix the texture corruption on r3xx-r4xx</li>
|
||||
<li>mesa: fix texel store functions for some float formats</li>
|
||||
<li>r300/compiler: disable the rename_regs pass for loops</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Mario Kleiner (1):
|
||||
<ul>
|
||||
<li>mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Peter Clifton (1):
|
||||
<ul>
|
||||
<li>intel: Fix emit_linear_blit to use DWORD aligned width blits</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Robert Hooker (2):
|
||||
<ul>
|
||||
<li>intel: Add a new B43 pci id.</li>
|
||||
<li>egl_dri2: Add missing intel chip ids.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Roland Scheidegger (1):
|
||||
<ul>
|
||||
<li>r200: fix r200 large points</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Thomas Hellstrom (17):
|
||||
<ul>
|
||||
<li>st/xorg: Don't try to use option values before processing options</li>
|
||||
<li>xorg/vmwgfx: Make vmwarectrl work also on 64-bit servers</li>
|
||||
<li>st/xorg: Add a customizer option to get rid of annoying cursor update flicker</li>
|
||||
<li>xorg/vmwgfx: Don't hide HW cursors when updating them</li>
|
||||
<li>st/xorg: Don't try to remove invalid fbs</li>
|
||||
<li>st/xorg: Fix typo</li>
|
||||
<li>st/xorg, xorg/vmwgfx: Be a bit more frendly towards cross-compiling environments</li>
|
||||
<li>st/xorg: Fix compilation errors for Xservers compiled without Composite</li>
|
||||
<li>st/xorg: Don't use deprecated x*alloc / xfree functions</li>
|
||||
<li>xorg/vmwgfx: Don't use deprecated x*alloc / xfree functions</li>
|
||||
<li>st/xorg: Fix compilation for Xservers >= 1.10</li>
|
||||
<li>mesa: Make sure we have the talloc cflags when using the talloc headers</li>
|
||||
<li>egl: Add an include for size_t</li>
|
||||
<li>mesa: Add talloc includes for gles</li>
|
||||
<li>st/egl: Fix build for include files in nonstandard places</li>
|
||||
<li>svga/drm: Optionally resolve calls to powf during link-time</li>
|
||||
<li>gallium/targets: Trivial crosscompiling fix</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Tom Stellard (7):
|
||||
<ul>
|
||||
<li>r300/compiler: Make sure presubtract sources use supported swizzles</li>
|
||||
<li>r300/compiler: Fix register allocator's handling of loops</li>
|
||||
<li>r300/compiler: Fix instruction scheduling within IF blocks</li>
|
||||
<li>r300/compiler: Use zero as the register index for unused sources</li>
|
||||
<li>r300/compiler: Ignore alpha dest register when replicating the result</li>
|
||||
<li>r300/compiler: Use correct swizzles for all presubtract sources</li>
|
||||
<li>r300/compiler: Don't allow presubtract sources to be remapped twice</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Vinson Lee (1):
|
||||
<ul>
|
||||
<li>glsl: Fix 'control reaches end of non-void function' warning.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>richard (1):
|
||||
<ul>
|
||||
<li>r600c : inline vertex format is not updated in an app, switch to use vfetch constants. For the 7.9 and 7.10 branches as well.</li>
|
||||
</ul></p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,336 +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.9.2 Release Notes / TBD</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.9.2 is a bug fix release which fixes bugs found since the 7.9.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.9.2 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
eb4ab8c1a03386def3ea34b1358e9cda MesaLib-7.9.2.tar.gz
|
||||
8f6d1474912787ce13bd35f3bae9938a MesaLib-7.9.2.tar.bz2
|
||||
427a81dd43ac97603768dc5c6af3df26 MesaLib-7.9.2.zip
|
||||
aacb8f4db997e346db40c6066942140a MesaGLUT-7.9.2.tar.gz
|
||||
18abe6cff4fad8ad4752c7b7ab548e5d MesaGLUT-7.9.2.tar.bz2
|
||||
3189e5732d636c71baf3d8bc23ce7b11 MesaGLUT-7.9.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<p>This list is likely incomplete.</p>
|
||||
<ul>
|
||||
<li>Fix an off-by-one bug in a vsplit assertion.</li>
|
||||
<li>Fix incorrect handling of <tt>layout</tt> qualifier
|
||||
with <tt>in</tt>, <tt>out</tt>, <tt>attribute</tt>, and <tt>varying</tt>.</li>
|
||||
|
||||
<li>Fix an i965 GPU hang in GLSL shaders that contain an unconditional <tt>discard</tt> statement.</li>
|
||||
|
||||
<li>Fix an i965 shader bug where the negative absolute value was generated instead of the absolute value of a negation.</li>
|
||||
|
||||
<li>Fix numerous issues handling precision qualifiers in GLSL ES.</li>
|
||||
|
||||
<li>Fixed a few GLX protocol encoder bugs (Julien Cristau)</li>
|
||||
|
||||
<li>Assorted Gallium llvmpipe driver bug fixes</li>
|
||||
|
||||
<li>Assorted Mesa/Gallium state tracker bug fixes</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26795">Bug 26795</a> - gl_FragCoord off by one in Gallium drivers.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29164">Bug 29164</a> - [GLSL 1.20] invariant variable shouldn't be used before declaration</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29823">Bug 29823</a> - GetUniform[if]v busted</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29927">Bug 29927</a> - [glsl2] fail to compile shader with constructor for array of struct type</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30156">Bug 30156</a> - [i965] After updating to Mesa 7.9, Civilization IV starts to show garbage</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31923">Bug 31923</a> - [GLSL 1.20] allowing inconsistent centroid declaration between two vertex shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31925">Bug 31925</a> - [GLSL 1.20] "#pragma STDGL invariant(all)" fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32214">Bug 32214</a> - [gles2]no link error happens when missing vertex shader or frag shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32375">Bug 32375</a> - [gl gles2] Not able to get the attribute by function glGetVertexAttribfv</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32541">Bug 32541</a> - Segmentation Fault while running an HDR (high dynamic range) rendering demo</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32569">Bug 32569</a> - [gles2] glGetShaderPrecisionFormat not implemented yet</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32695">Bug 32695</a> - [glsl] SIGSEGV glcpp/glcpp-parse.y:833</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32831">Bug 32831</a> - [glsl] division by zero crashes GLSL compiler</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32910">Bug 32910</a> - Keywords 'in' and 'out' not handled properly for GLSL 1.20 shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33219">Bug 33219</a> -[GLSL bisected] implicit sized array triggers segfault in ir_to_mesa_visitor::copy_propagate</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33306">Bug 33306</a> - GLSL integer division by zero crashes GLSL compiler</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33308">Bug 33308</a> -[glsl] ast_to_hir.cpp:3016: virtual ir_rvalue* ast_jump_statement::hir(exec_list*, _mesa_glsl_parse_state*): Assertion `ret != __null' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33316">Bug 33316</a> - uniform array will be allocate one line more and initialize it when it was freed will abort</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33386">Bug 33386</a> - Dubious assembler in read_rgba_span_x86.S</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33388">Bug 33388</a> - Dubious assembler in xform4.S</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33433">Bug 33433</a> - Error in x86-64 API dispatch code.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33507">Bug 33507</a> - [glsl] GLSL preprocessor modulus by zero crash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33508">Bug 33508</a> - [glsl] GLSL compiler modulus by zero crash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33916">Bug 33916</a> - Compiler accepts reserved operators % and %=</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34047">Bug 34047</a> - Assert in _tnl_import_array() when using GLfixed vertex datatypes with GLESv2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34114">Bug 34114</a> - Sun Studio build fails due to standard library functions not being in global namespace</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34198">Bug 34198</a> - [GLSL] implicit sized array with index 0 used gets assertion</li>
|
||||
|
||||
<li><a href="https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/691653">Ubuntu bug 691653</a> - compiz crashes when using alt-tab (the radeon driver kills it) </li>
|
||||
|
||||
<li><a href="https://bugs.meego.com/show_bug.cgi?id=13005">Meego bug 13005</a> - Graphics GLSL issue lead to camera preview fail on Pinetrail</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.9.1..mesa-7.9.2
|
||||
</pre>
|
||||
|
||||
<p>Alberto Milone (1):
|
||||
<ul>
|
||||
<li>r600c: add evergreen ARL support.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Brian Paul (19):
|
||||
<ul>
|
||||
<li>draw: Fix an off-by-one bug in a vsplit assertion.</li>
|
||||
<li>mesa: fix a few format table mistakes, assertions</li>
|
||||
<li>mesa: fix num_draw_buffers==0 in fixed-function fragment program generation</li>
|
||||
<li>mesa: don't assert in GetIntegerIndexed, etc</li>
|
||||
<li>mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
|
||||
<li>llvmpipe: make sure binning is active when we begin/end a query</li>
|
||||
<li>st/mesa: fix incorrect fragcoord.x translation</li>
|
||||
<li>softpipe: fix off-by-one error in setup_fragcoord_coeff()</li>
|
||||
<li>cso: fix loop bound in cso_set_vertex_samplers()</li>
|
||||
<li>st/mesa: set renderbuffer _BaseFormat in a few places</li>
|
||||
<li>st/mesa: fix the default case in st_format_datatype()</li>
|
||||
<li>st/mesa: need to translate clear color according to surface's base format</li>
|
||||
<li>docs: update 7.9.2 release notes with Brian's cherry-picks</li>
|
||||
<li>docs: add links to 7.9.1 and 7.9.2 release notes</li>
|
||||
<li>mesa: include compiler.h for ASSERT macro</li>
|
||||
<li>glsl: add ir_shader case in switch stmt to silence warning</li>
|
||||
<li>glsl2: fix signed/unsigned comparison warning</li>
|
||||
<li>mesa: implement glGetShaderPrecisionFormat()</li>
|
||||
<li>docs: updated environment variable list</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Bryce Harrington (1):
|
||||
<ul>
|
||||
<li>r300g: Null pointer check for buffer deref in gallium winsys</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chad Versace (14):
|
||||
<ul>
|
||||
<li>glsl: At link-time, check that globals have matching centroid qualifiers</li>
|
||||
<li>glcpp: Fix segfault when validating macro redefinitions</li>
|
||||
<li>glsl: Fix parser rule for type_specifier</li>
|
||||
<li>glsl: Change default value of ast_type_specifier::precision</li>
|
||||
<li>glsl: Add semantic checks for precision qualifiers</li>
|
||||
<li>glsl: Add support for default precision statements</li>
|
||||
<li>glsl: Remove redundant semantic check in parser</li>
|
||||
<li>glsl: Fix semantic checks on precision qualifiers</li>
|
||||
<li>glsl: Fix segfault due to missing printf argument</li>
|
||||
<li>glsl: Mark 'in' variables at global scope as read-only</li>
|
||||
<li>glcpp: Raise error when modulus is zero</li>
|
||||
<li>glsl: Set operators '%' and '%=' to be reserved when GLSL < 1.30</li>
|
||||
<li>glsl: Reinstate constant-folding for division by zero</li>
|
||||
<li>tnl: Add support for datatype GL_FIXED in vertex arrays</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chia-I Wu (1):
|
||||
<ul>
|
||||
<li>mesa: Add glDepthRangef and glClearDepthf to APIspec.xml.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chris Wilson (1):
|
||||
<ul>
|
||||
<li>intel: Check for unsupported texture when finishing using as a render target</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Cyril Brulebois (1):
|
||||
<ul>
|
||||
<li>Point to bugs.freedesktop.org rather than bugzilla.freedesktop.org</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dave Airlie (2):
|
||||
<ul>
|
||||
<li>radeon/r200: fix fbo-clearmipmap + gen-teximage</li>
|
||||
<li>radeon: avoid segfault on 3D textures.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dimitry Andric (4):
|
||||
<ul>
|
||||
<li>mesa: s/movzx/movzbl/</li>
|
||||
<li>mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S</li>
|
||||
<li>glapi: adding @ char before type specifier in glapi_x86.S</li>
|
||||
<li>glapi: add @GOTPCREL relocation type</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Eric Anholt (11):
|
||||
<ul>
|
||||
<li>i965: Avoid double-negation of immediate values in the VS.</li>
|
||||
<li>docs: Add a relnote for the Civ IV on i965.</li>
|
||||
<li>i965/vs: When MOVing to produce ABS, strip negate of the operand.</li>
|
||||
<li>glsl: Fix the lowering of variable array indexing to not lose write_masks.</li>
|
||||
<li>intel: Make renderbuffer tiling choice match texture tiling choice.</li>
|
||||
<li>glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility.</li>
|
||||
<li>mesa: Add extension enable bit for GL_ARB_ES2_compatibility.</li>
|
||||
<li>mesa: Add actual support for glReleaseShaderCompiler from ES2.</li>
|
||||
<li>mesa: Add support for glDepthRangef and glClearDepthf.</li>
|
||||
<li>mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.</li>
|
||||
<li>mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Ian Romanick (42):
|
||||
<ul>
|
||||
<li>docs: Add 7.9.1 md5sums</li>
|
||||
<li>glsl: Support the 'invariant(all)' pragma</li>
|
||||
<li>glcpp: Generate an error for division by zero</li>
|
||||
<li>glsl: Add version_string containing properly formatted GLSL version</li>
|
||||
<li>glsl & glcpp: Refresh autogenerated lexer and parser files.</li>
|
||||
<li>glsl: Disallow 'in' and 'out' on globals in GLSL 1.20</li>
|
||||
<li>glsl: Track variable usage, use that to enforce semantics</li>
|
||||
<li>glsl: Allow 'in' and 'out' when 'layout' is also available</li>
|
||||
<li>docs: Initial set of release notes for 7.9.2</li>
|
||||
<li>mesa: bump version to 7.9.2-devel</li>
|
||||
<li>docs: Update 7.9.2 release notes</li>
|
||||
<li>i965: Make OPCODE_KIL_NV do its work in a temp, not the null reg!</li>
|
||||
<li>glsl: Refresh autogenerated lexer and parser files.</li>
|
||||
<li>glsl: Don't assert when the value returned by a function has no rvalue</li>
|
||||
<li>linker: Set sizes for non-global arrays as well</li>
|
||||
<li>linker: Propagate max_array_access while linking functions</li>
|
||||
<li>docs: Update 7.9.2 release notes</li>
|
||||
<li>Use C-style system headers in C++ code to avoid issues with std:: namespace</li>
|
||||
<li>mesa: glGetUniform only returns a single element of an array</li>
|
||||
<li>linker: Generate link errors when ES shaders are missing stages</li>
|
||||
<li>mesa: Fix error checks in GetVertexAttrib functions</li>
|
||||
<li>docs: Update 7.9.2 release notes</li>
|
||||
<li>mesa: Remove unsupported OES extensions</li>
|
||||
<li>glapi: Regenerate for GL_ARB_ES2_compatibility.</li>
|
||||
<li>mesa: Connect glGetShaderPrecisionFormat into the dispatch table</li>
|
||||
<li>i965: Set correct values for range/precision of fragment shader types</li>
|
||||
<li>i915: Set correct values for range/precision of fragment shader types</li>
|
||||
<li>intel: Fix typeos from 3d028024 and 790ff232</li>
|
||||
<li>glsl: Ensure that all GLSL versions are supported in the stand-alone compiler</li>
|
||||
<li>glsl: Reject shader versions not supported by the implementation</li>
|
||||
<li>mesa: Initial size for secondary color array is 3</li>
|
||||
<li>glcpp: Regenerate files from recent cherry picks</li>
|
||||
<li>glsl: Finish out the reduce/reduce error fixes</li>
|
||||
<li>glsl: Regenerate compiler files from cherry picks</li>
|
||||
<li>linker: Fix off-by-one error implicit array sizing</li>
|
||||
<li>i915: Only mark a register as available if all components are written</li>
|
||||
<li>i915: Calculate partial result to temp register first</li>
|
||||
<li>i915: Force lowering of all types of indirect array accesses in the FS</li>
|
||||
<li>docs: Update 7.9.2 release notes for recent cherry picks</li>
|
||||
<li>docs: Clean up bug fixes list</li>
|
||||
<li>intel: Remove driver date and related bits from renderer string</li>
|
||||
<li>mesa: set version string to 7.9.2 (final)</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Jian Zhao (1):
|
||||
<ul>
|
||||
<li>mesa: fix an error in uniform arrays in row calculating.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Julien Cristau (3):
|
||||
<ul>
|
||||
<li>glx: fix request lengths</li>
|
||||
<li>glx: fix GLXChangeDrawableAttributesSGIX request</li>
|
||||
<li>glx: fix length of GLXGetFBConfigsSGIX</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Keith Packard (1):
|
||||
<ul>
|
||||
<li>glsl: Eliminate reduce/reduce conflicts in glsl grammar</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kenneth Graunke (12):
|
||||
<ul>
|
||||
<li>glsl: Expose a public glsl_type::void_type const pointer.</li>
|
||||
<li>glsl: Don't bother unsetting a destructor that was never set.</li>
|
||||
<li>glsl, i965: Remove unnecessary talloc includes.</li>
|
||||
<li>glcpp: Remove use of talloc reference counting.</li>
|
||||
<li>ralloc: Add a fake implementation of ralloc based on talloc.</li>
|
||||
<li>Convert everything from the talloc API to the ralloc API.</li>
|
||||
<li>ralloc: a new MIT-licensed recursive memory allocator.</li>
|
||||
<li>Remove talloc from the make and automake build systems.</li>
|
||||
<li>Remove talloc from the SCons build system.</li>
|
||||
<li>Remove the talloc sources from the Mesa repository.</li>
|
||||
<li>glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.</li>
|
||||
<li>glsl: Use reralloc instead of plain realloc.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Marek Olšák (3):
|
||||
<ul>
|
||||
<li>docs: fix messed up names with special characters in relnotes-7.9.1</li>
|
||||
<li>mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2</li>
|
||||
<li>st/dri: Track drawable context bindings</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Paulo Zanoni (1):
|
||||
<ul>
|
||||
<li>dri_util: fail driCreateNewScreen if InitScreen is NULL</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Sam Hocevar (2):
|
||||
<ul>
|
||||
<li>docs: add glsl info</li>
|
||||
<li>docs: fix glsl_compiler name</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Vinson Lee (1):
|
||||
<ul>
|
||||
<li>ralloc: Add missing va_end following va_copy.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>nobled (1):
|
||||
<ul>
|
||||
<li>glx: Put null check before use</li>
|
||||
</ul></p>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -13,12 +13,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.11.html">7.11 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>
|
||||
<LI><A HREF="relnotes-7.9.2.html">7.9.2 release notes</A>
|
||||
<LI><A HREF="relnotes-7.9.1.html">7.9.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.9.html">7.9 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.3.html">7.8.3 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
|
||||
|
@@ -167,7 +167,7 @@ Here's an example of using the compiler to compile a vertex shader and
|
||||
emit GL_ARB_vertex_program-style instructions:
|
||||
</p>
|
||||
<pre>
|
||||
src/glsl/glsl_compiler --dump-ast myshader.vert
|
||||
src/glsl/glslcompiler --dump-ast myshader.vert
|
||||
</pre>
|
||||
|
||||
Options include
|
||||
|
@@ -23,7 +23,6 @@ each directory.
|
||||
<ul>
|
||||
<li><b>docs</b> - EGL documentation
|
||||
<li><b>drivers</b> - EGL drivers
|
||||
<li><b>glsl</b> - the GLSL compiler
|
||||
<li><b>main</b> - main EGL library implementation. This is where all
|
||||
the EGL API functions are implemented, like eglCreateContext().
|
||||
</ul>
|
||||
|
1
doxygen/.gitignore
vendored
1
doxygen/.gitignore
vendored
@@ -6,7 +6,6 @@ core
|
||||
core_subset
|
||||
gallium
|
||||
glapi
|
||||
glsl
|
||||
main
|
||||
math
|
||||
math_subset
|
||||
|
@@ -11,7 +11,6 @@ FULL = \
|
||||
math.doxy \
|
||||
vbo.doxy \
|
||||
glapi.doxy \
|
||||
glsl.doxy \
|
||||
shader.doxy \
|
||||
swrast.doxy \
|
||||
swrast_setup.doxy \
|
||||
|
@@ -1,39 +0,0 @@
|
||||
# Doxyfile 0.1
|
||||
|
||||
@INCLUDE = common.doxy
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "Mesa GLSL module"
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../src/glsl/
|
||||
RECURSIVE = NO
|
||||
EXCLUDE = ../src/glsl/glsl_lexer.cpp \
|
||||
../src/glsl/glsl_lexer.h \
|
||||
../src/glsl/glsl_parser.cpp \
|
||||
../src/glsl/glsl_parser.h
|
||||
EXCLUDE_PATTERNS =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
HTML_OUTPUT = glsl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE = glsl.tag
|
@@ -7,7 +7,6 @@
|
||||
<div class="qindex">
|
||||
<a class="qindex" href="../main/index.html">core</a> |
|
||||
<a class="qindex" href="../glapi/index.html">glapi</a> |
|
||||
<a class="qindex" href="../glsl/index.html">glsl</a> |
|
||||
<a class="qindex" href="../vbo/index.html">vbo</a> |
|
||||
<a class="qindex" href="../math/index.html">math</a> |
|
||||
<a class="qindex" href="../shader/index.html">shader</a> |
|
||||
|
@@ -143,20 +143,6 @@ typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESA) (EGLDisplay dpy, con
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESA) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_WL_bind_wayland_display
|
||||
#define EGL_WL_bind_wayland_display 1
|
||||
|
||||
#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
|
||||
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
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
|
||||
#ifndef EGL_KHR_reusable_sync
|
||||
#define EGL_KHR_reusable_sync 1
|
||||
@@ -390,6 +376,28 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EG
|
||||
#define EGL_Y_INVERTED_NOK 0x307F
|
||||
#endif /* EGL_NOK_texture_from_pixmap */
|
||||
|
||||
#ifndef EGL_ANDROID_image_native_buffer
|
||||
#define EGL_ANDROID_image_native_buffer 1
|
||||
struct android_native_buffer_t;
|
||||
#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANDROID_get_render_buffer
|
||||
#define EGL_ANDROID_get_render_buffer 1
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLClientBuffer EGLAPIENTRY eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw);
|
||||
#endif
|
||||
typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLGETRENDERBUFFERANDROIDPROC) (EGLDisplay dpy, EGLSurface draw);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANDROID_swap_rectangle
|
||||
#define EGL_ANDROID_swap_rectangle 1
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSetSwapRectangleANDROID (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSWAPRECTANGLEANDROIDPROC) (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -78,11 +78,14 @@ typedef int EGLNativeDisplayType;
|
||||
typedef void *EGLNativeWindowType;
|
||||
typedef void *EGLNativePixmapType;
|
||||
|
||||
#elif defined(WL_EGL_PLATFORM)
|
||||
#elif defined(ANDROID) /* Android */
|
||||
|
||||
typedef struct wl_egl_display *EGLNativeDisplayType;
|
||||
typedef struct wl_egl_pixmap *EGLNativePixmapType;
|
||||
typedef struct wl_egl_window *EGLNativeWindowType;
|
||||
struct android_native_window_t;
|
||||
struct egl_native_pixmap_t;
|
||||
|
||||
typedef struct android_native_window_t* EGLNativeWindowType;
|
||||
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
|
||||
typedef void* EGLNativeDisplayType;
|
||||
|
||||
#elif defined(__unix__) || defined(__unix)
|
||||
|
||||
|
@@ -655,8 +655,6 @@ typedef double GLclampd; /* double precision float in [0,1] */
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
#define GL_TEXTURE_GEN_S 0x0C60
|
||||
#define GL_TEXTURE_GEN_T 0x0C61
|
||||
#define GL_TEXTURE_GEN_R 0x0C62
|
||||
#define GL_TEXTURE_GEN_Q 0x0C63
|
||||
#define GL_TEXTURE_GEN_MODE 0x2500
|
||||
#define GL_TEXTURE_BORDER_COLOR 0x1004
|
||||
#define GL_TEXTURE_WIDTH 0x1000
|
||||
@@ -687,6 +685,8 @@ typedef double GLclampd; /* double precision float in [0,1] */
|
||||
#define GL_T 0x2001
|
||||
#define GL_R 0x2002
|
||||
#define GL_Q 0x2003
|
||||
#define GL_TEXTURE_GEN_R 0x0C62
|
||||
#define GL_TEXTURE_GEN_Q 0x0C63
|
||||
|
||||
/* Utility */
|
||||
#define GL_VENDOR 0x1F00
|
||||
|
@@ -31,7 +31,6 @@
|
||||
|
||||
#define glAccum MANGLE(Accum)
|
||||
#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
|
||||
#define glActiveShaderProgram MANGLE(ActiveShaderProgram)
|
||||
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
|
||||
#define glActiveTextureARB MANGLE(ActiveTextureARB)
|
||||
#define glActiveTexture MANGLE(ActiveTexture)
|
||||
@@ -57,7 +56,6 @@
|
||||
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
|
||||
#define glBeginPerfMonitorAMD MANGLE(BeginPerfMonitorAMD)
|
||||
#define glBeginQueryARB MANGLE(BeginQueryARB)
|
||||
#define glBeginQueryIndexed MANGLE(BeginQueryIndexed)
|
||||
#define glBeginQuery MANGLE(BeginQuery)
|
||||
#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
|
||||
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
|
||||
@@ -77,27 +75,22 @@
|
||||
#define glBindBufferRange MANGLE(BindBufferRange)
|
||||
#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
|
||||
#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
|
||||
#define glBindFragDataLocationIndexed MANGLE(BindFragDataLocationIndexed)
|
||||
#define glBindFragDataLocation MANGLE(BindFragDataLocation)
|
||||
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
|
||||
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
|
||||
#define glBindFramebuffer MANGLE(BindFramebuffer)
|
||||
#define glBindImageTextureEXT MANGLE(BindImageTextureEXT)
|
||||
#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
|
||||
#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT)
|
||||
#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT)
|
||||
#define glBindParameterEXT MANGLE(BindParameterEXT)
|
||||
#define glBindProgramARB MANGLE(BindProgramARB)
|
||||
#define glBindProgramNV MANGLE(BindProgramNV)
|
||||
#define glBindProgramPipeline MANGLE(BindProgramPipeline)
|
||||
#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
|
||||
#define glBindRenderbuffer MANGLE(BindRenderbuffer)
|
||||
#define glBindSampler MANGLE(BindSampler)
|
||||
#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
|
||||
#define glBindTextureEXT MANGLE(BindTextureEXT)
|
||||
#define glBindTexture MANGLE(BindTexture)
|
||||
#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
|
||||
#define glBindTransformFeedback MANGLE(BindTransformFeedback)
|
||||
#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
|
||||
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
|
||||
#define glBindVertexArray MANGLE(BindVertexArray)
|
||||
@@ -119,22 +112,18 @@
|
||||
#define glBlendColorEXT MANGLE(BlendColorEXT)
|
||||
#define glBlendColor MANGLE(BlendColor)
|
||||
#define glBlendEquationEXT MANGLE(BlendEquationEXT)
|
||||
#define glBlendEquationiARB MANGLE(BlendEquationiARB)
|
||||
#define glBlendEquationi MANGLE(BlendEquationi)
|
||||
#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD)
|
||||
#define glBlendEquation MANGLE(BlendEquation)
|
||||
#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
|
||||
#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
|
||||
#define glBlendEquationSeparateiARB MANGLE(BlendEquationSeparateiARB)
|
||||
#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei)
|
||||
#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD)
|
||||
#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
|
||||
#define glBlendFunciARB MANGLE(BlendFunciARB)
|
||||
#define glBlendFunci MANGLE(BlendFunci)
|
||||
#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD)
|
||||
#define glBlendFunc MANGLE(BlendFunc)
|
||||
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
|
||||
#define glBlendFuncSeparateiARB MANGLE(BlendFuncSeparateiARB)
|
||||
#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei)
|
||||
#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD)
|
||||
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
|
||||
@@ -164,7 +153,6 @@
|
||||
#define glClearColor MANGLE(ClearColor)
|
||||
#define glClearDebugLogMESA MANGLE(ClearDebugLogMESA)
|
||||
#define glClearDepthdNV MANGLE(ClearDepthdNV)
|
||||
#define glClearDepthf MANGLE(ClearDepthf)
|
||||
#define glClearDepth MANGLE(ClearDepth)
|
||||
#define glClearIndex MANGLE(ClearIndex)
|
||||
#define glClear MANGLE(Clear)
|
||||
@@ -227,10 +215,6 @@
|
||||
#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
|
||||
#define glColorMask MANGLE(ColorMask)
|
||||
#define glColorMaterial MANGLE(ColorMaterial)
|
||||
#define glColorP3ui MANGLE(ColorP3ui)
|
||||
#define glColorP3uiv MANGLE(ColorP3uiv)
|
||||
#define glColorP4ui MANGLE(ColorP4ui)
|
||||
#define glColorP4uiv MANGLE(ColorP4uiv)
|
||||
#define glColorPointerEXT MANGLE(ColorPointerEXT)
|
||||
#define glColorPointerListIBM MANGLE(ColorPointerListIBM)
|
||||
#define glColorPointer MANGLE(ColorPointer)
|
||||
@@ -252,7 +236,6 @@
|
||||
#define glCombinerParameterivNV MANGLE(CombinerParameterivNV)
|
||||
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
|
||||
#define glCompileShaderARB MANGLE(CompileShaderARB)
|
||||
#define glCompileShaderIncludeARB MANGLE(CompileShaderIncludeARB)
|
||||
#define glCompileShader MANGLE(CompileShader)
|
||||
#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
|
||||
#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
|
||||
@@ -327,18 +310,10 @@
|
||||
#define glCreateShader MANGLE(CreateShader)
|
||||
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
|
||||
#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
|
||||
#define glCreateShaderProgramv MANGLE(CreateShaderProgramv)
|
||||
#define glCreateSyncFromCLeventARB MANGLE(CreateSyncFromCLeventARB)
|
||||
#define glCullFace MANGLE(CullFace)
|
||||
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
|
||||
#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
|
||||
#define glCurrentPaletteMatrixARB MANGLE(CurrentPaletteMatrixARB)
|
||||
#define glDebugMessageCallbackAMD MANGLE(DebugMessageCallbackAMD)
|
||||
#define glDebugMessageCallbackARB MANGLE(DebugMessageCallbackARB)
|
||||
#define glDebugMessageControlARB MANGLE(DebugMessageControlARB)
|
||||
#define glDebugMessageEnableAMD MANGLE(DebugMessageEnableAMD)
|
||||
#define glDebugMessageInsertAMD MANGLE(DebugMessageInsertAMD)
|
||||
#define glDebugMessageInsertARB MANGLE(DebugMessageInsertARB)
|
||||
#define glDeformationMap3dSGIX MANGLE(DeformationMap3dSGIX)
|
||||
#define glDeformationMap3fSGIX MANGLE(DeformationMap3fSGIX)
|
||||
#define glDeformSGIX MANGLE(DeformSGIX)
|
||||
@@ -351,25 +326,20 @@
|
||||
#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
|
||||
#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
|
||||
#define glDeleteLists MANGLE(DeleteLists)
|
||||
#define glDeleteNamedStringARB MANGLE(DeleteNamedStringARB)
|
||||
#define glDeleteNamesAMD MANGLE(DeleteNamesAMD)
|
||||
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
|
||||
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
|
||||
#define glDeletePerfMonitorsAMD MANGLE(DeletePerfMonitorsAMD)
|
||||
#define glDeleteProgram MANGLE(DeleteProgram)
|
||||
#define glDeleteProgramPipelines MANGLE(DeleteProgramPipelines)
|
||||
#define glDeleteProgramsARB MANGLE(DeleteProgramsARB)
|
||||
#define glDeleteProgramsNV MANGLE(DeleteProgramsNV)
|
||||
#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
|
||||
#define glDeleteQueries MANGLE(DeleteQueries)
|
||||
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
|
||||
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
|
||||
#define glDeleteSamplers MANGLE(DeleteSamplers)
|
||||
#define glDeleteShader MANGLE(DeleteShader)
|
||||
#define glDeleteSync MANGLE(DeleteSync)
|
||||
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
|
||||
#define glDeleteTextures MANGLE(DeleteTextures)
|
||||
#define glDeleteTransformFeedbacks MANGLE(DeleteTransformFeedbacks)
|
||||
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
|
||||
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
|
||||
#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
|
||||
@@ -378,10 +348,7 @@
|
||||
#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
|
||||
#define glDepthFunc MANGLE(DepthFunc)
|
||||
#define glDepthMask MANGLE(DepthMask)
|
||||
#define glDepthRangeArrayv MANGLE(DepthRangeArrayv)
|
||||
#define glDepthRangedNV MANGLE(DepthRangedNV)
|
||||
#define glDepthRangef MANGLE(DepthRangef)
|
||||
#define glDepthRangeIndexed MANGLE(DepthRangeIndexed)
|
||||
#define glDepthRange MANGLE(DepthRange)
|
||||
#define glDetachObjectARB MANGLE(DetachObjectARB)
|
||||
#define glDetachShader MANGLE(DetachShader)
|
||||
@@ -396,7 +363,6 @@
|
||||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
|
||||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
|
||||
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
|
||||
#define glDrawArraysIndirect MANGLE(DrawArraysIndirect)
|
||||
#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
|
||||
#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
|
||||
#define glDrawArraysInstanced MANGLE(DrawArraysInstanced)
|
||||
@@ -408,7 +374,6 @@
|
||||
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
|
||||
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
|
||||
#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex)
|
||||
#define glDrawElementsIndirect MANGLE(DrawElementsIndirect)
|
||||
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
|
||||
#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex)
|
||||
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
|
||||
@@ -421,9 +386,7 @@
|
||||
#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex)
|
||||
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
|
||||
#define glDrawRangeElements MANGLE(DrawRangeElements)
|
||||
#define glDrawTransformFeedback MANGLE(DrawTransformFeedback)
|
||||
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
|
||||
#define glDrawTransformFeedbackStream MANGLE(DrawTransformFeedbackStream)
|
||||
#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
|
||||
#define glEdgeFlag MANGLE(EdgeFlag)
|
||||
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
|
||||
@@ -451,7 +414,6 @@
|
||||
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
|
||||
#define glEndPerfMonitorAMD MANGLE(EndPerfMonitorAMD)
|
||||
#define glEndQueryARB MANGLE(EndQueryARB)
|
||||
#define glEndQueryIndexed MANGLE(EndQueryIndexed)
|
||||
#define glEndQuery MANGLE(EndQuery)
|
||||
#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
|
||||
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
|
||||
@@ -485,7 +447,6 @@
|
||||
#define glFlush MANGLE(Flush)
|
||||
#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
|
||||
#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange)
|
||||
#define glFlushMappedNamedBufferRangeEXT MANGLE(FlushMappedNamedBufferRangeEXT)
|
||||
#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
|
||||
#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
|
||||
#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
|
||||
@@ -537,6 +498,7 @@
|
||||
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
|
||||
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
|
||||
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
|
||||
#define glFramebufferTextureFace MANGLE(FramebufferTextureFace)
|
||||
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
|
||||
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
|
||||
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
|
||||
@@ -559,30 +521,23 @@
|
||||
#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT)
|
||||
#define glGenFramebuffers MANGLE(GenFramebuffers)
|
||||
#define glGenLists MANGLE(GenLists)
|
||||
#define glGenNamesAMD MANGLE(GenNamesAMD)
|
||||
#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV)
|
||||
#define glGenPerfMonitorsAMD MANGLE(GenPerfMonitorsAMD)
|
||||
#define glGenProgramPipelines MANGLE(GenProgramPipelines)
|
||||
#define glGenProgramsARB MANGLE(GenProgramsARB)
|
||||
#define glGenProgramsNV MANGLE(GenProgramsNV)
|
||||
#define glGenQueriesARB MANGLE(GenQueriesARB)
|
||||
#define glGenQueries MANGLE(GenQueries)
|
||||
#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
|
||||
#define glGenRenderbuffers MANGLE(GenRenderbuffers)
|
||||
#define glGenSamplers MANGLE(GenSamplers)
|
||||
#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
|
||||
#define glGenTexturesEXT MANGLE(GenTexturesEXT)
|
||||
#define glGenTextures MANGLE(GenTextures)
|
||||
#define glGenTransformFeedbacks MANGLE(GenTransformFeedbacks)
|
||||
#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
|
||||
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
|
||||
#define glGenVertexArrays MANGLE(GenVertexArrays)
|
||||
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
|
||||
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
|
||||
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
|
||||
#define glGetActiveSubroutineName MANGLE(GetActiveSubroutineName)
|
||||
#define glGetActiveSubroutineUniformiv MANGLE(GetActiveSubroutineUniformiv)
|
||||
#define glGetActiveSubroutineUniformName MANGLE(GetActiveSubroutineUniformName)
|
||||
#define glGetActiveUniformARB MANGLE(GetActiveUniformARB)
|
||||
#define glGetActiveUniformBlockiv MANGLE(GetActiveUniformBlockiv)
|
||||
#define glGetActiveUniformBlockName MANGLE(GetActiveUniformBlockName)
|
||||
@@ -634,21 +589,16 @@
|
||||
#define glGetConvolutionParameteriv MANGLE(GetConvolutionParameteriv)
|
||||
#define glGetDebugLogLengthMESA MANGLE(GetDebugLogLengthMESA)
|
||||
#define glGetDebugLogMESA MANGLE(GetDebugLogMESA)
|
||||
#define glGetDebugMessageLogAMD MANGLE(GetDebugMessageLogAMD)
|
||||
#define glGetDebugMessageLogARB MANGLE(GetDebugMessageLogARB)
|
||||
#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS)
|
||||
#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT)
|
||||
#define glGetDoublei_v MANGLE(GetDoublei_v)
|
||||
#define glGetDoublev MANGLE(GetDoublev)
|
||||
#define glGetError MANGLE(GetError)
|
||||
#define glGetFenceivNV MANGLE(GetFenceivNV)
|
||||
#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV)
|
||||
#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV)
|
||||
#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT)
|
||||
#define glGetFloati_v MANGLE(GetFloati_v)
|
||||
#define glGetFloatv MANGLE(GetFloatv)
|
||||
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
|
||||
#define glGetFragDataIndex MANGLE(GetFragDataIndex)
|
||||
#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
|
||||
#define glGetFragDataLocation MANGLE(GetFragDataLocation)
|
||||
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
|
||||
@@ -658,7 +608,6 @@
|
||||
#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT)
|
||||
#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv)
|
||||
#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT)
|
||||
#define glGetGraphicsResetStatusARB MANGLE(GetGraphicsResetStatusARB)
|
||||
#define glGetHandleARB MANGLE(GetHandleARB)
|
||||
#define glGetHistogramEXT MANGLE(GetHistogramEXT)
|
||||
#define glGetHistogram MANGLE(GetHistogram)
|
||||
@@ -729,26 +678,6 @@
|
||||
#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
|
||||
#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
|
||||
#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
|
||||
#define glGetNamedStringARB MANGLE(GetNamedStringARB)
|
||||
#define glGetNamedStringivARB MANGLE(GetNamedStringivARB)
|
||||
#define glGetnColorTableARB MANGLE(GetnColorTableARB)
|
||||
#define glGetnCompressedTexImageARB MANGLE(GetnCompressedTexImageARB)
|
||||
#define glGetnConvolutionFilterARB MANGLE(GetnConvolutionFilterARB)
|
||||
#define glGetnHistogramARB MANGLE(GetnHistogramARB)
|
||||
#define glGetnMapdvARB MANGLE(GetnMapdvARB)
|
||||
#define glGetnMapfvARB MANGLE(GetnMapfvARB)
|
||||
#define glGetnMapivARB MANGLE(GetnMapivARB)
|
||||
#define glGetnMinmaxARB MANGLE(GetnMinmaxARB)
|
||||
#define glGetnPixelMapfvARB MANGLE(GetnPixelMapfvARB)
|
||||
#define glGetnPixelMapuivARB MANGLE(GetnPixelMapuivARB)
|
||||
#define glGetnPixelMapusvARB MANGLE(GetnPixelMapusvARB)
|
||||
#define glGetnPolygonStippleARB MANGLE(GetnPolygonStippleARB)
|
||||
#define glGetnSeparableFilterARB MANGLE(GetnSeparableFilterARB)
|
||||
#define glGetnTexImageARB MANGLE(GetnTexImageARB)
|
||||
#define glGetnUniformdvARB MANGLE(GetnUniformdvARB)
|
||||
#define glGetnUniformfvARB MANGLE(GetnUniformfvARB)
|
||||
#define glGetnUniformivARB MANGLE(GetnUniformivARB)
|
||||
#define glGetnUniformuivARB MANGLE(GetnUniformuivARB)
|
||||
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
|
||||
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
|
||||
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
|
||||
@@ -771,7 +700,6 @@
|
||||
#define glGetPointervEXT MANGLE(GetPointervEXT)
|
||||
#define glGetPointerv MANGLE(GetPointerv)
|
||||
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
|
||||
#define glGetProgramBinary MANGLE(GetProgramBinary)
|
||||
#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB)
|
||||
#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB)
|
||||
#define glGetProgramEnvParameterIivNV MANGLE(GetProgramEnvParameterIivNV)
|
||||
@@ -788,42 +716,28 @@
|
||||
#define glGetProgramNamedParameterfvNV MANGLE(GetProgramNamedParameterfvNV)
|
||||
#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV)
|
||||
#define glGetProgramParameterfvNV MANGLE(GetProgramParameterfvNV)
|
||||
#define glGetProgramPipelineInfoLog MANGLE(GetProgramPipelineInfoLog)
|
||||
#define glGetProgramPipelineiv MANGLE(GetProgramPipelineiv)
|
||||
#define glGetProgramRegisterfvMESA MANGLE(GetProgramRegisterfvMESA)
|
||||
#define glGetProgramStageiv MANGLE(GetProgramStageiv)
|
||||
#define glGetProgramStringARB MANGLE(GetProgramStringARB)
|
||||
#define glGetProgramStringNV MANGLE(GetProgramStringNV)
|
||||
#define glGetProgramSubroutineParameteruivNV MANGLE(GetProgramSubroutineParameteruivNV)
|
||||
#define glGetQueryIndexediv MANGLE(GetQueryIndexediv)
|
||||
#define glGetQueryivARB MANGLE(GetQueryivARB)
|
||||
#define glGetQueryiv MANGLE(GetQueryiv)
|
||||
#define glGetQueryObjecti64vEXT MANGLE(GetQueryObjecti64vEXT)
|
||||
#define glGetQueryObjecti64v MANGLE(GetQueryObjecti64v)
|
||||
#define glGetQueryObjectivARB MANGLE(GetQueryObjectivARB)
|
||||
#define glGetQueryObjectiv MANGLE(GetQueryObjectiv)
|
||||
#define glGetQueryObjectui64vEXT MANGLE(GetQueryObjectui64vEXT)
|
||||
#define glGetQueryObjectui64v MANGLE(GetQueryObjectui64v)
|
||||
#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
|
||||
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
|
||||
#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
|
||||
#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
|
||||
#define glGetSamplerParameterfv MANGLE(GetSamplerParameterfv)
|
||||
#define glGetSamplerParameterIiv MANGLE(GetSamplerParameterIiv)
|
||||
#define glGetSamplerParameterIuiv MANGLE(GetSamplerParameterIuiv)
|
||||
#define glGetSamplerParameteriv MANGLE(GetSamplerParameteriv)
|
||||
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
|
||||
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
|
||||
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
|
||||
#define glGetShaderiv MANGLE(GetShaderiv)
|
||||
#define glGetShaderPrecisionFormat MANGLE(GetShaderPrecisionFormat)
|
||||
#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
|
||||
#define glGetShaderSource MANGLE(GetShaderSource)
|
||||
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
|
||||
#define glGetStringi MANGLE(GetStringi)
|
||||
#define glGetString MANGLE(GetString)
|
||||
#define glGetSubroutineIndex MANGLE(GetSubroutineIndex)
|
||||
#define glGetSubroutineUniformLocation MANGLE(GetSubroutineUniformLocation)
|
||||
#define glGetSynciv MANGLE(GetSynciv)
|
||||
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
|
||||
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
|
||||
@@ -856,17 +770,14 @@
|
||||
#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
|
||||
#define glGetUniformBlockIndex MANGLE(GetUniformBlockIndex)
|
||||
#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
|
||||
#define glGetUniformdv MANGLE(GetUniformdv)
|
||||
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
|
||||
#define glGetUniformfv MANGLE(GetUniformfv)
|
||||
#define glGetUniformi64vNV MANGLE(GetUniformi64vNV)
|
||||
#define glGetUniformIndices MANGLE(GetUniformIndices)
|
||||
#define glGetUniformivARB MANGLE(GetUniformivARB)
|
||||
#define glGetUniformiv MANGLE(GetUniformiv)
|
||||
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
|
||||
#define glGetUniformLocation MANGLE(GetUniformLocation)
|
||||
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
|
||||
#define glGetUniformSubroutineuiv MANGLE(GetUniformSubroutineuiv)
|
||||
#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
|
||||
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
|
||||
#define glGetUniformuiv MANGLE(GetUniformuiv)
|
||||
@@ -892,10 +803,6 @@
|
||||
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
|
||||
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
|
||||
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
|
||||
#define glGetVertexAttribLdvEXT MANGLE(GetVertexAttribLdvEXT)
|
||||
#define glGetVertexAttribLdv MANGLE(GetVertexAttribLdv)
|
||||
#define glGetVertexAttribLi64vNV MANGLE(GetVertexAttribLi64vNV)
|
||||
#define glGetVertexAttribLui64vNV MANGLE(GetVertexAttribLui64vNV)
|
||||
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
|
||||
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
|
||||
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
|
||||
@@ -957,25 +864,20 @@
|
||||
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
|
||||
#define glIsFramebuffer MANGLE(IsFramebuffer)
|
||||
#define glIsList MANGLE(IsList)
|
||||
#define glIsNameAMD MANGLE(IsNameAMD)
|
||||
#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
|
||||
#define glIsNamedStringARB MANGLE(IsNamedStringARB)
|
||||
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
|
||||
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
|
||||
#define glIsProgramARB MANGLE(IsProgramARB)
|
||||
#define glIsProgram MANGLE(IsProgram)
|
||||
#define glIsProgramNV MANGLE(IsProgramNV)
|
||||
#define glIsProgramPipeline MANGLE(IsProgramPipeline)
|
||||
#define glIsQueryARB MANGLE(IsQueryARB)
|
||||
#define glIsQuery MANGLE(IsQuery)
|
||||
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
|
||||
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
|
||||
#define glIsSampler MANGLE(IsSampler)
|
||||
#define glIsShader MANGLE(IsShader)
|
||||
#define glIsSync MANGLE(IsSync)
|
||||
#define glIsTextureEXT MANGLE(IsTextureEXT)
|
||||
#define glIsTexture MANGLE(IsTexture)
|
||||
#define glIsTransformFeedback MANGLE(IsTransformFeedback)
|
||||
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
|
||||
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
|
||||
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
|
||||
@@ -1013,8 +915,6 @@
|
||||
#define glLogicOp MANGLE(LogicOp)
|
||||
#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
|
||||
#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
|
||||
#define glMakeNamedBufferNonResidentNV MANGLE(MakeNamedBufferNonResidentNV)
|
||||
#define glMakeNamedBufferResidentNV MANGLE(MakeNamedBufferResidentNV)
|
||||
#define glMap1d MANGLE(Map1d)
|
||||
#define glMap1f MANGLE(Map1f)
|
||||
#define glMap2d MANGLE(Map2d)
|
||||
@@ -1028,7 +928,6 @@
|
||||
#define glMapGrid2d MANGLE(MapGrid2d)
|
||||
#define glMapGrid2f MANGLE(MapGrid2f)
|
||||
#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT)
|
||||
#define glMapNamedBufferRangeEXT MANGLE(MapNamedBufferRangeEXT)
|
||||
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
|
||||
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
|
||||
#define glMapParameterivNV MANGLE(MapParameterivNV)
|
||||
@@ -1064,10 +963,8 @@
|
||||
#define glMatrixScalefEXT MANGLE(MatrixScalefEXT)
|
||||
#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT)
|
||||
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
|
||||
#define glMemoryBarrierEXT MANGLE(MemoryBarrierEXT)
|
||||
#define glMinmaxEXT MANGLE(MinmaxEXT)
|
||||
#define glMinmax MANGLE(Minmax)
|
||||
#define glMinSampleShadingARB MANGLE(MinSampleShadingARB)
|
||||
#define glMinSampleShading MANGLE(MinSampleShading)
|
||||
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
|
||||
#define glMultiDrawArrays MANGLE(MultiDrawArrays)
|
||||
@@ -1151,14 +1048,6 @@
|
||||
#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
|
||||
#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
|
||||
#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
|
||||
#define glMultiTexCoordP1ui MANGLE(MultiTexCoordP1ui)
|
||||
#define glMultiTexCoordP1uiv MANGLE(MultiTexCoordP1uiv)
|
||||
#define glMultiTexCoordP2ui MANGLE(MultiTexCoordP2ui)
|
||||
#define glMultiTexCoordP2uiv MANGLE(MultiTexCoordP2uiv)
|
||||
#define glMultiTexCoordP3ui MANGLE(MultiTexCoordP3ui)
|
||||
#define glMultiTexCoordP3uiv MANGLE(MultiTexCoordP3uiv)
|
||||
#define glMultiTexCoordP4ui MANGLE(MultiTexCoordP4ui)
|
||||
#define glMultiTexCoordP4uiv MANGLE(MultiTexCoordP4uiv)
|
||||
#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
|
||||
#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
|
||||
#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
|
||||
@@ -1191,7 +1080,6 @@
|
||||
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
|
||||
#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT)
|
||||
#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT)
|
||||
#define glNamedCopyBufferSubDataEXT MANGLE(NamedCopyBufferSubDataEXT)
|
||||
#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT)
|
||||
#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT)
|
||||
#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT)
|
||||
@@ -1199,6 +1087,8 @@
|
||||
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
|
||||
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
|
||||
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
|
||||
#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
|
||||
#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
|
||||
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
|
||||
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
|
||||
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
|
||||
@@ -1214,7 +1104,6 @@
|
||||
#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
|
||||
#define glNamedStringARB MANGLE(NamedStringARB)
|
||||
#define glNewList MANGLE(NewList)
|
||||
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
|
||||
#define glNormal3b MANGLE(Normal3b)
|
||||
@@ -1232,8 +1121,6 @@
|
||||
#define glNormal3s MANGLE(Normal3s)
|
||||
#define glNormal3sv MANGLE(Normal3sv)
|
||||
#define glNormalFormatNV MANGLE(NormalFormatNV)
|
||||
#define glNormalP3ui MANGLE(NormalP3ui)
|
||||
#define glNormalP3uiv MANGLE(NormalP3uiv)
|
||||
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
|
||||
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
|
||||
#define glNormalPointer MANGLE(NormalPointer)
|
||||
@@ -1253,9 +1140,6 @@
|
||||
#define glOrtho MANGLE(Ortho)
|
||||
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
|
||||
#define glPassThrough MANGLE(PassThrough)
|
||||
#define glPatchParameterfv MANGLE(PatchParameterfv)
|
||||
#define glPatchParameteri MANGLE(PatchParameteri)
|
||||
#define glPauseTransformFeedback MANGLE(PauseTransformFeedback)
|
||||
#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
|
||||
#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
|
||||
#define glPixelMapfv MANGLE(PixelMapfv)
|
||||
@@ -1307,7 +1191,6 @@
|
||||
#define glPrimitiveRestartNV MANGLE(PrimitiveRestartNV)
|
||||
#define glPrioritizeTexturesEXT MANGLE(PrioritizeTexturesEXT)
|
||||
#define glPrioritizeTextures MANGLE(PrioritizeTextures)
|
||||
#define glProgramBinary MANGLE(ProgramBinary)
|
||||
#define glProgramBufferParametersfvNV MANGLE(ProgramBufferParametersfvNV)
|
||||
#define glProgramBufferParametersIivNV MANGLE(ProgramBufferParametersIivNV)
|
||||
#define glProgramBufferParametersIuivNV MANGLE(ProgramBufferParametersIuivNV)
|
||||
@@ -1348,123 +1231,39 @@
|
||||
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
|
||||
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
|
||||
#define glProgramStringARB MANGLE(ProgramStringARB)
|
||||
#define glProgramSubroutineParametersuivNV MANGLE(ProgramSubroutineParametersuivNV)
|
||||
#define glProgramUniform1dEXT MANGLE(ProgramUniform1dEXT)
|
||||
#define glProgramUniform1d MANGLE(ProgramUniform1d)
|
||||
#define glProgramUniform1dvEXT MANGLE(ProgramUniform1dvEXT)
|
||||
#define glProgramUniform1dv MANGLE(ProgramUniform1dv)
|
||||
#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
|
||||
#define glProgramUniform1f MANGLE(ProgramUniform1f)
|
||||
#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
|
||||
#define glProgramUniform1fv MANGLE(ProgramUniform1fv)
|
||||
#define glProgramUniform1i64NV MANGLE(ProgramUniform1i64NV)
|
||||
#define glProgramUniform1i64vNV MANGLE(ProgramUniform1i64vNV)
|
||||
#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
|
||||
#define glProgramUniform1i MANGLE(ProgramUniform1i)
|
||||
#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
|
||||
#define glProgramUniform1iv MANGLE(ProgramUniform1iv)
|
||||
#define glProgramUniform1ui64NV MANGLE(ProgramUniform1ui64NV)
|
||||
#define glProgramUniform1ui64vNV MANGLE(ProgramUniform1ui64vNV)
|
||||
#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
|
||||
#define glProgramUniform1ui MANGLE(ProgramUniform1ui)
|
||||
#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
|
||||
#define glProgramUniform1uiv MANGLE(ProgramUniform1uiv)
|
||||
#define glProgramUniform2dEXT MANGLE(ProgramUniform2dEXT)
|
||||
#define glProgramUniform2d MANGLE(ProgramUniform2d)
|
||||
#define glProgramUniform2dvEXT MANGLE(ProgramUniform2dvEXT)
|
||||
#define glProgramUniform2dv MANGLE(ProgramUniform2dv)
|
||||
#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
|
||||
#define glProgramUniform2f MANGLE(ProgramUniform2f)
|
||||
#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
|
||||
#define glProgramUniform2fv MANGLE(ProgramUniform2fv)
|
||||
#define glProgramUniform2i64NV MANGLE(ProgramUniform2i64NV)
|
||||
#define glProgramUniform2i64vNV MANGLE(ProgramUniform2i64vNV)
|
||||
#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
|
||||
#define glProgramUniform2i MANGLE(ProgramUniform2i)
|
||||
#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
|
||||
#define glProgramUniform2iv MANGLE(ProgramUniform2iv)
|
||||
#define glProgramUniform2ui64NV MANGLE(ProgramUniform2ui64NV)
|
||||
#define glProgramUniform2ui64vNV MANGLE(ProgramUniform2ui64vNV)
|
||||
#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
|
||||
#define glProgramUniform2ui MANGLE(ProgramUniform2ui)
|
||||
#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
|
||||
#define glProgramUniform2uiv MANGLE(ProgramUniform2uiv)
|
||||
#define glProgramUniform3dEXT MANGLE(ProgramUniform3dEXT)
|
||||
#define glProgramUniform3d MANGLE(ProgramUniform3d)
|
||||
#define glProgramUniform3dvEXT MANGLE(ProgramUniform3dvEXT)
|
||||
#define glProgramUniform3dv MANGLE(ProgramUniform3dv)
|
||||
#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
|
||||
#define glProgramUniform3f MANGLE(ProgramUniform3f)
|
||||
#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
|
||||
#define glProgramUniform3fv MANGLE(ProgramUniform3fv)
|
||||
#define glProgramUniform3i64NV MANGLE(ProgramUniform3i64NV)
|
||||
#define glProgramUniform3i64vNV MANGLE(ProgramUniform3i64vNV)
|
||||
#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
|
||||
#define glProgramUniform3i MANGLE(ProgramUniform3i)
|
||||
#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
|
||||
#define glProgramUniform3iv MANGLE(ProgramUniform3iv)
|
||||
#define glProgramUniform3ui64NV MANGLE(ProgramUniform3ui64NV)
|
||||
#define glProgramUniform3ui64vNV MANGLE(ProgramUniform3ui64vNV)
|
||||
#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
|
||||
#define glProgramUniform3ui MANGLE(ProgramUniform3ui)
|
||||
#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
|
||||
#define glProgramUniform3uiv MANGLE(ProgramUniform3uiv)
|
||||
#define glProgramUniform4dEXT MANGLE(ProgramUniform4dEXT)
|
||||
#define glProgramUniform4d MANGLE(ProgramUniform4d)
|
||||
#define glProgramUniform4dvEXT MANGLE(ProgramUniform4dvEXT)
|
||||
#define glProgramUniform4dv MANGLE(ProgramUniform4dv)
|
||||
#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
|
||||
#define glProgramUniform4f MANGLE(ProgramUniform4f)
|
||||
#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
|
||||
#define glProgramUniform4fv MANGLE(ProgramUniform4fv)
|
||||
#define glProgramUniform4i64NV MANGLE(ProgramUniform4i64NV)
|
||||
#define glProgramUniform4i64vNV MANGLE(ProgramUniform4i64vNV)
|
||||
#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
|
||||
#define glProgramUniform4i MANGLE(ProgramUniform4i)
|
||||
#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
|
||||
#define glProgramUniform4iv MANGLE(ProgramUniform4iv)
|
||||
#define glProgramUniform4ui64NV MANGLE(ProgramUniform4ui64NV)
|
||||
#define glProgramUniform4ui64vNV MANGLE(ProgramUniform4ui64vNV)
|
||||
#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
|
||||
#define glProgramUniform4ui MANGLE(ProgramUniform4ui)
|
||||
#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
|
||||
#define glProgramUniform4uiv MANGLE(ProgramUniform4uiv)
|
||||
#define glProgramUniformMatrix2dvEXT MANGLE(ProgramUniformMatrix2dvEXT)
|
||||
#define glProgramUniformMatrix2dv MANGLE(ProgramUniformMatrix2dv)
|
||||
#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
|
||||
#define glProgramUniformMatrix2fv MANGLE(ProgramUniformMatrix2fv)
|
||||
#define glProgramUniformMatrix2x3dvEXT MANGLE(ProgramUniformMatrix2x3dvEXT)
|
||||
#define glProgramUniformMatrix2x3dv MANGLE(ProgramUniformMatrix2x3dv)
|
||||
#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
|
||||
#define glProgramUniformMatrix2x3fv MANGLE(ProgramUniformMatrix2x3fv)
|
||||
#define glProgramUniformMatrix2x4dvEXT MANGLE(ProgramUniformMatrix2x4dvEXT)
|
||||
#define glProgramUniformMatrix2x4dv MANGLE(ProgramUniformMatrix2x4dv)
|
||||
#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
|
||||
#define glProgramUniformMatrix2x4fv MANGLE(ProgramUniformMatrix2x4fv)
|
||||
#define glProgramUniformMatrix3dvEXT MANGLE(ProgramUniformMatrix3dvEXT)
|
||||
#define glProgramUniformMatrix3dv MANGLE(ProgramUniformMatrix3dv)
|
||||
#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
|
||||
#define glProgramUniformMatrix3fv MANGLE(ProgramUniformMatrix3fv)
|
||||
#define glProgramUniformMatrix3x2dvEXT MANGLE(ProgramUniformMatrix3x2dvEXT)
|
||||
#define glProgramUniformMatrix3x2dv MANGLE(ProgramUniformMatrix3x2dv)
|
||||
#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
|
||||
#define glProgramUniformMatrix3x2fv MANGLE(ProgramUniformMatrix3x2fv)
|
||||
#define glProgramUniformMatrix3x4dvEXT MANGLE(ProgramUniformMatrix3x4dvEXT)
|
||||
#define glProgramUniformMatrix3x4dv MANGLE(ProgramUniformMatrix3x4dv)
|
||||
#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
|
||||
#define glProgramUniformMatrix3x4fv MANGLE(ProgramUniformMatrix3x4fv)
|
||||
#define glProgramUniformMatrix4dvEXT MANGLE(ProgramUniformMatrix4dvEXT)
|
||||
#define glProgramUniformMatrix4dv MANGLE(ProgramUniformMatrix4dv)
|
||||
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
|
||||
#define glProgramUniformMatrix4fv MANGLE(ProgramUniformMatrix4fv)
|
||||
#define glProgramUniformMatrix4x2dvEXT MANGLE(ProgramUniformMatrix4x2dvEXT)
|
||||
#define glProgramUniformMatrix4x2dv MANGLE(ProgramUniformMatrix4x2dv)
|
||||
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
|
||||
#define glProgramUniformMatrix4x2fv MANGLE(ProgramUniformMatrix4x2fv)
|
||||
#define glProgramUniformMatrix4x3dvEXT MANGLE(ProgramUniformMatrix4x3dvEXT)
|
||||
#define glProgramUniformMatrix4x3dv MANGLE(ProgramUniformMatrix4x3dv)
|
||||
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
|
||||
#define glProgramUniformMatrix4x3fv MANGLE(ProgramUniformMatrix4x3fv)
|
||||
#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
|
||||
#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
|
||||
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
|
||||
@@ -1475,7 +1274,6 @@
|
||||
#define glPushClientAttrib MANGLE(PushClientAttrib)
|
||||
#define glPushMatrix MANGLE(PushMatrix)
|
||||
#define glPushName MANGLE(PushName)
|
||||
#define glQueryCounter MANGLE(QueryCounter)
|
||||
#define glRasterPos2d MANGLE(RasterPos2d)
|
||||
#define glRasterPos2dv MANGLE(RasterPos2dv)
|
||||
#define glRasterPos2f MANGLE(RasterPos2f)
|
||||
@@ -1502,7 +1300,6 @@
|
||||
#define glRasterPos4sv MANGLE(RasterPos4sv)
|
||||
#define glReadBuffer MANGLE(ReadBuffer)
|
||||
#define glReadInstrumentsSGIX MANGLE(ReadInstrumentsSGIX)
|
||||
#define glReadnPixelsARB MANGLE(ReadnPixelsARB)
|
||||
#define glReadPixels MANGLE(ReadPixels)
|
||||
#define glRectd MANGLE(Rectd)
|
||||
#define glRectdv MANGLE(Rectdv)
|
||||
@@ -1513,7 +1310,6 @@
|
||||
#define glRects MANGLE(Rects)
|
||||
#define glRectsv MANGLE(Rectsv)
|
||||
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
|
||||
#define glReleaseShaderCompiler MANGLE(ReleaseShaderCompiler)
|
||||
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
|
||||
#define glRenderbufferStorage MANGLE(RenderbufferStorage)
|
||||
#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
|
||||
@@ -1549,7 +1345,6 @@
|
||||
#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
|
||||
#define glResetMinmax MANGLE(ResetMinmax)
|
||||
#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
|
||||
#define glResumeTransformFeedback MANGLE(ResumeTransformFeedback)
|
||||
#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
|
||||
#define glRotated MANGLE(Rotated)
|
||||
#define glRotatef MANGLE(Rotatef)
|
||||
@@ -1562,17 +1357,8 @@
|
||||
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
|
||||
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
|
||||
#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
|
||||
#define glSamplerParameterf MANGLE(SamplerParameterf)
|
||||
#define glSamplerParameterfv MANGLE(SamplerParameterfv)
|
||||
#define glSamplerParameterIiv MANGLE(SamplerParameterIiv)
|
||||
#define glSamplerParameteri MANGLE(SamplerParameteri)
|
||||
#define glSamplerParameterIuiv MANGLE(SamplerParameterIuiv)
|
||||
#define glSamplerParameteriv MANGLE(SamplerParameteriv)
|
||||
#define glScaled MANGLE(Scaled)
|
||||
#define glScalef MANGLE(Scalef)
|
||||
#define glScissorArrayv MANGLE(ScissorArrayv)
|
||||
#define glScissorIndexed MANGLE(ScissorIndexed)
|
||||
#define glScissorIndexedv MANGLE(ScissorIndexedv)
|
||||
#define glScissor MANGLE(Scissor)
|
||||
#define glSecondaryColor3bEXT MANGLE(SecondaryColor3bEXT)
|
||||
#define glSecondaryColor3b MANGLE(SecondaryColor3b)
|
||||
@@ -1609,8 +1395,6 @@
|
||||
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
|
||||
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
|
||||
#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
|
||||
#define glSecondaryColorP3ui MANGLE(SecondaryColorP3ui)
|
||||
#define glSecondaryColorP3uiv MANGLE(SecondaryColorP3uiv)
|
||||
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
|
||||
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
|
||||
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
|
||||
@@ -1624,7 +1408,6 @@
|
||||
#define glSetInvariantEXT MANGLE(SetInvariantEXT)
|
||||
#define glSetLocalConstantEXT MANGLE(SetLocalConstantEXT)
|
||||
#define glShadeModel MANGLE(ShadeModel)
|
||||
#define glShaderBinary MANGLE(ShaderBinary)
|
||||
#define glShaderOp1EXT MANGLE(ShaderOp1EXT)
|
||||
#define glShaderOp2EXT MANGLE(ShaderOp2EXT)
|
||||
#define glShaderOp3EXT MANGLE(ShaderOp3EXT)
|
||||
@@ -1726,14 +1509,6 @@
|
||||
#define glTexCoord4s MANGLE(TexCoord4s)
|
||||
#define glTexCoord4sv MANGLE(TexCoord4sv)
|
||||
#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
|
||||
#define glTexCoordP1ui MANGLE(TexCoordP1ui)
|
||||
#define glTexCoordP1uiv MANGLE(TexCoordP1uiv)
|
||||
#define glTexCoordP2ui MANGLE(TexCoordP2ui)
|
||||
#define glTexCoordP2uiv MANGLE(TexCoordP2uiv)
|
||||
#define glTexCoordP3ui MANGLE(TexCoordP3ui)
|
||||
#define glTexCoordP3uiv MANGLE(TexCoordP3uiv)
|
||||
#define glTexCoordP4ui MANGLE(TexCoordP4ui)
|
||||
#define glTexCoordP4uiv MANGLE(TexCoordP4uiv)
|
||||
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
|
||||
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
|
||||
#define glTexCoordPointer MANGLE(TexCoordPointer)
|
||||
@@ -1794,108 +1569,73 @@
|
||||
#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT)
|
||||
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
|
||||
#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
|
||||
#define glTransformFeedbackStreamAttribsNV MANGLE(TransformFeedbackStreamAttribsNV)
|
||||
#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT)
|
||||
#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings)
|
||||
#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
|
||||
#define glTranslated MANGLE(Translated)
|
||||
#define glTranslatef MANGLE(Translatef)
|
||||
#define glUniform1d MANGLE(Uniform1d)
|
||||
#define glUniform1dv MANGLE(Uniform1dv)
|
||||
#define glUniform1fARB MANGLE(Uniform1fARB)
|
||||
#define glUniform1f MANGLE(Uniform1f)
|
||||
#define glUniform1fvARB MANGLE(Uniform1fvARB)
|
||||
#define glUniform1fv MANGLE(Uniform1fv)
|
||||
#define glUniform1i64NV MANGLE(Uniform1i64NV)
|
||||
#define glUniform1i64vNV MANGLE(Uniform1i64vNV)
|
||||
#define glUniform1iARB MANGLE(Uniform1iARB)
|
||||
#define glUniform1i MANGLE(Uniform1i)
|
||||
#define glUniform1ivARB MANGLE(Uniform1ivARB)
|
||||
#define glUniform1iv MANGLE(Uniform1iv)
|
||||
#define glUniform1ui64NV MANGLE(Uniform1ui64NV)
|
||||
#define glUniform1ui64vNV MANGLE(Uniform1ui64vNV)
|
||||
#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
|
||||
#define glUniform1ui MANGLE(Uniform1ui)
|
||||
#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
|
||||
#define glUniform1uiv MANGLE(Uniform1uiv)
|
||||
#define glUniform2d MANGLE(Uniform2d)
|
||||
#define glUniform2dv MANGLE(Uniform2dv)
|
||||
#define glUniform2fARB MANGLE(Uniform2fARB)
|
||||
#define glUniform2f MANGLE(Uniform2f)
|
||||
#define glUniform2fvARB MANGLE(Uniform2fvARB)
|
||||
#define glUniform2fv MANGLE(Uniform2fv)
|
||||
#define glUniform2i64NV MANGLE(Uniform2i64NV)
|
||||
#define glUniform2i64vNV MANGLE(Uniform2i64vNV)
|
||||
#define glUniform2iARB MANGLE(Uniform2iARB)
|
||||
#define glUniform2i MANGLE(Uniform2i)
|
||||
#define glUniform2ivARB MANGLE(Uniform2ivARB)
|
||||
#define glUniform2iv MANGLE(Uniform2iv)
|
||||
#define glUniform2ui64NV MANGLE(Uniform2ui64NV)
|
||||
#define glUniform2ui64vNV MANGLE(Uniform2ui64vNV)
|
||||
#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
|
||||
#define glUniform2ui MANGLE(Uniform2ui)
|
||||
#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
|
||||
#define glUniform2uiv MANGLE(Uniform2uiv)
|
||||
#define glUniform3d MANGLE(Uniform3d)
|
||||
#define glUniform3dv MANGLE(Uniform3dv)
|
||||
#define glUniform3fARB MANGLE(Uniform3fARB)
|
||||
#define glUniform3f MANGLE(Uniform3f)
|
||||
#define glUniform3fvARB MANGLE(Uniform3fvARB)
|
||||
#define glUniform3fv MANGLE(Uniform3fv)
|
||||
#define glUniform3i64NV MANGLE(Uniform3i64NV)
|
||||
#define glUniform3i64vNV MANGLE(Uniform3i64vNV)
|
||||
#define glUniform3iARB MANGLE(Uniform3iARB)
|
||||
#define glUniform3i MANGLE(Uniform3i)
|
||||
#define glUniform3ivARB MANGLE(Uniform3ivARB)
|
||||
#define glUniform3iv MANGLE(Uniform3iv)
|
||||
#define glUniform3ui64NV MANGLE(Uniform3ui64NV)
|
||||
#define glUniform3ui64vNV MANGLE(Uniform3ui64vNV)
|
||||
#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
|
||||
#define glUniform3ui MANGLE(Uniform3ui)
|
||||
#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
|
||||
#define glUniform3uiv MANGLE(Uniform3uiv)
|
||||
#define glUniform4d MANGLE(Uniform4d)
|
||||
#define glUniform4dv MANGLE(Uniform4dv)
|
||||
#define glUniform4fARB MANGLE(Uniform4fARB)
|
||||
#define glUniform4f MANGLE(Uniform4f)
|
||||
#define glUniform4fvARB MANGLE(Uniform4fvARB)
|
||||
#define glUniform4fv MANGLE(Uniform4fv)
|
||||
#define glUniform4i64NV MANGLE(Uniform4i64NV)
|
||||
#define glUniform4i64vNV MANGLE(Uniform4i64vNV)
|
||||
#define glUniform4iARB MANGLE(Uniform4iARB)
|
||||
#define glUniform4i MANGLE(Uniform4i)
|
||||
#define glUniform4ivARB MANGLE(Uniform4ivARB)
|
||||
#define glUniform4iv MANGLE(Uniform4iv)
|
||||
#define glUniform4ui64NV MANGLE(Uniform4ui64NV)
|
||||
#define glUniform4ui64vNV MANGLE(Uniform4ui64vNV)
|
||||
#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
|
||||
#define glUniform4ui MANGLE(Uniform4ui)
|
||||
#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
|
||||
#define glUniform4uiv MANGLE(Uniform4uiv)
|
||||
#define glUniformBlockBinding MANGLE(UniformBlockBinding)
|
||||
#define glUniformBufferEXT MANGLE(UniformBufferEXT)
|
||||
#define glUniformMatrix2dv MANGLE(UniformMatrix2dv)
|
||||
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
|
||||
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
|
||||
#define glUniformMatrix2x3dv MANGLE(UniformMatrix2x3dv)
|
||||
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
|
||||
#define glUniformMatrix2x4dv MANGLE(UniformMatrix2x4dv)
|
||||
#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv)
|
||||
#define glUniformMatrix3dv MANGLE(UniformMatrix3dv)
|
||||
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
|
||||
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
|
||||
#define glUniformMatrix3x2dv MANGLE(UniformMatrix3x2dv)
|
||||
#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv)
|
||||
#define glUniformMatrix3x4dv MANGLE(UniformMatrix3x4dv)
|
||||
#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv)
|
||||
#define glUniformMatrix4dv MANGLE(UniformMatrix4dv)
|
||||
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
|
||||
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
|
||||
#define glUniformMatrix4x2dv MANGLE(UniformMatrix4x2dv)
|
||||
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
|
||||
#define glUniformMatrix4x3dv MANGLE(UniformMatrix4x3dv)
|
||||
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
|
||||
#define glUniformSubroutinesuiv MANGLE(UniformSubroutinesuiv)
|
||||
#define glUniformui64NV MANGLE(Uniformui64NV)
|
||||
#define glUniformui64vNV MANGLE(Uniformui64vNV)
|
||||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
@@ -1906,11 +1646,9 @@
|
||||
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
|
||||
#define glUseProgram MANGLE(UseProgram)
|
||||
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
|
||||
#define glUseProgramStages MANGLE(UseProgramStages)
|
||||
#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
|
||||
#define glValidateProgramARB MANGLE(ValidateProgramARB)
|
||||
#define glValidateProgram MANGLE(ValidateProgram)
|
||||
#define glValidateProgramPipeline MANGLE(ValidateProgramPipeline)
|
||||
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
|
||||
#define glVariantbvEXT MANGLE(VariantbvEXT)
|
||||
#define glVariantdvEXT MANGLE(VariantdvEXT)
|
||||
@@ -1921,16 +1659,6 @@
|
||||
#define glVariantubvEXT MANGLE(VariantubvEXT)
|
||||
#define glVariantuivEXT MANGLE(VariantuivEXT)
|
||||
#define glVariantusvEXT MANGLE(VariantusvEXT)
|
||||
#define glVDPAUFiniNV MANGLE(VDPAUFiniNV)
|
||||
#define glVDPAUGetSurfaceivNV MANGLE(VDPAUGetSurfaceivNV)
|
||||
#define glVDPAUInitNV MANGLE(VDPAUInitNV)
|
||||
#define glVDPAUIsSurfaceNV MANGLE(VDPAUIsSurfaceNV)
|
||||
#define glVDPAUMapSurfacesNV MANGLE(VDPAUMapSurfacesNV)
|
||||
#define glVDPAURegisterOutputSurfaceNV MANGLE(VDPAURegisterOutputSurfaceNV)
|
||||
#define glVDPAURegisterVideoSurfaceNV MANGLE(VDPAURegisterVideoSurfaceNV)
|
||||
#define glVDPAUSurfaceAccessNV MANGLE(VDPAUSurfaceAccessNV)
|
||||
#define glVDPAUUnmapSurfacesNV MANGLE(VDPAUUnmapSurfacesNV)
|
||||
#define glVDPAUUnregisterSurfaceNV MANGLE(VDPAUUnregisterSurfaceNV)
|
||||
#define glVertex2d MANGLE(Vertex2d)
|
||||
#define glVertex2dv MANGLE(Vertex2dv)
|
||||
#define glVertex2f MANGLE(Vertex2f)
|
||||
@@ -1964,7 +1692,6 @@
|
||||
#define glVertexArrayParameteriAPPLE MANGLE(VertexArrayParameteriAPPLE)
|
||||
#define glVertexArrayRangeAPPLE MANGLE(VertexArrayRangeAPPLE)
|
||||
#define glVertexArrayRangeNV MANGLE(VertexArrayRangeNV)
|
||||
#define glVertexArrayVertexAttribLOffsetEXT MANGLE(VertexArrayVertexAttribLOffsetEXT)
|
||||
#define glVertexAttrib1dARB MANGLE(VertexAttrib1dARB)
|
||||
#define glVertexAttrib1d MANGLE(VertexAttrib1d)
|
||||
#define glVertexAttrib1dNV MANGLE(VertexAttrib1dNV)
|
||||
@@ -2073,7 +1800,6 @@
|
||||
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
|
||||
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
|
||||
#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
|
||||
#define glVertexAttribDivisor MANGLE(VertexAttribDivisor)
|
||||
#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
|
||||
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
|
||||
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
|
||||
@@ -2118,49 +1844,6 @@
|
||||
#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
|
||||
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
|
||||
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
|
||||
#define glVertexAttribL1dEXT MANGLE(VertexAttribL1dEXT)
|
||||
#define glVertexAttribL1d MANGLE(VertexAttribL1d)
|
||||
#define glVertexAttribL1dvEXT MANGLE(VertexAttribL1dvEXT)
|
||||
#define glVertexAttribL1dv MANGLE(VertexAttribL1dv)
|
||||
#define glVertexAttribL1i64NV MANGLE(VertexAttribL1i64NV)
|
||||
#define glVertexAttribL1i64vNV MANGLE(VertexAttribL1i64vNV)
|
||||
#define glVertexAttribL1ui64NV MANGLE(VertexAttribL1ui64NV)
|
||||
#define glVertexAttribL1ui64vNV MANGLE(VertexAttribL1ui64vNV)
|
||||
#define glVertexAttribL2dEXT MANGLE(VertexAttribL2dEXT)
|
||||
#define glVertexAttribL2d MANGLE(VertexAttribL2d)
|
||||
#define glVertexAttribL2dvEXT MANGLE(VertexAttribL2dvEXT)
|
||||
#define glVertexAttribL2dv MANGLE(VertexAttribL2dv)
|
||||
#define glVertexAttribL2i64NV MANGLE(VertexAttribL2i64NV)
|
||||
#define glVertexAttribL2i64vNV MANGLE(VertexAttribL2i64vNV)
|
||||
#define glVertexAttribL2ui64NV MANGLE(VertexAttribL2ui64NV)
|
||||
#define glVertexAttribL2ui64vNV MANGLE(VertexAttribL2ui64vNV)
|
||||
#define glVertexAttribL3dEXT MANGLE(VertexAttribL3dEXT)
|
||||
#define glVertexAttribL3d MANGLE(VertexAttribL3d)
|
||||
#define glVertexAttribL3dvEXT MANGLE(VertexAttribL3dvEXT)
|
||||
#define glVertexAttribL3dv MANGLE(VertexAttribL3dv)
|
||||
#define glVertexAttribL3i64NV MANGLE(VertexAttribL3i64NV)
|
||||
#define glVertexAttribL3i64vNV MANGLE(VertexAttribL3i64vNV)
|
||||
#define glVertexAttribL3ui64NV MANGLE(VertexAttribL3ui64NV)
|
||||
#define glVertexAttribL3ui64vNV MANGLE(VertexAttribL3ui64vNV)
|
||||
#define glVertexAttribL4dEXT MANGLE(VertexAttribL4dEXT)
|
||||
#define glVertexAttribL4d MANGLE(VertexAttribL4d)
|
||||
#define glVertexAttribL4dvEXT MANGLE(VertexAttribL4dvEXT)
|
||||
#define glVertexAttribL4dv MANGLE(VertexAttribL4dv)
|
||||
#define glVertexAttribL4i64NV MANGLE(VertexAttribL4i64NV)
|
||||
#define glVertexAttribL4i64vNV MANGLE(VertexAttribL4i64vNV)
|
||||
#define glVertexAttribL4ui64NV MANGLE(VertexAttribL4ui64NV)
|
||||
#define glVertexAttribL4ui64vNV MANGLE(VertexAttribL4ui64vNV)
|
||||
#define glVertexAttribLFormatNV MANGLE(VertexAttribLFormatNV)
|
||||
#define glVertexAttribLPointerEXT MANGLE(VertexAttribLPointerEXT)
|
||||
#define glVertexAttribLPointer MANGLE(VertexAttribLPointer)
|
||||
#define glVertexAttribP1ui MANGLE(VertexAttribP1ui)
|
||||
#define glVertexAttribP1uiv MANGLE(VertexAttribP1uiv)
|
||||
#define glVertexAttribP2ui MANGLE(VertexAttribP2ui)
|
||||
#define glVertexAttribP2uiv MANGLE(VertexAttribP2uiv)
|
||||
#define glVertexAttribP3ui MANGLE(VertexAttribP3ui)
|
||||
#define glVertexAttribP3uiv MANGLE(VertexAttribP3uiv)
|
||||
#define glVertexAttribP4ui MANGLE(VertexAttribP4ui)
|
||||
#define glVertexAttribP4uiv MANGLE(VertexAttribP4uiv)
|
||||
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
|
||||
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
|
||||
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
|
||||
@@ -2185,12 +1868,6 @@
|
||||
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
|
||||
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
|
||||
#define glVertexFormatNV MANGLE(VertexFormatNV)
|
||||
#define glVertexP2ui MANGLE(VertexP2ui)
|
||||
#define glVertexP2uiv MANGLE(VertexP2uiv)
|
||||
#define glVertexP3ui MANGLE(VertexP3ui)
|
||||
#define glVertexP3uiv MANGLE(VertexP3uiv)
|
||||
#define glVertexP4ui MANGLE(VertexP4ui)
|
||||
#define glVertexP4uiv MANGLE(VertexP4uiv)
|
||||
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
|
||||
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
|
||||
#define glVertexPointer MANGLE(VertexPointer)
|
||||
@@ -2236,9 +1913,6 @@
|
||||
#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
|
||||
#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
|
||||
#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
|
||||
#define glViewportArrayv MANGLE(ViewportArrayv)
|
||||
#define glViewportIndexedf MANGLE(ViewportIndexedf)
|
||||
#define glViewportIndexedfv MANGLE(ViewportIndexedfv)
|
||||
#define glViewport MANGLE(Viewport)
|
||||
#define glWaitSync MANGLE(WaitSync)
|
||||
#define glWeightbvARB MANGLE(WeightbvARB)
|
||||
|
@@ -29,9 +29,9 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated $Date: 2010-12-09 02:15:08 -0800 (Thu, 09 Dec 2010) $ */
|
||||
/* glext.h last updated $Date: 2010-11-03 18:59:30 -0700 (Wed, 03 Nov 2010) $ */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 67
|
||||
#define GL_GLEXT_VERSION 66
|
||||
/* Function declaration macros - to move into glplatform.h */
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
@@ -5026,12 +5026,6 @@ extern "C" {
|
||||
#define GL_DEPTH_CLAMP_FAR_AMD 0x901F
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_sRGB_decode
|
||||
#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
|
||||
#define GL_DECODE_EXT 0x8A49
|
||||
#define GL_SKIP_DECODE_EXT 0x8A4A
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -11037,10 +11031,6 @@ typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, cons
|
||||
#define GL_AMD_depth_clamp_separate 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_sRGB_decode
|
||||
#define GL_EXT_texture_sRGB_decode 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -251,15 +251,6 @@ struct __DRItexBufferExtensionRec {
|
||||
GLint target,
|
||||
GLint format,
|
||||
__DRIdrawable *pDraw);
|
||||
/**
|
||||
* Method to release texture buffer in case some special platform
|
||||
* need this.
|
||||
*
|
||||
* For GLX_EXT_texture_from_pixmap with AIGLX.
|
||||
*/
|
||||
void (*releaseTexBuffer)(__DRIcontext *pDRICtx,
|
||||
GLint target,
|
||||
__DRIdrawable *pDraw);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -499,7 +490,6 @@ struct __DRIuseInvalidateExtensionRec {
|
||||
#define __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE 45
|
||||
#define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS 46
|
||||
#define __DRI_ATTRIB_YINVERTED 47
|
||||
#define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE 48
|
||||
|
||||
/* __DRI_ATTRIB_RENDER_TYPE */
|
||||
#define __DRI_ATTRIB_RGBA_BIT 0x01
|
||||
@@ -657,7 +647,7 @@ struct __DRIlegacyExtensionRec {
|
||||
* conjunction with the core extension.
|
||||
*/
|
||||
#define __DRI_SWRAST "DRI_SWRast"
|
||||
#define __DRI_SWRAST_VERSION 2
|
||||
#define __DRI_SWRAST_VERSION 1
|
||||
|
||||
struct __DRIswrastExtensionRec {
|
||||
__DRIextension base;
|
||||
@@ -670,13 +660,6 @@ struct __DRIswrastExtensionRec {
|
||||
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
void *loaderPrivate);
|
||||
|
||||
/* Since version 2 */
|
||||
__DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
|
||||
int api,
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
void *data);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -786,14 +769,6 @@ struct __DRIdri2ExtensionRec {
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
void *data);
|
||||
|
||||
__DRIbuffer *(*allocateBuffer)(__DRIscreen *screen,
|
||||
unsigned int attachment,
|
||||
unsigned int format,
|
||||
int width,
|
||||
int height);
|
||||
void (*releaseBuffer)(__DRIscreen *screen,
|
||||
__DRIbuffer *buffer);
|
||||
};
|
||||
|
||||
|
||||
@@ -813,6 +788,7 @@ struct __DRIdri2ExtensionRec {
|
||||
#define __DRI_IMAGE_FORMAT_RGB565 0x1001
|
||||
#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002
|
||||
#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003
|
||||
#define __DRI_IMAGE_FORMAT_RGBA8888_REV 0x1004
|
||||
|
||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||
|
@@ -194,8 +194,5 @@ def generate(env):
|
||||
env.AppendUnique(SHLINKFLAGS = ['-Wl,--enable-stdcall-fixup'])
|
||||
#env.AppendUnique(SHLINKFLAGS = ['-Wl,--kill-at'])
|
||||
|
||||
# Avoid depending on gcc runtime DLLs
|
||||
env.AppendUnique(LINKFLAGS = ['-static-libgcc'])
|
||||
|
||||
def exists(env):
|
||||
return find(env)
|
||||
|
@@ -56,8 +56,6 @@ def quietCommandLines(env):
|
||||
env['SHLINKCOMSTR'] = " Linking $TARGET ..."
|
||||
env['LDMODULECOMSTR'] = " Linking $TARGET ..."
|
||||
env['SWIGCOMSTR'] = " Generating $TARGET ..."
|
||||
env['LEXCOMSTR'] = " Generating $TARGET ..."
|
||||
env['YACCCOMSTR'] = " Generating $TARGET ..."
|
||||
env['CODEGENCOMSTR'] = " Generating $TARGET ..."
|
||||
|
||||
|
||||
|
52
scons/gallium.py
Executable file → Normal file
52
scons/gallium.py
Executable file → Normal file
@@ -35,7 +35,6 @@ import os
|
||||
import os.path
|
||||
import re
|
||||
import subprocess
|
||||
import platform as _platform
|
||||
|
||||
import SCons.Action
|
||||
import SCons.Builder
|
||||
@@ -142,10 +141,6 @@ def pkg_config_modules(env, name, modules):
|
||||
def generate(env):
|
||||
"""Common environment generation code"""
|
||||
|
||||
# Tell tools which machine to compile for
|
||||
env['TARGET_ARCH'] = env['machine']
|
||||
env['MSVS_ARCH'] = env['machine']
|
||||
|
||||
# Toolchain
|
||||
platform = env['platform']
|
||||
if env['toolchain'] == 'default':
|
||||
@@ -180,10 +175,6 @@ def generate(env):
|
||||
env['gcc'] = 'gcc' in os.path.basename(env['CC']).split('-')
|
||||
env['msvc'] = env['CC'] == 'cl'
|
||||
|
||||
if env['msvc'] and env['toolchain'] == 'default' and env['machine'] == 'x86_64':
|
||||
# MSVC x64 support is broken in earlier versions of scons
|
||||
env.EnsurePythonVersion(2, 0)
|
||||
|
||||
# shortcuts
|
||||
machine = env['machine']
|
||||
platform = env['platform']
|
||||
@@ -192,27 +183,6 @@ def generate(env):
|
||||
gcc = env['gcc']
|
||||
msvc = env['msvc']
|
||||
|
||||
# Determine whether we are cross compiling; in particular, whether we need
|
||||
# to compile code generators with a different compiler as the target code.
|
||||
host_platform = _platform.system().lower()
|
||||
if host_platform.startswith('cygwin'):
|
||||
host_platform = 'cygwin'
|
||||
host_machine = os.environ.get('PROCESSOR_ARCHITEW6432', os.environ.get('PROCESSOR_ARCHITECTURE', _platform.machine()))
|
||||
host_machine = {
|
||||
'x86': 'x86',
|
||||
'i386': 'x86',
|
||||
'i486': 'x86',
|
||||
'i586': 'x86',
|
||||
'i686': 'x86',
|
||||
'ppc' : 'ppc',
|
||||
'AMD64': 'x86_64',
|
||||
'x86_64': 'x86_64',
|
||||
}.get(host_machine, 'generic')
|
||||
env['crosscompile'] = platform != host_platform
|
||||
if machine == 'x86_64' and host_machine != 'x86_64':
|
||||
env['crosscompile'] = True
|
||||
env['hostonly'] = False
|
||||
|
||||
# Backwards compatability with the debug= profile= options
|
||||
if env['build'] == 'debug':
|
||||
if not env['debug']:
|
||||
@@ -379,15 +349,12 @@ def generate(env):
|
||||
'-m32',
|
||||
#'-march=pentium4',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2') \
|
||||
and (platform != 'windows' or env['build'] == 'debug' or True):
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
|
||||
# NOTE: We need to ensure stack is realigned given that we
|
||||
# produce shared objects, and have no control over the stack
|
||||
# alignment policy of the application. Therefore we need
|
||||
# -mstackrealign ore -mincoming-stack-boundary=2.
|
||||
#
|
||||
# XXX: -O and -mstackrealign causes stack corruption on MinGW
|
||||
#
|
||||
# XXX: We could have SSE without -mstackrealign if we always used
|
||||
# __attribute__((force_align_arg_pointer)), but that's not
|
||||
# always the case.
|
||||
@@ -435,19 +402,13 @@ def generate(env):
|
||||
'/Od', # disable optimizations
|
||||
'/Oi', # enable intrinsic functions
|
||||
'/Oy-', # disable frame pointer omission
|
||||
'/GL-', # disable whole program optimization
|
||||
]
|
||||
else:
|
||||
ccflags += [
|
||||
'/O2', # optimize for speed
|
||||
]
|
||||
if env['build'] == 'release':
|
||||
ccflags += [
|
||||
'/GL', # enable whole program optimization
|
||||
]
|
||||
else:
|
||||
ccflags += [
|
||||
'/GL-', # disable whole program optimization
|
||||
]
|
||||
ccflags += [
|
||||
'/fp:fast', # fast floating point
|
||||
'/W3', # warning level
|
||||
@@ -537,7 +498,7 @@ def generate(env):
|
||||
else:
|
||||
env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
|
||||
if msvc:
|
||||
if env['build'] == 'release':
|
||||
if env['build'] != 'debug':
|
||||
# enable Link-time Code Generation
|
||||
linkflags += ['/LTCG']
|
||||
env.Append(ARFLAGS = ['/LTCG'])
|
||||
@@ -590,18 +551,13 @@ def generate(env):
|
||||
env.Append(LINKFLAGS = linkflags)
|
||||
env.Append(SHLINKFLAGS = shlinkflags)
|
||||
|
||||
# We have C++ in several libraries, so always link with the C++ compiler
|
||||
if env['gcc']:
|
||||
env['LINK'] = env['CXX']
|
||||
|
||||
# Default libs
|
||||
env.Append(LIBS = [])
|
||||
|
||||
# Load tools
|
||||
env.Tool('lex')
|
||||
env.Tool('yacc')
|
||||
if env['llvm']:
|
||||
env.Tool('llvm')
|
||||
env.Tool('udis86')
|
||||
|
||||
pkg_config_modules(env, 'x11', ['x11', 'xext'])
|
||||
pkg_config_modules(env, 'drm', ['libdrm'])
|
||||
|
@@ -142,11 +142,13 @@ def generate(env):
|
||||
|
||||
try:
|
||||
env.ParseConfig('llvm-config --cppflags')
|
||||
env.ParseConfig('llvm-config --libs')
|
||||
env.ParseConfig('llvm-config --libs jit interpreter nativecodegen bitwriter')
|
||||
env.ParseConfig('llvm-config --ldflags')
|
||||
except OSError:
|
||||
print 'scons: llvm-config version %s failed' % llvm_version
|
||||
return
|
||||
else:
|
||||
env['LINK'] = env['CXX']
|
||||
|
||||
assert llvm_version is not None
|
||||
env['llvm'] = True
|
||||
|
72
scons/python.py
Normal file
72
scons/python.py
Normal file
@@ -0,0 +1,72 @@
|
||||
"""gallium
|
||||
|
||||
Frontend-tool for Gallium3D architecture.
|
||||
|
||||
"""
|
||||
|
||||
#
|
||||
# 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
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sub license, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the
|
||||
# next paragraph) shall be included in all copies or substantial portions
|
||||
# of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
# IN NO EVENT SHALL 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.
|
||||
#
|
||||
|
||||
|
||||
import sys
|
||||
import distutils.sysconfig
|
||||
import os.path
|
||||
|
||||
|
||||
def generate(env):
|
||||
# See http://www.scons.org/wiki/PythonExtensions
|
||||
|
||||
if sys.platform in ['win32']:
|
||||
python_root = sys.prefix
|
||||
python_version = '%u%u' % sys.version_info[:2]
|
||||
python_include = os.path.join(python_root, 'include')
|
||||
python_libs = os.path.join(python_root, 'libs')
|
||||
python_lib = os.path.join(python_libs, 'python' + python_version + '.lib')
|
||||
|
||||
env.Append(CPPPATH = [python_include])
|
||||
env.Append(LIBPATH = [python_libs])
|
||||
env.Append(LIBS = ['python' + python_version + '.lib'])
|
||||
env.Replace(SHLIBPREFIX = '')
|
||||
env.Replace(SHLIBSUFFIX = '.pyd')
|
||||
|
||||
# XXX; python25_d.lib is not included in Python for windows, and
|
||||
# we'll get missing symbols unless we undefine _DEBUG
|
||||
cppdefines = env['CPPDEFINES']
|
||||
cppdefines = [define for define in cppdefines if define != '_DEBUG']
|
||||
env.Replace(CPPDEFINES = cppdefines)
|
||||
env.AppendUnique(CPPFLAGS = ['/U_DEBUG'])
|
||||
env.AppendUnique(LINKFLAGS = ['/nodefaultlib:python25_d.lib'])
|
||||
else:
|
||||
#env.ParseConfig('python-config --cflags --ldflags --libs')
|
||||
env.AppendUnique(CPPPATH = [distutils.sysconfig.get_python_inc()])
|
||||
env.Replace(SHLIBPREFIX = '')
|
||||
env.Replace(SHLIBSUFFIX = distutils.sysconfig.get_config_vars()['SO'])
|
||||
|
||||
# for debugging
|
||||
#print env.Dump()
|
||||
|
||||
|
||||
def exists(env):
|
||||
return 1
|
44
scons/udis86.py
Normal file
44
scons/udis86.py
Normal file
@@ -0,0 +1,44 @@
|
||||
"""udis86
|
||||
|
||||
Tool-specific initialization for udis86
|
||||
|
||||
"""
|
||||
|
||||
#
|
||||
# Copyright (c) 2009 VMware, Inc.
|
||||
#
|
||||
# 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 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.
|
||||
#
|
||||
|
||||
def generate(env):
|
||||
conf = env.Configure()
|
||||
|
||||
if conf.CheckHeader('udis86.h'): # and conf.CheckLib('udis86'):
|
||||
env['UDIS86'] = True
|
||||
env.Prepend(LIBS = ['udis86'])
|
||||
else:
|
||||
env['UDIS86'] = False
|
||||
|
||||
conf.Finish()
|
||||
|
||||
def exists(env):
|
||||
return True
|
||||
|
||||
# vim:set ts=4 sw=4 et:
|
96
src/Android.mk
Normal file
96
src/Android.mk
Normal file
@@ -0,0 +1,96 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# build classic static libraries
|
||||
MESA_BUILD_CLASSIC := false
|
||||
|
||||
# build gallium static libraries
|
||||
MESA_BUILD_GALLIUM := false
|
||||
|
||||
# build gralloc.i915
|
||||
MESA_BUILD_I915 := false
|
||||
|
||||
# build libGLES_i915c
|
||||
MESA_BUILD_I915C := false
|
||||
|
||||
# build libGLES_swrast
|
||||
MESA_BUILD_SWRAST := false
|
||||
|
||||
# build gralloc.vmwgfx
|
||||
MESA_BUILD_VMWGFX := false
|
||||
|
||||
# build libGLES_i915g
|
||||
MESA_BUILD_I915G := false
|
||||
|
||||
# for testing purpose
|
||||
#BOARD_USES_I915C := true
|
||||
#BOARD_USES_I915G := true
|
||||
#BOARD_USES_I965C := true
|
||||
#BOARD_USES_VMWGFX := true
|
||||
|
||||
MESA_GRALLOC_NAME :=
|
||||
MESA_GLES_NAME :=
|
||||
|
||||
ifeq ($(strip $(BOARD_USES_I915C)),true)
|
||||
MESA_BUILD_CLASSIC := true
|
||||
MESA_BUILD_I915 := true
|
||||
MESA_BUILD_I915C := true
|
||||
|
||||
MESA_GRALLOC_NAME := i915
|
||||
MESA_GLES_NAME := i915c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BOARD_USES_I915G)),true)
|
||||
MESA_BUILD_GALLIUM := true
|
||||
MESA_BUILD_I915 := true
|
||||
MESA_BUILD_I915G := true
|
||||
|
||||
MESA_GRALLOC_NAME := i915
|
||||
MESA_GLES_NAME := i915g
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BOARD_USES_I965C)),true)
|
||||
MESA_BUILD_CLASSIC := true
|
||||
MESA_BUILD_I915 := true
|
||||
MESA_BUILD_I965C := true
|
||||
|
||||
MESA_GRALLOC_NAME := i915
|
||||
MESA_GLES_NAME := i965c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BOARD_USES_VMWGFX)),true)
|
||||
MESA_BUILD_GALLIUM := true
|
||||
MESA_BUILD_SWRAST := true
|
||||
MESA_BUILD_VMWGFX := true
|
||||
|
||||
MESA_GRALLOC_NAME := vmwgfx
|
||||
MESA_GLES_NAME := swrast
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(MESA_GRALLOC_NAME) $(MESA_GLES_NAME)),)
|
||||
|
||||
# build the real modules
|
||||
include $(call all-subdir-makefiles)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
symlink := $(TARGET_OUT_SHARED_LIBRARIES)/hw/gralloc.$(TARGET_PRODUCT)$(TARGET_SHLIB_SUFFIX)
|
||||
symlink_to := gralloc.$(MESA_GRALLOC_NAME)$(TARGET_SHLIB_SUFFIX)
|
||||
$(symlink): PRIVATE_TO := $(symlink_to)
|
||||
$(symlink): $(TARGET_OUT_SHARED_LIBRARIES)/hw/$(symlink_to)
|
||||
@echo "Symlink: $@ -> $(PRIVATE_TO)"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf $(PRIVATE_TO) $@
|
||||
ALL_PREBUILT += $(symlink)
|
||||
|
||||
symlink := $(TARGET_OUT_SHARED_LIBRARIES)/egl/libGLES_mesa$(TARGET_SHLIB_SUFFIX)
|
||||
symlink_to := libGLES_$(MESA_GLES_NAME)$(TARGET_SHLIB_SUFFIX)
|
||||
$(symlink): PRIVATE_TO := $(symlink_to)
|
||||
$(symlink): $(TARGET_OUT_SHARED_LIBRARIES)/egl/$(symlink_to)
|
||||
@echo "Symlink: $@ -> $(PRIVATE_TO)"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf $(PRIVATE_TO) $@
|
||||
ALL_PREBUILT += $(symlink)
|
||||
|
||||
endif # MESA_GRALLOC_NAME || MESA_GLES_NAME
|
@@ -1,32 +1,17 @@
|
||||
Import('*')
|
||||
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
SConscript('getopt/SConscript')
|
||||
|
||||
SConscript('glsl/SConscript')
|
||||
|
||||
if env['hostonly']:
|
||||
# We are just compiling the things necessary on the host for cross
|
||||
# compilation
|
||||
Return()
|
||||
|
||||
|
||||
# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
|
||||
# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
|
||||
# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
|
||||
# enable OpenGL ES support.
|
||||
SConscript('mapi/glapi/SConscript')
|
||||
SConscript('mesa/SConscript')
|
||||
|
||||
SConscript('mapi/vgapi/SConscript')
|
||||
|
||||
if env['platform'] != 'embedded':
|
||||
if env['platform'] == 'windows':
|
||||
SConscript('egl/main/SConscript')
|
||||
SConscript('glut/glx/SConscript')
|
||||
SConscript('talloc/SConscript')
|
||||
|
||||
if env['gles']:
|
||||
SConscript('mapi/shared-glapi/SConscript')
|
||||
SConscript('glsl/SConscript')
|
||||
SConscript('mapi/glapi/SConscript')
|
||||
SConscript('mesa/SConscript')
|
||||
|
||||
if env['platform'] != 'embedded':
|
||||
SConscript('glut/glx/SConscript')
|
||||
|
||||
SConscript('gallium/SConscript')
|
||||
|
||||
|
68
src/egl/Android.mk
Normal file
68
src/egl/Android.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# from main/Makefile
|
||||
SOURCES = \
|
||||
eglapi.c \
|
||||
eglarray.c \
|
||||
eglconfig.c \
|
||||
eglcontext.c \
|
||||
eglcurrent.c \
|
||||
egldisplay.c \
|
||||
egldriver.c \
|
||||
eglfallbacks.c \
|
||||
eglglobals.c \
|
||||
eglimage.c \
|
||||
egllog.c \
|
||||
eglmisc.c \
|
||||
eglmode.c \
|
||||
eglscreen.c \
|
||||
eglstring.c \
|
||||
eglsurface.c \
|
||||
eglsync.c
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(addprefix main/, $(SOURCES))
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
-DPTHREADS \
|
||||
-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_ANDROID \
|
||||
-D_EGL_DRIVER_SEARCH_DIR=\"/system/lib/egl\" \
|
||||
-fvisibility=hidden \
|
||||
-Wno-sign-compare
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
external/mesa/include
|
||||
|
||||
LOCAL_MODULE := libmesa_egl
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
drivers/android/egl_android.c \
|
||||
drivers/android/droid.c \
|
||||
drivers/android/droid_core.c \
|
||||
drivers/android/droid_image.c
|
||||
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
-DPTHREADS \
|
||||
-fvisibility=hidden \
|
||||
-Wno-sign-compare
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
external/mesa/include \
|
||||
external/mesa/src/mapi \
|
||||
external/mesa/src/egl/main \
|
||||
external/mesa/src/gralloc \
|
||||
external/drm \
|
||||
external/drm/include/drm
|
||||
|
||||
LOCAL_MODULE := libmesa_classic_egl
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
endif # MESA_BUILD_CLASSIC
|
@@ -3,13 +3,8 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
SUBDIRS =
|
||||
SUBDIRS = main drivers
|
||||
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
SUBDIRS += wayland
|
||||
endif
|
||||
|
||||
SUBDIRS += drivers main
|
||||
|
||||
default: subdirs
|
||||
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#
|
||||
# Drivers should define
|
||||
#
|
||||
# EGL_BUILTIN, the driver is built-in or external
|
||||
# EGL_DRIVER, the driver name
|
||||
# EGL_SOURCES, the driver sources
|
||||
# EGL_INCLUDES, the include pathes
|
||||
@@ -13,45 +12,32 @@
|
||||
#
|
||||
|
||||
|
||||
EGL_DRIVER_PATH = $(TOP)/$(LIB_DIR)/egl/$(EGL_DRIVER).so
|
||||
EGL_DRIVER_PATH = $(TOP)/$(LIB_DIR)/egl/$(EGL_DRIVER)
|
||||
EGL_OBJECTS = $(EGL_SOURCES:.c=.o)
|
||||
|
||||
# built-in or external
|
||||
ifeq ($(EGL_BUILTIN),true)
|
||||
EGL_TARGET = lib$(EGL_DRIVER).a
|
||||
EGL_INSTALL =
|
||||
else
|
||||
EGL_TARGET = $(EGL_DRIVER_PATH)
|
||||
EGL_INSTALL = install-so
|
||||
endif
|
||||
|
||||
default: depend $(EGL_TARGET)
|
||||
default: depend $(EGL_DRIVER_PATH)
|
||||
|
||||
$(EGL_DRIVER_PATH): $(EGL_DRIVER).so
|
||||
$(EGL_DRIVER_PATH): $(EGL_DRIVER)
|
||||
@$(INSTALL) -d $(TOP)/$(LIB_DIR)/egl
|
||||
$(INSTALL) $< $(TOP)/$(LIB_DIR)/egl
|
||||
|
||||
$(EGL_DRIVER).so: $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
|
||||
@$(MKLIB) -o $(EGL_DRIVER).so -noprefix \
|
||||
$(EGL_DRIVER): $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
|
||||
@$(MKLIB) -o $(EGL_DRIVER) -noprefix \
|
||||
-linker '$(CC)' -ldflags '-L$(TOP)/$(LIB_DIR) $(LDFLAGS)' \
|
||||
$(MKLIB_OPTIONS) \
|
||||
$(EGL_OBJECTS) $(EGL_LIBS) -l$(EGL_LIB)
|
||||
|
||||
lib$(EGL_DRIVER).a: $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
|
||||
@$(MKLIB) -o $(EGL_DRIVER) -static $(EGL_OBJECTS)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(EGL_INCLUDES) $(CFLAGS) $(EGL_CFLAGS) $< -o $@
|
||||
|
||||
install-so: $(EGL_DRIVER_PATH)
|
||||
|
||||
install: $(EGL_DRIVER_PATH)
|
||||
$(INSTALL) -d $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR)
|
||||
$(MINSTALL) $(EGL_DRIVER_PATH) $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR)
|
||||
|
||||
install: $(EGL_INSTALL)
|
||||
|
||||
clean:
|
||||
rm -f $(EGL_DRIVER).so
|
||||
rm -f lib$(EGL_DRIVER).a
|
||||
rm -f $(EGL_DRIVER)
|
||||
rm -f $(EGL_OBJECTS)
|
||||
rm -f depend depend.bak
|
||||
|
||||
|
649
src/egl/drivers/android/droid.c
Normal file
649
src/egl/drivers/android/droid.c
Normal file
@@ -0,0 +1,649 @@
|
||||
/*
|
||||
* Copyright © 2010 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>
|
||||
*/
|
||||
|
||||
#define LOG_TAG "MESA-EGL"
|
||||
|
||||
#include <cutils/log.h>
|
||||
|
||||
#include "glapi/glapi.h"
|
||||
#include "droid.h"
|
||||
|
||||
static const __DRIuseInvalidateExtension use_invalidate = {
|
||||
{ __DRI_USE_INVALIDATE, 1 }
|
||||
};
|
||||
|
||||
static __DRIimage *
|
||||
droid_lookup_egl_image(__DRIscreen *screen, void *image, void *data)
|
||||
{
|
||||
_EGLDisplay *disp = data;
|
||||
struct droid_egl_image *dimg;
|
||||
_EGLImage *img;
|
||||
|
||||
(void) screen;
|
||||
|
||||
img = _eglLookupImage(image, disp);
|
||||
if (img == NULL) {
|
||||
_eglError(EGL_BAD_PARAMETER, "droid_lookup_egl_image");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dimg = droid_egl_image(image);
|
||||
|
||||
return dimg->dri_image;
|
||||
}
|
||||
|
||||
static const __DRIimageLookupExtension image_lookup_extension = {
|
||||
{ __DRI_IMAGE_LOOKUP, 1 },
|
||||
droid_lookup_egl_image
|
||||
};
|
||||
|
||||
static int
|
||||
get_format_bpp(int native)
|
||||
{
|
||||
int bpp;
|
||||
|
||||
/* see libpixelflinger/format.cpp */
|
||||
switch (native) {
|
||||
case GGL_PIXEL_FORMAT_RGBA_8888:
|
||||
case GGL_PIXEL_FORMAT_RGBX_8888:
|
||||
case GGL_PIXEL_FORMAT_BGRA_8888:
|
||||
bpp = 4;
|
||||
break;
|
||||
case GGL_PIXEL_FORMAT_RGB_888:
|
||||
bpp = 3;
|
||||
break;
|
||||
case GGL_PIXEL_FORMAT_RGB_565:
|
||||
case GGL_PIXEL_FORMAT_RGBA_5551:
|
||||
case GGL_PIXEL_FORMAT_RGBA_4444:
|
||||
case GGL_PIXEL_FORMAT_LA_88:
|
||||
bpp = 2;
|
||||
break;
|
||||
case GGL_PIXEL_FORMAT_RGB_332:
|
||||
case GGL_PIXEL_FORMAT_A_8:
|
||||
case GGL_PIXEL_FORMAT_L_8:
|
||||
bpp = 1;
|
||||
break;
|
||||
default:
|
||||
bpp = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return bpp;
|
||||
}
|
||||
|
||||
#include <gralloc_gem.h>
|
||||
int
|
||||
get_native_buffer_name(struct android_native_buffer_t *buf)
|
||||
{
|
||||
struct drm_bo_t *bo;
|
||||
|
||||
bo = drm_gem_get(buf->handle);
|
||||
|
||||
return (bo) ? bo->name : 0;
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
droid_dequeue_buffer(struct droid_egl_surface *dsurf)
|
||||
{
|
||||
__DRIbuffer *buf = &dsurf->dri_buffer;
|
||||
|
||||
if (dsurf->window->dequeueBuffer(dsurf->window, &dsurf->buffer))
|
||||
return EGL_FALSE;
|
||||
|
||||
dsurf->buffer->common.incRef(&dsurf->buffer->common);
|
||||
dsurf->window->lockBuffer(dsurf->window, dsurf->buffer);
|
||||
|
||||
buf->attachment = __DRI_BUFFER_FAKE_FRONT_LEFT;
|
||||
buf->name = get_native_buffer_name(dsurf->buffer);
|
||||
buf->cpp = get_format_bpp(dsurf->buffer->format);
|
||||
buf->pitch = dsurf->buffer->stride * buf->cpp;
|
||||
buf->flags = 0;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
droid_enqueue_buffer(struct droid_egl_surface *dsurf)
|
||||
{
|
||||
dsurf->window->queueBuffer(dsurf->window, dsurf->buffer);
|
||||
|
||||
dsurf->buffer->common.decRef(&dsurf->buffer->common);
|
||||
dsurf->buffer = NULL;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
droid_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
static __DRIbuffer *
|
||||
droid_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
int *width, int *height,
|
||||
unsigned int *attachments, int count,
|
||||
int *out_count, void *loaderPrivate)
|
||||
{
|
||||
struct droid_egl_surface *dsurf = loaderPrivate;
|
||||
struct droid_egl_display *ddpy =
|
||||
droid_egl_display(dsurf->base.Resource.Display);
|
||||
|
||||
if (!dsurf->buffer) {
|
||||
if (!droid_dequeue_buffer(dsurf))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (width)
|
||||
*width = dsurf->buffer->width;
|
||||
if (height)
|
||||
*height = dsurf->buffer->height;
|
||||
|
||||
*out_count = 1;
|
||||
|
||||
return &dsurf->dri_buffer;
|
||||
}
|
||||
|
||||
static const EGLint droid_to_egl_attribute_map[] = {
|
||||
0,
|
||||
EGL_BUFFER_SIZE, /* __DRI_ATTRIB_BUFFER_SIZE */
|
||||
EGL_LEVEL, /* __DRI_ATTRIB_LEVEL */
|
||||
EGL_RED_SIZE, /* __DRI_ATTRIB_RED_SIZE */
|
||||
EGL_GREEN_SIZE, /* __DRI_ATTRIB_GREEN_SIZE */
|
||||
EGL_BLUE_SIZE, /* __DRI_ATTRIB_BLUE_SIZE */
|
||||
EGL_LUMINANCE_SIZE, /* __DRI_ATTRIB_LUMINANCE_SIZE */
|
||||
EGL_ALPHA_SIZE, /* __DRI_ATTRIB_ALPHA_SIZE */
|
||||
0, /* __DRI_ATTRIB_ALPHA_MASK_SIZE */
|
||||
EGL_DEPTH_SIZE, /* __DRI_ATTRIB_DEPTH_SIZE */
|
||||
EGL_STENCIL_SIZE, /* __DRI_ATTRIB_STENCIL_SIZE */
|
||||
0, /* __DRI_ATTRIB_ACCUM_RED_SIZE */
|
||||
0, /* __DRI_ATTRIB_ACCUM_GREEN_SIZE */
|
||||
0, /* __DRI_ATTRIB_ACCUM_BLUE_SIZE */
|
||||
0, /* __DRI_ATTRIB_ACCUM_ALPHA_SIZE */
|
||||
EGL_SAMPLE_BUFFERS, /* __DRI_ATTRIB_SAMPLE_BUFFERS */
|
||||
EGL_SAMPLES, /* __DRI_ATTRIB_SAMPLES */
|
||||
0, /* __DRI_ATTRIB_RENDER_TYPE, */
|
||||
0, /* __DRI_ATTRIB_CONFIG_CAVEAT */
|
||||
0, /* __DRI_ATTRIB_CONFORMANT */
|
||||
0, /* __DRI_ATTRIB_DOUBLE_BUFFER */
|
||||
0, /* __DRI_ATTRIB_STEREO */
|
||||
0, /* __DRI_ATTRIB_AUX_BUFFERS */
|
||||
0, /* __DRI_ATTRIB_TRANSPARENT_TYPE */
|
||||
0, /* __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE */
|
||||
0, /* __DRI_ATTRIB_TRANSPARENT_RED_VALUE */
|
||||
0, /* __DRI_ATTRIB_TRANSPARENT_GREEN_VALUE */
|
||||
0, /* __DRI_ATTRIB_TRANSPARENT_BLUE_VALUE */
|
||||
0, /* __DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE */
|
||||
0, /* __DRI_ATTRIB_FLOAT_MODE */
|
||||
0, /* __DRI_ATTRIB_RED_MASK */
|
||||
0, /* __DRI_ATTRIB_GREEN_MASK */
|
||||
0, /* __DRI_ATTRIB_BLUE_MASK */
|
||||
0, /* __DRI_ATTRIB_ALPHA_MASK */
|
||||
EGL_MAX_PBUFFER_WIDTH, /* __DRI_ATTRIB_MAX_PBUFFER_WIDTH */
|
||||
EGL_MAX_PBUFFER_HEIGHT, /* __DRI_ATTRIB_MAX_PBUFFER_HEIGHT */
|
||||
EGL_MAX_PBUFFER_PIXELS, /* __DRI_ATTRIB_MAX_PBUFFER_PIXELS */
|
||||
0, /* __DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH */
|
||||
0, /* __DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT */
|
||||
0, /* __DRI_ATTRIB_VISUAL_SELECT_GROUP */
|
||||
0, /* __DRI_ATTRIB_SWAP_METHOD */
|
||||
EGL_MAX_SWAP_INTERVAL, /* __DRI_ATTRIB_MAX_SWAP_INTERVAL */
|
||||
EGL_MIN_SWAP_INTERVAL, /* __DRI_ATTRIB_MIN_SWAP_INTERVAL */
|
||||
0, /* __DRI_ATTRIB_BIND_TO_TEXTURE_RGB */
|
||||
0, /* __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA */
|
||||
0, /* __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE */
|
||||
0, /* __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS */
|
||||
EGL_Y_INVERTED_NOK, /* __DRI_ATTRIB_YINVERTED */
|
||||
};
|
||||
|
||||
static struct droid_egl_config *
|
||||
droid_add_config(_EGLDisplay *dpy, const __DRIconfig *dri_config, int id,
|
||||
int depth, EGLint surface_type, int rgba_masks[4])
|
||||
{
|
||||
struct droid_egl_config *conf;
|
||||
struct droid_egl_display *ddpy;
|
||||
_EGLConfig base;
|
||||
unsigned int attrib, value, double_buffer;
|
||||
EGLint key, bind_to_texture_rgb, bind_to_texture_rgba;
|
||||
int dri_masks[4] = { 0, 0, 0, 0 };
|
||||
int i;
|
||||
|
||||
ddpy = dpy->DriverData;
|
||||
_eglInitConfig(&base, dpy, id);
|
||||
|
||||
i = 0;
|
||||
double_buffer = 0;
|
||||
bind_to_texture_rgb = 0;
|
||||
bind_to_texture_rgba = 0;
|
||||
|
||||
while (ddpy->core->indexConfigAttrib(dri_config, i++, &attrib, &value)) {
|
||||
switch (attrib) {
|
||||
case __DRI_ATTRIB_RENDER_TYPE:
|
||||
if (value & __DRI_ATTRIB_RGBA_BIT)
|
||||
value = EGL_RGB_BUFFER;
|
||||
else if (value & __DRI_ATTRIB_LUMINANCE_BIT)
|
||||
value = EGL_LUMINANCE_BUFFER;
|
||||
else
|
||||
assert(0);
|
||||
_eglSetConfigKey(&base, EGL_COLOR_BUFFER_TYPE, value);
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_CONFIG_CAVEAT:
|
||||
if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG)
|
||||
value = EGL_NON_CONFORMANT_CONFIG;
|
||||
else if (value & __DRI_ATTRIB_SLOW_BIT)
|
||||
value = EGL_SLOW_CONFIG;
|
||||
else
|
||||
value = EGL_NONE;
|
||||
_eglSetConfigKey(&base, EGL_CONFIG_CAVEAT, value);
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_BIND_TO_TEXTURE_RGB:
|
||||
bind_to_texture_rgb = value;
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA:
|
||||
bind_to_texture_rgba = value;
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_DOUBLE_BUFFER:
|
||||
double_buffer = value;
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_RED_MASK:
|
||||
dri_masks[0] = value;
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_GREEN_MASK:
|
||||
dri_masks[1] = value;
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_BLUE_MASK:
|
||||
dri_masks[2] = value;
|
||||
break;
|
||||
|
||||
case __DRI_ATTRIB_ALPHA_MASK:
|
||||
dri_masks[3] = value;
|
||||
break;
|
||||
|
||||
default:
|
||||
key = droid_to_egl_attribute_map[attrib];
|
||||
if (key != 0)
|
||||
_eglSetConfigKey(&base, key, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* In EGL, double buffer or not isn't a config attribute. Pixmaps
|
||||
* surfaces are always single buffered, pbuffer surfaces are always
|
||||
* back buffers and windows can be either, selected by passing an
|
||||
* attribute at window surface construction time. To support this
|
||||
* we ignore all double buffer configs and manipulate the buffer we
|
||||
* return in the getBuffer callback to get the behaviour we want. */
|
||||
|
||||
if (double_buffer)
|
||||
return NULL;
|
||||
|
||||
if (depth > 0 && depth != _eglGetConfigKey(&base, EGL_BUFFER_SIZE))
|
||||
return NULL;
|
||||
|
||||
if (memcmp(dri_masks, rgba_masks, sizeof(rgba_masks)))
|
||||
return NULL;
|
||||
|
||||
_eglSetConfigKey(&base, EGL_NATIVE_RENDERABLE, EGL_TRUE);
|
||||
|
||||
_eglSetConfigKey(&base, EGL_SURFACE_TYPE, surface_type);
|
||||
if (surface_type & (EGL_PIXMAP_BIT | EGL_PBUFFER_BIT)) {
|
||||
_eglSetConfigKey(&base, EGL_BIND_TO_TEXTURE_RGB, bind_to_texture_rgb);
|
||||
if (_eglGetConfigKey(&base, EGL_ALPHA_SIZE) > 0)
|
||||
_eglSetConfigKey(&base,
|
||||
EGL_BIND_TO_TEXTURE_RGBA, bind_to_texture_rgba);
|
||||
}
|
||||
|
||||
_eglSetConfigKey(&base, EGL_RENDERABLE_TYPE, dpy->ClientAPIsMask);
|
||||
_eglSetConfigKey(&base, EGL_CONFORMANT, dpy->ClientAPIsMask);
|
||||
|
||||
if (!_eglValidateConfig(&base, EGL_FALSE)) {
|
||||
_eglLog(_EGL_DEBUG, "DRI2: failed to validate config %d", id);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
conf = calloc(1, sizeof(*conf));
|
||||
if (conf != NULL) {
|
||||
memcpy(&conf->base, &base, sizeof(base));
|
||||
conf->dri_config = dri_config;
|
||||
_eglLinkConfig(&conf->base);
|
||||
}
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
{
|
||||
struct droid_egl_display *ddpy = droid_egl_display(dpy);
|
||||
const struct {
|
||||
int format;
|
||||
int size;
|
||||
int rgba_masks[4];
|
||||
} visuals[] = {
|
||||
{ GGL_PIXEL_FORMAT_RGBA_8888, 32, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
|
||||
{ GGL_PIXEL_FORMAT_RGBX_8888, 32, { 0xff, 0xff00, 0xff0000, 0x0 } },
|
||||
{ GGL_PIXEL_FORMAT_RGB_888, 24, { 0xff, 0xff00, 0xff0000, 0x0 } },
|
||||
{ GGL_PIXEL_FORMAT_RGB_565, 16, { 0xf800, 0x7e0, 0x1f, 0x0 } },
|
||||
{ GGL_PIXEL_FORMAT_BGRA_8888, 32, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
|
||||
{ GGL_PIXEL_FORMAT_A_8, 8, { 0xf800, 0x7e0, 0x1f, 0x0 } },
|
||||
{ 0, 0, { 0, 0, 0, 0 } }
|
||||
};
|
||||
int count, i, j;
|
||||
|
||||
count = 0;
|
||||
for (i = 0; visuals[i].format; i++) {
|
||||
int format_count = 0;
|
||||
|
||||
for (j = 0; ddpy->dri_configs[j]; j++) {
|
||||
struct droid_egl_config *dconf;
|
||||
|
||||
dconf = droid_add_config(dpy, ddpy->dri_configs[j], count + 1,
|
||||
visuals[i].size, EGL_WINDOW_BIT, visuals[i].rgba_masks);
|
||||
if (dconf) {
|
||||
_eglSetConfigKey(&dconf->base,
|
||||
EGL_NATIVE_VISUAL_TYPE, visuals[i].format);
|
||||
count++;
|
||||
format_count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!format_count) {
|
||||
_eglLog(_EGL_DEBUG, "No DRI config supports native format 0x%x",
|
||||
visuals[i].format);
|
||||
}
|
||||
}
|
||||
|
||||
return (count != 0);
|
||||
}
|
||||
|
||||
struct droid_extension_match {
|
||||
const char *name;
|
||||
int version;
|
||||
int offset;
|
||||
};
|
||||
|
||||
static struct droid_extension_match droid_driver_extensions[] = {
|
||||
{ __DRI_CORE, 1, offsetof(struct droid_egl_display, core) },
|
||||
{ __DRI_DRI2, 1, offsetof(struct droid_egl_display, dri2) },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
static struct droid_extension_match droid_core_extensions[] = {
|
||||
{ __DRI2_FLUSH, 1, offsetof(struct droid_egl_display, flush) },
|
||||
{ __DRI_IMAGE, 1, offsetof(struct droid_egl_display, image) },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
extern const __DRIextension *__driDriverExtensions[];
|
||||
|
||||
static EGLBoolean
|
||||
droid_bind_extensions(struct droid_egl_display *ddpy,
|
||||
struct droid_extension_match *matches,
|
||||
const __DRIextension **extensions)
|
||||
{
|
||||
int i, j, ret = EGL_TRUE;
|
||||
void *field;
|
||||
|
||||
for (i = 0; extensions[i]; i++) {
|
||||
_eglLog(_EGL_DEBUG, "DRI2: found extension `%s'", extensions[i]->name);
|
||||
for (j = 0; matches[j].name; j++) {
|
||||
if (strcmp(extensions[i]->name, matches[j].name) == 0 &&
|
||||
extensions[i]->version >= matches[j].version) {
|
||||
field = ((char *) ddpy + matches[j].offset);
|
||||
*(const __DRIextension **) field = extensions[i];
|
||||
_eglLog(_EGL_INFO, "DRI2: found extension %s version %d",
|
||||
extensions[i]->name, extensions[i]->version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; matches[j].name; j++) {
|
||||
field = ((char *) ddpy + matches[j].offset);
|
||||
if (*(const __DRIextension **) field == NULL) {
|
||||
_eglLog(_EGL_FATAL, "DRI2: did not find extension %s version %d",
|
||||
matches[j].name, matches[j].version);
|
||||
ret = EGL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_create_screen(_EGLDisplay *dpy)
|
||||
{
|
||||
struct droid_egl_display *ddpy = droid_egl_display(dpy);
|
||||
const __DRIextension **extensions;
|
||||
unsigned int api_mask;
|
||||
|
||||
ddpy->dri_screen =
|
||||
ddpy->dri2->createNewScreen(0, ddpy->fd, ddpy->extensions,
|
||||
&ddpy->dri_configs, dpy);
|
||||
if (ddpy->dri_screen == NULL) {
|
||||
_eglLog(_EGL_WARNING, "failed to create dri screen");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
extensions = ddpy->core->getExtensions(ddpy->dri_screen);
|
||||
if (!droid_bind_extensions(ddpy, droid_core_extensions, extensions)) {
|
||||
ddpy->core->destroyScreen(ddpy->dri_screen);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (ddpy->dri2->base.version >= 2)
|
||||
api_mask = ddpy->dri2->getAPIMask(ddpy->dri_screen);
|
||||
else
|
||||
api_mask = __DRI_API_OPENGL;
|
||||
|
||||
dpy->ClientAPIsMask = 0;
|
||||
if (api_mask & (1 <<__DRI_API_OPENGL))
|
||||
dpy->ClientAPIsMask |= EGL_OPENGL_BIT;
|
||||
if (api_mask & (1 <<__DRI_API_GLES))
|
||||
dpy->ClientAPIsMask |= EGL_OPENGL_ES_BIT;
|
||||
if (api_mask & (1 << __DRI_API_GLES2))
|
||||
dpy->ClientAPIsMask |= EGL_OPENGL_ES2_BIT;
|
||||
|
||||
if (ddpy->dri2->base.version >= 2) {
|
||||
dpy->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
|
||||
dpy->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
|
||||
dpy->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_load_driver(_EGLDisplay *disp)
|
||||
{
|
||||
struct droid_egl_display *ddpy = disp->DriverData;
|
||||
const __DRIextension **extensions;
|
||||
|
||||
extensions = __driDriverExtensions;
|
||||
|
||||
if (!droid_bind_extensions(ddpy, droid_driver_extensions, extensions))
|
||||
return EGL_FALSE;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy,
|
||||
EGLint *major, EGLint *minor)
|
||||
{
|
||||
struct droid_egl_display *ddpy;
|
||||
int fd = -1, err, i;
|
||||
const hw_module_t *mod;
|
||||
|
||||
err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &mod);
|
||||
if (!err) {
|
||||
const gralloc_module_t *gr = (gralloc_module_t *) mod;
|
||||
|
||||
err = -EINVAL;
|
||||
if (gr->perform)
|
||||
err = gr->perform(gr, GRALLOC_MODULE_PERFORM_GET_DRM_FD, &fd);
|
||||
}
|
||||
if (err || fd < 0) {
|
||||
_eglLog(_EGL_WARNING, "fail to get drm fd");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
ddpy = calloc(1, sizeof(*ddpy));
|
||||
if (!ddpy)
|
||||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dpy->DriverData = (void *) ddpy;
|
||||
|
||||
ddpy->fd = fd;
|
||||
if (!droid_load_driver(dpy))
|
||||
return EGL_FALSE;
|
||||
|
||||
ddpy->loader_extension.base.name = __DRI_DRI2_LOADER;
|
||||
ddpy->loader_extension.base.version = 3;
|
||||
ddpy->loader_extension.getBuffers = NULL;
|
||||
ddpy->loader_extension.flushFrontBuffer = droid_flush_front_buffer;
|
||||
ddpy->loader_extension.getBuffersWithFormat =
|
||||
droid_get_buffers_with_format;
|
||||
|
||||
ddpy->extensions[0] = &ddpy->loader_extension.base;
|
||||
ddpy->extensions[1] = &image_lookup_extension.base;
|
||||
ddpy->extensions[2] = &use_invalidate.base;
|
||||
ddpy->extensions[3] = NULL;
|
||||
|
||||
if (!droid_create_screen(dpy)) {
|
||||
free(ddpy);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (!droid_add_configs_for_visuals(drv, dpy)) {
|
||||
ddpy->core->destroyScreen(ddpy->dri_screen);
|
||||
free(ddpy);
|
||||
}
|
||||
|
||||
dpy->Extensions.ANDROID_image_native_buffer = EGL_TRUE;
|
||||
dpy->Extensions.KHR_image_base = EGL_TRUE;
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
*major = 1;
|
||||
*minor = 4;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_terminate(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
{
|
||||
struct droid_egl_display *ddpy = droid_egl_display(dpy);
|
||||
|
||||
_eglReleaseDisplayResources(drv, dpy);
|
||||
_eglCleanupDisplay(dpy);
|
||||
|
||||
ddpy->core->destroyScreen(ddpy->dri_screen);
|
||||
free(ddpy);
|
||||
dpy->DriverData = NULL;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
|
||||
EGLint *major, EGLint *minor)
|
||||
{
|
||||
switch (dpy->Platform) {
|
||||
case _EGL_PLATFORM_ANDROID:
|
||||
return droid_initialize_android(drv, dpy, major, minor);
|
||||
default:
|
||||
return EGL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static _EGLProc
|
||||
droid_get_proc_address(_EGLDriver *drv, const char *procname)
|
||||
{
|
||||
return (_EGLProc) _glapi_get_proc_address(procname);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
droid_unload(_EGLDriver *drv)
|
||||
{
|
||||
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
|
||||
|
||||
free(ddrv);
|
||||
}
|
||||
|
||||
static void
|
||||
droid_log(EGLint level, const char *msg)
|
||||
{
|
||||
switch (level) {
|
||||
case _EGL_DEBUG:
|
||||
LOGD(msg);
|
||||
break;
|
||||
case _EGL_INFO:
|
||||
LOGI(msg);
|
||||
break;
|
||||
case _EGL_WARNING:
|
||||
LOGW(msg);
|
||||
break;
|
||||
case _EGL_FATAL:
|
||||
LOG_FATAL(msg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_EGLDriver *
|
||||
droid_create_driver(void)
|
||||
{
|
||||
struct droid_egl_driver *ddrv;
|
||||
|
||||
ddrv = calloc(1, sizeof(*ddrv));
|
||||
if (!ddrv)
|
||||
return NULL;
|
||||
|
||||
_eglSetLogProc(droid_log);
|
||||
|
||||
ddrv->base.Name = "Droid";
|
||||
ddrv->base.Unload = droid_unload;
|
||||
|
||||
_eglInitDriverFallbacks(&ddrv->base);
|
||||
ddrv->base.API.Initialize = droid_initialize;
|
||||
ddrv->base.API.Terminate = droid_terminate;
|
||||
ddrv->base.API.GetProcAddress = droid_get_proc_address;
|
||||
|
||||
ddrv->glFlush =
|
||||
(void (*)(void)) droid_get_proc_address(&ddrv->base, "glFlush");
|
||||
ddrv->glFinish =
|
||||
(void (*)(void)) droid_get_proc_address(&ddrv->base, "glFinish");
|
||||
|
||||
return &ddrv->base;
|
||||
}
|
126
src/egl/drivers/android/droid.h
Normal file
126
src/egl/drivers/android/droid.h
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Copyright © 2010 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>
|
||||
*/
|
||||
|
||||
#ifndef _DROID_H_
|
||||
#define _DROID_H_
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <ui/egl/android_natives.h>
|
||||
#include <ui/android_native_buffer.h>
|
||||
#include <pixelflinger/format.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/internal/dri_interface.h>
|
||||
|
||||
#include "egldriver.h"
|
||||
#include "egldisplay.h"
|
||||
#include "eglcontext.h"
|
||||
#include "eglsurface.h"
|
||||
#include "eglconfig.h"
|
||||
#include "eglimage.h"
|
||||
#include "eglcurrent.h"
|
||||
#include "egllog.h"
|
||||
|
||||
struct droid_egl_driver
|
||||
{
|
||||
_EGLDriver base;
|
||||
|
||||
void (*glFlush)(void);
|
||||
void (*glFinish)(void);
|
||||
};
|
||||
|
||||
struct droid_egl_display
|
||||
{
|
||||
int fd;
|
||||
|
||||
__DRIscreen *dri_screen;
|
||||
const __DRIconfig **dri_configs;
|
||||
__DRIcoreExtension *core;
|
||||
__DRIdri2Extension *dri2;
|
||||
__DRI2flushExtension *flush;
|
||||
__DRIimageExtension *image;
|
||||
|
||||
__DRIdri2LoaderExtension loader_extension;
|
||||
const __DRIextension *extensions[8];
|
||||
};
|
||||
|
||||
struct droid_egl_context
|
||||
{
|
||||
_EGLContext base;
|
||||
|
||||
__DRIcontext *dri_context;
|
||||
};
|
||||
|
||||
struct droid_egl_surface
|
||||
{
|
||||
_EGLSurface base;
|
||||
|
||||
__DRIdrawable *dri_drawable;
|
||||
__DRIbuffer dri_buffer;
|
||||
|
||||
android_native_window_t *window;
|
||||
android_native_buffer_t *buffer;
|
||||
};
|
||||
|
||||
struct droid_egl_config
|
||||
{
|
||||
_EGLConfig base;
|
||||
|
||||
const __DRIconfig *dri_config;
|
||||
};
|
||||
|
||||
struct droid_egl_image
|
||||
{
|
||||
_EGLImage base;
|
||||
|
||||
__DRIimage *dri_image;
|
||||
};
|
||||
|
||||
/* standard typecasts */
|
||||
_EGL_DRIVER_STANDARD_TYPECASTS(droid_egl)
|
||||
_EGL_DRIVER_TYPECAST(droid_egl_image, _EGLImage, obj)
|
||||
|
||||
_EGLDriver *
|
||||
droid_create_driver(void);
|
||||
|
||||
void
|
||||
droid_init_core_functions(_EGLDriver *drv);
|
||||
|
||||
void
|
||||
droid_init_image_functions(_EGLDriver *drv);
|
||||
|
||||
EGLBoolean
|
||||
droid_dequeue_buffer(struct droid_egl_surface *dsurf);
|
||||
|
||||
EGLBoolean
|
||||
droid_enqueue_buffer(struct droid_egl_surface *dsurf);
|
||||
|
||||
int
|
||||
get_native_buffer_name(struct android_native_buffer_t *buf);
|
||||
|
||||
#endif /* _DROID_H_ */
|
327
src/egl/drivers/android/droid_core.c
Normal file
327
src/egl/drivers/android/droid_core.c
Normal file
@@ -0,0 +1,327 @@
|
||||
/*
|
||||
* Copyright © 2010 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>
|
||||
*/
|
||||
|
||||
#include "droid.h"
|
||||
|
||||
static _EGLContext *
|
||||
droid_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
_EGLContext *share_list, const EGLint *attrib_list)
|
||||
{
|
||||
struct droid_egl_context *dctx;
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct droid_egl_context *dctx_shared = droid_egl_context(share_list);
|
||||
struct droid_egl_config *dconf = droid_egl_config(conf);
|
||||
const __DRIconfig *dri_config;
|
||||
int api;
|
||||
|
||||
(void) drv;
|
||||
|
||||
dctx = calloc(1, sizeof *dctx);
|
||||
if (!dctx) {
|
||||
_eglError(EGL_BAD_ALLOC, "eglCreateContext");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!_eglInitContext(&dctx->base, disp, conf, attrib_list))
|
||||
goto cleanup;
|
||||
|
||||
switch (dctx->base.ClientAPI) {
|
||||
case EGL_OPENGL_ES_API:
|
||||
switch (dctx->base.ClientVersion) {
|
||||
case 1:
|
||||
api = __DRI_API_GLES;
|
||||
break;
|
||||
case 2:
|
||||
api = __DRI_API_GLES2;
|
||||
break;
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "eglCreateContext");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case EGL_OPENGL_API:
|
||||
api = __DRI_API_OPENGL;
|
||||
break;
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "eglCreateContext");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (conf != NULL)
|
||||
dri_config = dconf->dri_config;
|
||||
else
|
||||
dri_config = NULL;
|
||||
|
||||
if (ddpy->dri2->base.version >= 2) {
|
||||
dctx->dri_context =
|
||||
ddpy->dri2->createNewContextForAPI(ddpy->dri_screen,
|
||||
api,
|
||||
dri_config,
|
||||
dctx_shared ?
|
||||
dctx_shared->dri_context : NULL,
|
||||
dctx);
|
||||
} else if (api == __DRI_API_OPENGL) {
|
||||
dctx->dri_context =
|
||||
ddpy->dri2->createNewContext(ddpy->dri_screen,
|
||||
dconf->dri_config,
|
||||
dctx_shared ?
|
||||
dctx_shared->dri_context : NULL,
|
||||
dctx);
|
||||
} else {
|
||||
/* fail */
|
||||
}
|
||||
|
||||
if (!dctx->dri_context)
|
||||
goto cleanup;
|
||||
|
||||
return &dctx->base;
|
||||
|
||||
cleanup:
|
||||
free(dctx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static _EGLSurface *
|
||||
droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
_EGLConfig *conf, EGLNativeWindowType window,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct droid_egl_config *dconf = droid_egl_config(conf);
|
||||
struct droid_egl_surface *dsurf;
|
||||
int format, vis_type;
|
||||
|
||||
(void) drv;
|
||||
|
||||
if (!window || window->common.magic != ANDROID_NATIVE_WINDOW_MAGIC) {
|
||||
_eglError(EGL_BAD_NATIVE_WINDOW, "droid_create_surface");
|
||||
return NULL;
|
||||
}
|
||||
if (window->query(window, NATIVE_WINDOW_FORMAT, &format)) {
|
||||
_eglError(EGL_BAD_NATIVE_WINDOW, "droid_create_surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
vis_type = _eglGetConfigKey(&dconf->base, EGL_NATIVE_VISUAL_TYPE);
|
||||
if (format != vis_type) {
|
||||
_eglLog(_EGL_WARNING, "Native format mismatch: 0x%x != 0x%x",
|
||||
format, vis_type);
|
||||
}
|
||||
|
||||
dsurf = calloc(1, sizeof *dsurf);
|
||||
if (!dsurf) {
|
||||
_eglError(EGL_BAD_ALLOC, "droid_create_surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!_eglInitSurface(&dsurf->base, disp, type, conf, attrib_list))
|
||||
goto cleanup_surf;
|
||||
|
||||
dsurf->dri_drawable =
|
||||
(*ddpy->dri2->createNewDrawable) (ddpy->dri_screen,
|
||||
dconf->dri_config, dsurf);
|
||||
if (dsurf->dri_drawable == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
|
||||
goto cleanup_pixmap;
|
||||
}
|
||||
|
||||
window->common.incRef(&window->common);
|
||||
window->query(window, NATIVE_WINDOW_WIDTH, &dsurf->base.Width);
|
||||
window->query(window, NATIVE_WINDOW_HEIGHT, &dsurf->base.Height);
|
||||
|
||||
dsurf->window = window;
|
||||
|
||||
return &dsurf->base;
|
||||
|
||||
cleanup_dri_drawable:
|
||||
ddpy->core->destroyDrawable(dsurf->dri_drawable);
|
||||
cleanup_pixmap:
|
||||
cleanup_surf:
|
||||
free(dsurf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static _EGLSurface *
|
||||
droid_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativeWindowType window,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
return droid_create_surface(drv, disp, EGL_WINDOW_BIT, conf,
|
||||
window, attrib_list);
|
||||
}
|
||||
|
||||
static _EGLSurface *
|
||||
droid_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativePixmapType pixmap,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static _EGLSurface *
|
||||
droid_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, const EGLint *attrib_list)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
{
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct droid_egl_surface *dsurf = droid_egl_surface(surf);
|
||||
|
||||
(void) drv;
|
||||
|
||||
if (!_eglPutSurface(surf))
|
||||
return EGL_TRUE;
|
||||
|
||||
(*ddpy->core->destroyDrawable)(dsurf->dri_drawable);
|
||||
|
||||
droid_enqueue_buffer(dsurf);
|
||||
dsurf->window->common.decRef(&dsurf->window->common);
|
||||
|
||||
free(surf);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
|
||||
_EGLSurface *rsurf, _EGLContext *ctx)
|
||||
{
|
||||
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct droid_egl_surface *droid_dsurf = droid_egl_surface(dsurf);
|
||||
struct droid_egl_surface *droid_rsurf = droid_egl_surface(rsurf);
|
||||
struct droid_egl_context *dctx = droid_egl_context(ctx);
|
||||
_EGLContext *old_ctx;
|
||||
_EGLSurface *old_dsurf, *old_rsurf;
|
||||
__DRIdrawable *ddraw, *rdraw;
|
||||
__DRIcontext *cctx;
|
||||
|
||||
/* make new bindings */
|
||||
if (!_eglBindContext(ctx, dsurf, rsurf, &old_ctx, &old_dsurf, &old_rsurf))
|
||||
return EGL_FALSE;
|
||||
|
||||
/* flush before context switch */
|
||||
if (old_ctx && ddrv->glFlush)
|
||||
ddrv->glFlush();
|
||||
|
||||
ddraw = (droid_dsurf) ? droid_dsurf->dri_drawable : NULL;
|
||||
rdraw = (droid_rsurf) ? droid_rsurf->dri_drawable : NULL;
|
||||
cctx = (dctx) ? dctx->dri_context : NULL;
|
||||
|
||||
if ((cctx == NULL && ddraw == NULL && rdraw == NULL) ||
|
||||
ddpy->core->bindContext(cctx, ddraw, rdraw)) {
|
||||
droid_destroy_surface(drv, disp, old_dsurf);
|
||||
droid_destroy_surface(drv, disp, old_rsurf);
|
||||
if (old_ctx) {
|
||||
/* unbind the old context only when there is no new context bound */
|
||||
if (!ctx) {
|
||||
__DRIcontext *old_cctx = droid_egl_context(old_ctx)->dri_context;
|
||||
ddpy->core->unbindContext(old_cctx);
|
||||
}
|
||||
/* no destroy? */
|
||||
_eglPutContext(old_ctx);
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
} else {
|
||||
/* undo the previous _eglBindContext */
|
||||
_eglBindContext(old_ctx, old_dsurf, old_rsurf, &ctx, &dsurf, &rsurf);
|
||||
assert(&dctx->base == ctx &&
|
||||
&droid_dsurf->base == dsurf &&
|
||||
&droid_rsurf->base == rsurf);
|
||||
|
||||
_eglPutSurface(dsurf);
|
||||
_eglPutSurface(rsurf);
|
||||
_eglPutContext(ctx);
|
||||
|
||||
_eglPutSurface(old_dsurf);
|
||||
_eglPutSurface(old_rsurf);
|
||||
_eglPutContext(old_ctx);
|
||||
|
||||
return EGL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
{
|
||||
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct droid_egl_surface *dsurf = droid_egl_surface(draw);
|
||||
_EGLContext *ctx;
|
||||
|
||||
if (ddrv->glFlush) {
|
||||
ctx = _eglGetCurrentContext();
|
||||
if (ctx && ctx->DrawSurface == &dsurf->base)
|
||||
ddrv->glFlush();
|
||||
}
|
||||
|
||||
(*ddpy->flush->flush)(dsurf->dri_drawable);
|
||||
|
||||
if (dsurf->buffer)
|
||||
droid_enqueue_buffer(dsurf);
|
||||
|
||||
(*ddpy->flush->invalidate)(dsurf->dri_drawable);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_wait_client(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
|
||||
{
|
||||
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct droid_egl_surface *dsurf = droid_egl_surface(ctx->DrawSurface);
|
||||
|
||||
if (ddrv->glFinish)
|
||||
ddrv->glFinish();
|
||||
|
||||
if (dsurf)
|
||||
(*ddpy->flush->flush)(dsurf->dri_drawable);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
droid_init_core_functions(_EGLDriver *drv)
|
||||
{
|
||||
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
|
||||
|
||||
ddrv->base.API.CreateContext = droid_create_context;
|
||||
ddrv->base.API.CreateWindowSurface = droid_create_window_surface;
|
||||
ddrv->base.API.CreatePixmapSurface = droid_create_pixmap_surface;
|
||||
ddrv->base.API.CreatePbufferSurface = droid_create_pbuffer_surface;
|
||||
ddrv->base.API.DestroySurface = droid_destroy_surface;
|
||||
ddrv->base.API.MakeCurrent = droid_make_current;
|
||||
ddrv->base.API.SwapBuffers = droid_swap_buffers;
|
||||
ddrv->base.API.WaitClient = droid_wait_client;
|
||||
}
|
134
src/egl/drivers/android/droid_image.c
Normal file
134
src/egl/drivers/android/droid_image.c
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright © 2010 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>
|
||||
*/
|
||||
|
||||
#include "droid.h"
|
||||
|
||||
static _EGLImage *
|
||||
droid_create_image_android_native_buffer(_EGLDisplay *disp,
|
||||
EGLClientBuffer buffer)
|
||||
{
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct android_native_buffer_t *buf =
|
||||
(struct android_native_buffer_t *) buffer;
|
||||
struct droid_egl_image *dimg;
|
||||
EGLint format, name;
|
||||
|
||||
if (!buf || buf->common.magic != ANDROID_NATIVE_BUFFER_MAGIC ||
|
||||
buf->common.version != sizeof(*buf)) {
|
||||
_eglError(EGL_BAD_PARAMETER, "eglCreateEGLImageKHR");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name = get_native_buffer_name(buf);
|
||||
if (!name) {
|
||||
_eglError(EGL_BAD_PARAMETER, "eglCreateEGLImageKHR");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (buf->format) {
|
||||
case HAL_PIXEL_FORMAT_BGRA_8888:
|
||||
format = __DRI_IMAGE_FORMAT_ARGB8888;
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_RGB_565:
|
||||
format = __DRI_IMAGE_FORMAT_RGB565;
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_RGBA_8888:
|
||||
format = __DRI_IMAGE_FORMAT_RGBA8888_REV;
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_RGBX_8888:
|
||||
case HAL_PIXEL_FORMAT_RGB_888:
|
||||
case HAL_PIXEL_FORMAT_RGBA_5551:
|
||||
case HAL_PIXEL_FORMAT_RGBA_4444:
|
||||
/* unsupported */
|
||||
default:
|
||||
_eglLog(_EGL_WARNING, "unsupported native buffer format 0x%x", buf->format);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
dimg = calloc(1, sizeof(*dimg));
|
||||
if (!dimg) {
|
||||
_eglError(EGL_BAD_ALLOC, "droid_create_image_mesa_drm");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!_eglInitImage(&dimg->base, disp)) {
|
||||
free(dimg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dimg->dri_image =
|
||||
ddpy->image->createImageFromName(ddpy->dri_screen,
|
||||
buf->width,
|
||||
buf->height,
|
||||
format,
|
||||
name,
|
||||
buf->stride,
|
||||
dimg);
|
||||
if (!dimg->dri_image) {
|
||||
free(dimg);
|
||||
_eglError(EGL_BAD_ALLOC, "droid_create_image_mesa_drm");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &dimg->base;
|
||||
}
|
||||
|
||||
static _EGLImage *
|
||||
droid_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx, EGLenum target,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
{
|
||||
switch (target) {
|
||||
case EGL_NATIVE_BUFFER_ANDROID:
|
||||
return droid_create_image_android_native_buffer(disp, buffer);
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "droid_create_image_khr");
|
||||
return EGL_NO_IMAGE_KHR;
|
||||
}
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_destroy_image_khr(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *image)
|
||||
{
|
||||
struct droid_egl_display *ddpy = droid_egl_display(disp);
|
||||
struct droid_egl_image *dimg = droid_egl_image(image);
|
||||
|
||||
ddpy->image->destroyImage(dimg->dri_image);
|
||||
free(dimg);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
droid_init_image_functions(_EGLDriver *drv)
|
||||
{
|
||||
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
|
||||
|
||||
ddrv->base.API.CreateImageKHR = droid_create_image_khr;
|
||||
ddrv->base.API.DestroyImageKHR = droid_destroy_image_khr;
|
||||
}
|
42
src/egl/drivers/android/egl_android.c
Normal file
42
src/egl/drivers/android/egl_android.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright © 2010 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>
|
||||
*/
|
||||
|
||||
#include "droid.h"
|
||||
|
||||
_EGLDriver *
|
||||
_eglMain(const char *args)
|
||||
{
|
||||
_EGLDriver *drv;
|
||||
|
||||
drv = droid_create_driver();
|
||||
if (drv) {
|
||||
droid_init_core_functions(drv);
|
||||
droid_init_image_functions(drv);
|
||||
}
|
||||
|
||||
return drv;
|
||||
}
|
@@ -3,8 +3,8 @@
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EGL_DRIVER = egl_dri2
|
||||
EGL_SOURCES = egl_dri2.c platform_x11.c platform_drm.c
|
||||
EGL_DRIVER = egl_dri2.so
|
||||
EGL_SOURCES = egl_dri2.c
|
||||
|
||||
EGL_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
@@ -15,22 +15,6 @@ EGL_INCLUDES = \
|
||||
$(LIBUDEV_CFLAGS) \
|
||||
$(LIBDRM_CFLAGS)
|
||||
|
||||
EGL_LIBS = $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
|
||||
|
||||
EGL_CFLAGS = -D_EGL_MAIN=_eglBuiltInDriverDRI2
|
||||
EGL_BUILTIN = true
|
||||
|
||||
ifeq ($(SHARED_GLAPI),1)
|
||||
EGL_CFLAGS += -DHAVE_SHARED_GLAPI
|
||||
endif
|
||||
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_wayland.c
|
||||
EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
|
||||
-I$(TOP)/src/egl/wayland/wayland-egl \
|
||||
-I$(TOP)/src/egl/wayland/wayland-drm
|
||||
EGL_LIBS += $(WAYLAND_LIBS) \
|
||||
$(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
|
||||
endif
|
||||
EGL_LIBS = $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(LIBDRM_LIBS)
|
||||
|
||||
include ../Makefile.template
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,199 +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>
|
||||
*/
|
||||
|
||||
#ifndef EGL_DRI2_INCLUDED
|
||||
#define EGL_DRI2_INCLUDED
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/dri2.h>
|
||||
#include <xcb/xfixes.h>
|
||||
#include <X11/Xlib-xcb.h>
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
#include <wayland-client.h>
|
||||
#include "wayland-drm.h"
|
||||
#include "wayland-egl-priv.h"
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/internal/dri_interface.h>
|
||||
|
||||
#include "eglconfig.h"
|
||||
#include "eglcontext.h"
|
||||
#include "egldisplay.h"
|
||||
#include "egldriver.h"
|
||||
#include "eglcurrent.h"
|
||||
#include "egllog.h"
|
||||
#include "eglsurface.h"
|
||||
#include "eglimage.h"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
struct dri2_egl_driver
|
||||
{
|
||||
_EGLDriver base;
|
||||
|
||||
void *handle;
|
||||
_EGLProc (*get_proc_address)(const char *procname);
|
||||
void (*glFlush)(void);
|
||||
};
|
||||
|
||||
struct dri2_egl_display
|
||||
{
|
||||
xcb_connection_t *conn;
|
||||
int dri2_major;
|
||||
int dri2_minor;
|
||||
__DRIscreen *dri_screen;
|
||||
const __DRIconfig **driver_configs;
|
||||
void *driver;
|
||||
__DRIcoreExtension *core;
|
||||
__DRIdri2Extension *dri2;
|
||||
__DRIswrastExtension *swrast;
|
||||
__DRI2flushExtension *flush;
|
||||
__DRItexBufferExtension *tex_buffer;
|
||||
__DRIimageExtension *image;
|
||||
int fd;
|
||||
|
||||
char *device_name;
|
||||
char *driver_name;
|
||||
|
||||
__DRIdri2LoaderExtension dri2_loader_extension;
|
||||
__DRIswrastLoaderExtension swrast_loader_extension;
|
||||
const __DRIextension *extensions[3];
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
struct wl_egl_display *wl_dpy;
|
||||
struct wl_drm *wl_server_drm;
|
||||
#endif
|
||||
|
||||
int (*authenticate) (_EGLDisplay *disp, uint32_t id);
|
||||
};
|
||||
|
||||
struct dri2_egl_context
|
||||
{
|
||||
_EGLContext base;
|
||||
__DRIcontext *dri_context;
|
||||
};
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
enum wayland_buffer_type {
|
||||
WL_BUFFER_FRONT,
|
||||
WL_BUFFER_BACK,
|
||||
WL_BUFFER_COUNT
|
||||
};
|
||||
|
||||
#define __DRI_BUFFER_COUNT 10
|
||||
#endif
|
||||
|
||||
enum dri2_surface_type {
|
||||
DRI2_WINDOW_SURFACE,
|
||||
DRI2_PIXMAP_SURFACE,
|
||||
DRI2_PBUFFER_SURFACE
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
int depth;
|
||||
int bytes_per_pixel;
|
||||
xcb_gcontext_t gc;
|
||||
xcb_gcontext_t swapgc;
|
||||
|
||||
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 dx;
|
||||
int dy;
|
||||
__DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
|
||||
__DRIbuffer *pending_buffer;
|
||||
EGLBoolean block_swap_buffers;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct dri2_egl_buffer {
|
||||
__DRIbuffer *dri_buffer;
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
};
|
||||
|
||||
|
||||
struct dri2_egl_config
|
||||
{
|
||||
_EGLConfig base;
|
||||
const __DRIconfig *dri_single_config;
|
||||
const __DRIconfig *dri_double_config;
|
||||
};
|
||||
|
||||
struct dri2_egl_image
|
||||
{
|
||||
_EGLImage base;
|
||||
__DRIimage *dri_image;
|
||||
};
|
||||
|
||||
/* standard typecasts */
|
||||
_EGL_DRIVER_STANDARD_TYPECASTS(dri2_egl)
|
||||
_EGL_DRIVER_TYPECAST(dri2_egl_image, _EGLImage, obj)
|
||||
|
||||
extern const __DRIimageLookupExtension image_lookup_extension;
|
||||
extern const __DRIuseInvalidateExtension use_invalidate;
|
||||
|
||||
EGLBoolean
|
||||
dri2_load_driver(_EGLDisplay *disp);
|
||||
|
||||
EGLBoolean
|
||||
dri2_create_screen(_EGLDisplay *disp);
|
||||
|
||||
struct dri2_egl_config *
|
||||
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
int depth, EGLint surface_type, const EGLint *attr_list);
|
||||
|
||||
_EGLImage *
|
||||
dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx, EGLenum target,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list);
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp);
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp);
|
||||
|
||||
char *
|
||||
dri2_get_driver_for_fd(int fd);
|
||||
|
||||
#endif /* EGL_DRI2_INCLUDED */
|
@@ -1,732 +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>
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.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"
|
||||
|
||||
|
||||
#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 udev *udev;
|
||||
struct udev_device *device;
|
||||
struct stat buf;
|
||||
char *device_name;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
device_name = udev_device_get_devnode(device);
|
||||
if (!device_name)
|
||||
goto out;
|
||||
device_name = strdup(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;
|
||||
struct stat buf;
|
||||
const char *pci_id;
|
||||
char *driver = NULL;
|
||||
int vendor_id, chip_id, i, j;
|
||||
|
||||
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
|
||||
dri2_drm_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
|
||||
return drmAuthMagic(dri2_dpy->fd, id);
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
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;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (!dri2_load_driver(disp))
|
||||
goto cleanup_device_name;
|
||||
|
||||
dri2_dpy->extensions[0] = &image_lookup_extension.base;
|
||||
dri2_dpy->extensions[1] = &use_invalidate.base;
|
||||
dri2_dpy->extensions[2] = NULL;
|
||||
|
||||
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);
|
||||
|
||||
#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
|
@@ -1,704 +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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "egl_dri2.h"
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include "wayland-drm-client-protocol.h"
|
||||
|
||||
static void
|
||||
sync_callback(void *data)
|
||||
{
|
||||
int *done = data;
|
||||
|
||||
*done = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
force_roundtrip(struct wl_display *display)
|
||||
{
|
||||
int done = 0;
|
||||
|
||||
wl_display_sync_callback(display, sync_callback, &done);
|
||||
wl_display_iterate(display, WL_DISPLAY_WRITABLE);
|
||||
while (!done)
|
||||
wl_display_iterate(display, WL_DISPLAY_READABLE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
|
||||
*/
|
||||
static _EGLSurface *
|
||||
dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
_EGLConfig *conf, EGLNativeWindowType window,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
|
||||
struct dri2_egl_surface *dri2_surf;
|
||||
struct dri2_egl_buffer *dri2_buf;
|
||||
int i;
|
||||
|
||||
(void) drv;
|
||||
|
||||
dri2_surf = malloc(sizeof *dri2_surf);
|
||||
if (!dri2_surf) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_create_surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
|
||||
goto cleanup_surf;
|
||||
|
||||
for (i = 0; i < WL_BUFFER_COUNT; ++i)
|
||||
dri2_surf->wl_drm_buffer[i] = NULL;
|
||||
|
||||
for (i = 0; i < __DRI_BUFFER_COUNT; ++i)
|
||||
dri2_surf->dri_buffers[i] = NULL;
|
||||
|
||||
dri2_surf->pending_buffer = NULL;
|
||||
dri2_surf->block_swap_buffers = EGL_FALSE;
|
||||
|
||||
switch (type) {
|
||||
case EGL_WINDOW_BIT:
|
||||
dri2_surf->wl_win = (struct wl_egl_window *) window;
|
||||
dri2_surf->type = DRI2_WINDOW_SURFACE;
|
||||
|
||||
dri2_surf->base.Width = -1;
|
||||
dri2_surf->base.Height = -1;
|
||||
break;
|
||||
case EGL_PIXMAP_BIT:
|
||||
dri2_surf->wl_pix = (struct wl_egl_pixmap *) window;
|
||||
dri2_surf->type = DRI2_PIXMAP_SURFACE;
|
||||
|
||||
dri2_surf->base.Width = dri2_surf->wl_pix->width;
|
||||
dri2_surf->base.Height = dri2_surf->wl_pix->height;
|
||||
|
||||
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;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto cleanup_surf;
|
||||
}
|
||||
|
||||
dri2_surf->dri_drawable =
|
||||
(*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
|
||||
type == EGL_WINDOW_BIT ?
|
||||
dri2_conf->dri_double_config :
|
||||
dri2_conf->dri_single_config,
|
||||
dri2_surf);
|
||||
if (dri2_surf->dri_drawable == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
|
||||
goto cleanup_dri_drawable;
|
||||
}
|
||||
|
||||
return &dri2_surf->base;
|
||||
|
||||
cleanup_dri_drawable:
|
||||
dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
|
||||
cleanup_surf:
|
||||
free(dri2_surf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
|
||||
*/
|
||||
static _EGLSurface *
|
||||
dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativeWindowType window,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
return dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf,
|
||||
window, attrib_list);
|
||||
}
|
||||
|
||||
static _EGLSurface *
|
||||
dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativePixmapType pixmap,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
return dri2_create_surface(drv, disp, EGL_PIXMAP_BIT, conf,
|
||||
pixmap, attrib_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglDestroySurface(), drv->API.DestroySurface().
|
||||
*/
|
||||
static EGLBoolean
|
||||
dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
|
||||
int i;
|
||||
|
||||
(void) drv;
|
||||
|
||||
if (!_eglPutSurface(surf))
|
||||
return EGL_TRUE;
|
||||
|
||||
(*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
|
||||
|
||||
for (i = 0; i < WL_BUFFER_COUNT; ++i)
|
||||
if (dri2_surf->wl_drm_buffer[i])
|
||||
wl_buffer_destroy(dri2_surf->wl_drm_buffer[i]);
|
||||
|
||||
for (i = 0; i < __DRI_BUFFER_COUNT; ++i)
|
||||
if (dri2_surf->dri_buffers[i] && !(i == __DRI_BUFFER_FRONT_LEFT &&
|
||||
dri2_surf->type == DRI2_PIXMAP_SURFACE))
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->dri_buffers[i]);
|
||||
|
||||
free(surf);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
struct dri2_egl_buffer *dri2_buf = egl_pixmap->driver_private;
|
||||
|
||||
assert(dri2_buf);
|
||||
|
||||
dri2_buf->dri2_dpy->dri2->releaseBuffer(dri2_buf->dri2_dpy->dri_screen,
|
||||
dri2_buf->dri_buffer);
|
||||
|
||||
free(dri2_buf);
|
||||
|
||||
egl_pixmap->driver_private = NULL;
|
||||
egl_pixmap->destroy = NULL;
|
||||
egl_pixmap->name = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_process_back_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
|
||||
(void) format;
|
||||
|
||||
switch (dri2_surf->type) {
|
||||
case DRI2_WINDOW_SURFACE:
|
||||
/* allocate a front buffer for our double-buffered window*/
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] =
|
||||
dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
|
||||
__DRI_BUFFER_FRONT_LEFT, format,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_process_front_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
struct dri2_egl_buffer *dri2_buf;
|
||||
|
||||
switch (dri2_surf->type) {
|
||||
case DRI2_PIXMAP_SURFACE:
|
||||
dri2_buf = malloc(sizeof *dri2_buf);
|
||||
if (!dri2_buf)
|
||||
return;
|
||||
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_release_pending_buffer(void *data)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = data;
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
|
||||
/* FIXME: print internal error */
|
||||
if (!dri2_surf->pending_buffer)
|
||||
return;
|
||||
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->pending_buffer);
|
||||
dri2_surf->pending_buffer = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_release_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
int i;
|
||||
|
||||
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->display);
|
||||
dri2_surf->pending_buffer = dri2_surf->dri_buffers[i];
|
||||
wl_display_sync_callback(dri2_dpy->wl_dpy->display,
|
||||
dri2_release_pending_buffer, dri2_surf);
|
||||
break;
|
||||
default:
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->dri_buffers[i]);
|
||||
break;
|
||||
}
|
||||
dri2_surf->dri_buffers[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static __DRIbuffer *
|
||||
dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
int *width, int *height,
|
||||
unsigned int *attachments, int count,
|
||||
int *out_count, void *loaderPrivate)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
int i;
|
||||
|
||||
if (dri2_surf->type == DRI2_WINDOW_SURFACE &&
|
||||
(dri2_surf->base.Width != dri2_surf->wl_win->width ||
|
||||
dri2_surf->base.Height != dri2_surf->wl_win->height)) {
|
||||
|
||||
dri2_release_buffers(dri2_surf);
|
||||
|
||||
dri2_surf->base.Width = dri2_surf->wl_win->width;
|
||||
dri2_surf->base.Height = dri2_surf->wl_win->height;
|
||||
dri2_surf->dx = dri2_surf->wl_win->dx;
|
||||
dri2_surf->dy = dri2_surf->wl_win->dy;
|
||||
|
||||
for (i = 0; i < WL_BUFFER_COUNT; ++i) {
|
||||
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->buffer_count = 0;
|
||||
for (i = 0; i < 2*count; i+=2) {
|
||||
assert(attachments[i] < __DRI_BUFFER_COUNT);
|
||||
assert(dri2_surf->buffer_count < 5);
|
||||
|
||||
if (dri2_surf->dri_buffers[attachments[i]] == NULL) {
|
||||
|
||||
dri2_surf->dri_buffers[attachments[i]] =
|
||||
dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
|
||||
attachments[i], attachments[i+1],
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
|
||||
if (!dri2_surf->dri_buffers[attachments[i]])
|
||||
continue;
|
||||
|
||||
if (attachments[i] == __DRI_BUFFER_FRONT_LEFT)
|
||||
dri2_process_front_buffer(dri2_surf, attachments[i+1]);
|
||||
else if (attachments[i] == __DRI_BUFFER_BACK_LEFT)
|
||||
dri2_process_back_buffer(dri2_surf, attachments[i+1]);
|
||||
}
|
||||
|
||||
memcpy(&dri2_surf->buffers[dri2_surf->buffer_count],
|
||||
dri2_surf->dri_buffers[attachments[i]],
|
||||
sizeof(__DRIbuffer));
|
||||
|
||||
dri2_surf->buffer_count++;
|
||||
}
|
||||
|
||||
assert(dri2_surf->type == DRI2_PIXMAP_SURFACE ||
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
|
||||
|
||||
*out_count = dri2_surf->buffer_count;
|
||||
if (dri2_surf->buffer_count == 0)
|
||||
return NULL;
|
||||
|
||||
*width = dri2_surf->base.Width;
|
||||
*height = dri2_surf->base.Height;
|
||||
|
||||
return dri2_surf->buffers;
|
||||
}
|
||||
|
||||
static __DRIbuffer *
|
||||
dri2_get_buffers(__DRIdrawable * driDrawable,
|
||||
int *width, int *height,
|
||||
unsigned int *attachments, int count,
|
||||
int *out_count, void *loaderPrivate)
|
||||
{
|
||||
unsigned int *attachments_with_format;
|
||||
__DRIbuffer *buffer;
|
||||
const unsigned int format = 32;
|
||||
int i;
|
||||
|
||||
attachments_with_format = calloc(count * 2, sizeof(unsigned int));
|
||||
if (!attachments_with_format) {
|
||||
*out_count = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
attachments_with_format[2*i] = attachments[i];
|
||||
attachments_with_format[2*i + 1] = format;
|
||||
}
|
||||
|
||||
buffer =
|
||||
dri2_get_buffers_with_format(driDrawable,
|
||||
width, height,
|
||||
attachments_with_format, count,
|
||||
out_count, loaderPrivate);
|
||||
|
||||
free(attachments_with_format);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
|
||||
{
|
||||
(void) driDrawable;
|
||||
|
||||
/* FIXME: Does EGL support front buffer rendering at all? */
|
||||
|
||||
#if 0
|
||||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
|
||||
dri2WaitGL(dri2_surf);
|
||||
#else
|
||||
(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)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = data;
|
||||
|
||||
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().
|
||||
*/
|
||||
static EGLBoolean
|
||||
dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
|
||||
|
||||
while (dri2_surf->block_swap_buffers)
|
||||
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->display,
|
||||
dri2_surf->wl_win->surface,
|
||||
wayland_frame_callback, dri2_surf);
|
||||
|
||||
if (dri2_surf->type == DRI2_WINDOW_SURFACE) {
|
||||
pointer_swap(
|
||||
(const void **) &dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT],
|
||||
(const void **) &dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
|
||||
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]->attachment =
|
||||
__DRI_BUFFER_FRONT_LEFT;
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->attachment =
|
||||
__DRI_BUFFER_BACK_LEFT;
|
||||
|
||||
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]);
|
||||
|
||||
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_win->attached_width = dri2_surf->base.Width;
|
||||
dri2_surf->wl_win->attached_height = dri2_surf->base.Height;
|
||||
/* reset resize growing parameters */
|
||||
dri2_surf->dx = 0;
|
||||
dri2_surf->dy = 0;
|
||||
|
||||
wl_surface_damage(dri2_surf->wl_win->surface, 0, 0,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
}
|
||||
|
||||
_EGLContext *ctx;
|
||||
if (dri2_drv->glFlush) {
|
||||
ctx = _eglGetCurrentContext();
|
||||
if (ctx && ctx->DrawSurface == &dri2_surf->base)
|
||||
dri2_drv->glFlush();
|
||||
}
|
||||
|
||||
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
|
||||
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglCreateImageKHR(), drv->API.CreateImageKHR().
|
||||
*/
|
||||
static _EGLImage *
|
||||
dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct wl_egl_pixmap *wl_egl_pixmap = (struct wl_egl_pixmap *) buffer;
|
||||
struct dri2_egl_buffer *dri2_buf;
|
||||
EGLint wl_attr_list[] = {
|
||||
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
|
||||
};
|
||||
|
||||
dri2_buf = malloc(sizeof *dri2_buf);
|
||||
if (!dri2_buf)
|
||||
return NULL;
|
||||
|
||||
dri2_buf->dri2_dpy = dri2_dpy;
|
||||
dri2_buf->dri_buffer =
|
||||
dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
|
||||
__DRI_BUFFER_FRONT_LEFT, 32,
|
||||
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_attr_list[1] = wl_egl_pixmap->width;
|
||||
wl_attr_list[3] = wl_egl_pixmap->height;
|
||||
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) wl_egl_pixmap->name, wl_attr_list);
|
||||
}
|
||||
|
||||
static _EGLImage *
|
||||
dri2_wayland_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx, EGLenum target,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
{
|
||||
(void) drv;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
int ret = 0;
|
||||
|
||||
dri2_dpy->wl_dpy->authenticated = false;
|
||||
|
||||
wl_drm_authenticate(dri2_dpy->wl_dpy->drm, id);
|
||||
force_roundtrip(dri2_dpy->wl_dpy->display);
|
||||
|
||||
if (!dri2_dpy->wl_dpy->authenticated)
|
||||
ret = -1;
|
||||
|
||||
/* reset authenticated */
|
||||
dri2_dpy->wl_dpy->authenticated = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglTerminate(), drv->API.Terminate().
|
||||
*/
|
||||
static EGLBoolean
|
||||
dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
|
||||
_eglReleaseDisplayResources(drv, disp);
|
||||
_eglCleanupDisplay(disp);
|
||||
|
||||
dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
|
||||
close(dri2_dpy->fd);
|
||||
dlclose(dri2_dpy->driver);
|
||||
free(dri2_dpy->driver_name);
|
||||
free(dri2_dpy);
|
||||
disp->DriverData = NULL;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
int i;
|
||||
|
||||
drv->API.CreateWindowSurface = dri2_create_window_surface;
|
||||
drv->API.CreatePixmapSurface = dri2_create_pixmap_surface;
|
||||
drv->API.DestroySurface = dri2_destroy_surface;
|
||||
drv->API.SwapBuffers = dri2_swap_buffers;
|
||||
drv->API.CreateImageKHR = dri2_wayland_create_image_khr;
|
||||
drv->API.Terminate = dri2_terminate;
|
||||
|
||||
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->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;
|
||||
}
|
||||
|
||||
if (!dri2_dpy->wl_dpy->authenticated)
|
||||
force_roundtrip(dri2_dpy->wl_dpy->display);
|
||||
if (!dri2_dpy->wl_dpy->authenticated)
|
||||
goto cleanup_dpy;
|
||||
|
||||
dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
|
||||
if (dri2_dpy->driver_name == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name");
|
||||
goto cleanup_fd;
|
||||
}
|
||||
|
||||
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;
|
||||
dri2_dpy->dri2_loader_extension.getBuffers = dri2_get_buffers;
|
||||
dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
|
||||
dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
|
||||
dri2_get_buffers_with_format;
|
||||
|
||||
dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
|
||||
dri2_dpy->extensions[1] = &image_lookup_extension.base;
|
||||
dri2_dpy->extensions[2] = NULL;
|
||||
|
||||
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,
|
||||
EGL_WINDOW_BIT | EGL_PIXMAP_BIT, NULL);
|
||||
|
||||
|
||||
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
|
||||
|
||||
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
|
||||
dri2_dpy->authenticate = dri2_wayland_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);
|
||||
cleanup_fd:
|
||||
close(dri2_dpy->fd);
|
||||
cleanup_dpy:
|
||||
free(dri2_dpy);
|
||||
|
||||
return EGL_FALSE;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EGL_DRIVER = egl_glx
|
||||
EGL_DRIVER = egl_glx.so
|
||||
EGL_SOURCES = egl_glx.c
|
||||
|
||||
EGL_INCLUDES = \
|
||||
@@ -11,9 +11,6 @@ EGL_INCLUDES = \
|
||||
-I$(TOP)/src/egl/main
|
||||
|
||||
EGL_CFLAGS = $(X11_CFLAGS)
|
||||
EGL_LIBS = $(X11_LIBS) $(DLOPEN_LIBS)
|
||||
|
||||
EGL_CFLAGS += -D_EGL_MAIN=_eglBuiltInDriverGLX
|
||||
EGL_BUILTIN = true
|
||||
EGL_LIBS = $(X11_LIBS) -lGL
|
||||
|
||||
include ../Makefile.template
|
||||
|
@@ -36,8 +36,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include "GL/glx.h"
|
||||
#include <GL/glx.h>
|
||||
#include <EGL/egl.h>
|
||||
|
||||
#include "eglconfig.h"
|
||||
#include "eglcontext.h"
|
||||
@@ -54,66 +54,10 @@
|
||||
#error "GL/glx.h must be equal to or greater than GLX 1.4"
|
||||
#endif
|
||||
|
||||
/* GLX 1.0 */
|
||||
typedef GLXContext (*GLXCREATECONTEXTPROC)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
|
||||
typedef void (*GLXDESTROYCONTEXTPROC)( Display *dpy, GLXContext ctx );
|
||||
typedef Bool (*GLXMAKECURRENTPROC)( Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
||||
typedef void (*GLXSWAPBUFFERSPROC)( Display *dpy, GLXDrawable drawable );
|
||||
typedef GLXPixmap (*GLXCREATEGLXPIXMAPPROC)( Display *dpy, XVisualInfo *visual, Pixmap pixmap );
|
||||
typedef void (*GLXDESTROYGLXPIXMAPPROC)( Display *dpy, GLXPixmap pixmap );
|
||||
typedef Bool (*GLXQUERYVERSIONPROC)( Display *dpy, int *maj, int *min );
|
||||
typedef int (*GLXGETCONFIGPROC)( Display *dpy, XVisualInfo *visual, int attrib, int *value );
|
||||
typedef void (*GLXWAITGLPROC)( void );
|
||||
typedef void (*GLXWAITXPROC)( void );
|
||||
|
||||
/* GLX 1.1 */
|
||||
typedef const char *(*GLXQUERYEXTENSIONSSTRINGPROC)( Display *dpy, int screen );
|
||||
typedef const char *(*GLXQUERYSERVERSTRINGPROC)( Display *dpy, int screen, int name );
|
||||
typedef const char *(*GLXGETCLIENTSTRINGPROC)( Display *dpy, int name );
|
||||
|
||||
/** subclass of _EGLDriver */
|
||||
struct GLX_egl_driver
|
||||
{
|
||||
_EGLDriver Base; /**< base class */
|
||||
|
||||
void *handle;
|
||||
|
||||
/* GLX 1.0 */
|
||||
GLXCREATECONTEXTPROC glXCreateContext;
|
||||
GLXDESTROYCONTEXTPROC glXDestroyContext;
|
||||
GLXMAKECURRENTPROC glXMakeCurrent;
|
||||
GLXSWAPBUFFERSPROC glXSwapBuffers;
|
||||
GLXCREATEGLXPIXMAPPROC glXCreateGLXPixmap;
|
||||
GLXDESTROYGLXPIXMAPPROC glXDestroyGLXPixmap;
|
||||
GLXQUERYVERSIONPROC glXQueryVersion;
|
||||
GLXGETCONFIGPROC glXGetConfig;
|
||||
GLXWAITGLPROC glXWaitGL;
|
||||
GLXWAITXPROC glXWaitX;
|
||||
|
||||
/* GLX 1.1 */
|
||||
GLXQUERYEXTENSIONSSTRINGPROC glXQueryExtensionsString;
|
||||
GLXQUERYSERVERSTRINGPROC glXQueryServerString;
|
||||
GLXGETCLIENTSTRINGPROC glXGetClientString;
|
||||
|
||||
/* GLX 1.3 or (GLX_SGI_make_current_read and GLX_SGIX_fbconfig) */
|
||||
PFNGLXGETFBCONFIGSPROC glXGetFBConfigs;
|
||||
PFNGLXGETFBCONFIGATTRIBPROC glXGetFBConfigAttrib;
|
||||
PFNGLXGETVISUALFROMFBCONFIGPROC glXGetVisualFromFBConfig;
|
||||
PFNGLXCREATEWINDOWPROC glXCreateWindow;
|
||||
PFNGLXDESTROYWINDOWPROC glXDestroyWindow;
|
||||
PFNGLXCREATEPIXMAPPROC glXCreatePixmap;
|
||||
PFNGLXDESTROYPIXMAPPROC glXDestroyPixmap;
|
||||
PFNGLXCREATEPBUFFERPROC glXCreatePbuffer;
|
||||
PFNGLXDESTROYPBUFFERPROC glXDestroyPbuffer;
|
||||
PFNGLXCREATENEWCONTEXTPROC glXCreateNewContext;
|
||||
PFNGLXMAKECONTEXTCURRENTPROC glXMakeContextCurrent;
|
||||
|
||||
/* GLX 1.4 or GLX_ARB_get_proc_address */
|
||||
PFNGLXGETPROCADDRESSPROC glXGetProcAddress;
|
||||
|
||||
/* GLX_SGIX_pbuffer */
|
||||
PFNGLXCREATEGLXPBUFFERSGIXPROC glXCreateGLXPbufferSGIX;
|
||||
PFNGLXDESTROYGLXPBUFFERSGIXPROC glXDestroyGLXPbufferSGIX;
|
||||
};
|
||||
|
||||
|
||||
@@ -132,9 +76,14 @@ struct GLX_egl_display
|
||||
EGLBoolean have_fbconfig;
|
||||
EGLBoolean have_pbuffer;
|
||||
|
||||
/* GLX_SGIX_pbuffer */
|
||||
PFNGLXCREATEGLXPBUFFERSGIXPROC glXCreateGLXPbufferSGIX;
|
||||
PFNGLXDESTROYGLXPBUFFERSGIXPROC glXDestroyGLXPbufferSGIX;
|
||||
|
||||
/* workaround quirks of different GLX implementations */
|
||||
EGLBoolean single_buffered_quirk;
|
||||
EGLBoolean glx_window_quirk;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -219,21 +168,19 @@ static const struct {
|
||||
|
||||
|
||||
static EGLBoolean
|
||||
convert_fbconfig(struct GLX_egl_driver *GLX_drv,
|
||||
struct GLX_egl_display *GLX_dpy, GLXFBConfig fbconfig,
|
||||
convert_fbconfig(Display *dpy, GLXFBConfig fbconfig,
|
||||
struct GLX_egl_config *GLX_conf)
|
||||
{
|
||||
Display *dpy = GLX_dpy->dpy;
|
||||
int err, attr, val;
|
||||
unsigned i;
|
||||
|
||||
/* must have rgba bit */
|
||||
err = GLX_drv->glXGetFBConfigAttrib(dpy, fbconfig, GLX_RENDER_TYPE, &val);
|
||||
err = glXGetFBConfigAttrib(dpy, fbconfig, GLX_RENDER_TYPE, &val);
|
||||
if (err || !(val & GLX_RGBA_BIT))
|
||||
return EGL_FALSE;
|
||||
|
||||
/* must know whether it is double-buffered */
|
||||
err = GLX_drv->glXGetFBConfigAttrib(dpy, fbconfig, GLX_DOUBLEBUFFER, &val);
|
||||
err = glXGetFBConfigAttrib(dpy, fbconfig, GLX_DOUBLEBUFFER, &val);
|
||||
if (err)
|
||||
return EGL_FALSE;
|
||||
GLX_conf->double_buffered = val;
|
||||
@@ -249,7 +196,7 @@ convert_fbconfig(struct GLX_egl_driver *GLX_drv,
|
||||
if (!egl_attr)
|
||||
continue;
|
||||
|
||||
err = GLX_drv->glXGetFBConfigAttrib(dpy, fbconfig, attr, &val);
|
||||
err = glXGetFBConfigAttrib(dpy, fbconfig, attr, &val);
|
||||
if (err) {
|
||||
if (err == GLX_BAD_ATTRIBUTE) {
|
||||
err = 0;
|
||||
@@ -356,23 +303,21 @@ static const struct {
|
||||
};
|
||||
|
||||
static EGLBoolean
|
||||
convert_visual(struct GLX_egl_driver *GLX_drv,
|
||||
struct GLX_egl_display *GLX_dpy, XVisualInfo *vinfo,
|
||||
convert_visual(Display *dpy, XVisualInfo *vinfo,
|
||||
struct GLX_egl_config *GLX_conf)
|
||||
{
|
||||
Display *dpy = GLX_dpy->dpy;
|
||||
int err, attr, val;
|
||||
unsigned i;
|
||||
|
||||
/* the visual must support OpenGL and RGBA buffer */
|
||||
err = GLX_drv->glXGetConfig(dpy, vinfo, GLX_USE_GL, &val);
|
||||
err = glXGetConfig(dpy, vinfo, GLX_USE_GL, &val);
|
||||
if (!err && val)
|
||||
err = GLX_drv->glXGetConfig(dpy, vinfo, GLX_RGBA, &val);
|
||||
err = glXGetConfig(dpy, vinfo, GLX_RGBA, &val);
|
||||
if (err || !val)
|
||||
return EGL_FALSE;
|
||||
|
||||
/* must know whether it is double-buffered */
|
||||
err = GLX_drv->glXGetConfig(dpy, vinfo, GLX_DOUBLEBUFFER, &val);
|
||||
err = glXGetConfig(dpy, vinfo, GLX_DOUBLEBUFFER, &val);
|
||||
if (err)
|
||||
return EGL_FALSE;
|
||||
GLX_conf->double_buffered = val;
|
||||
@@ -396,7 +341,7 @@ convert_visual(struct GLX_egl_driver *GLX_drv,
|
||||
if (!egl_attr)
|
||||
continue;
|
||||
|
||||
err = GLX_drv->glXGetConfig(dpy, vinfo, attr, &val);
|
||||
err = glXGetConfig(dpy, vinfo, attr, &val);
|
||||
if (err) {
|
||||
if (err == GLX_BAD_ATTRIBUTE) {
|
||||
err = 0;
|
||||
@@ -461,16 +406,14 @@ fix_config(struct GLX_egl_display *GLX_dpy, struct GLX_egl_config *GLX_conf)
|
||||
|
||||
|
||||
static EGLBoolean
|
||||
create_configs(_EGLDriver *drv, _EGLDisplay *dpy, EGLint screen)
|
||||
create_configs(_EGLDisplay *dpy, struct GLX_egl_display *GLX_dpy,
|
||||
EGLint screen)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_display *GLX_dpy = GLX_egl_display(dpy);
|
||||
EGLint num_configs = 0, i;
|
||||
EGLint id = 1;
|
||||
|
||||
if (GLX_dpy->have_fbconfig) {
|
||||
GLX_dpy->fbconfigs =
|
||||
GLX_drv->glXGetFBConfigs(GLX_dpy->dpy, screen, &num_configs);
|
||||
GLX_dpy->fbconfigs = glXGetFBConfigs(GLX_dpy->dpy, screen, &num_configs);
|
||||
}
|
||||
else {
|
||||
XVisualInfo vinfo_template;
|
||||
@@ -491,14 +434,10 @@ create_configs(_EGLDriver *drv, _EGLDisplay *dpy, EGLint screen)
|
||||
|
||||
memset(&template, 0, sizeof(template));
|
||||
_eglInitConfig(&template.Base, dpy, id);
|
||||
if (GLX_dpy->have_fbconfig) {
|
||||
ok = convert_fbconfig(GLX_drv, GLX_dpy,
|
||||
GLX_dpy->fbconfigs[i], &template);
|
||||
}
|
||||
else {
|
||||
ok = convert_visual(GLX_drv, GLX_dpy,
|
||||
&GLX_dpy->visuals[i], &template);
|
||||
}
|
||||
if (GLX_dpy->have_fbconfig)
|
||||
ok = convert_fbconfig(GLX_dpy->dpy, GLX_dpy->fbconfigs[i], &template);
|
||||
else
|
||||
ok = convert_visual(GLX_dpy->dpy, &GLX_dpy->visuals[i], &template);
|
||||
if (!ok)
|
||||
continue;
|
||||
|
||||
@@ -523,12 +462,13 @@ create_configs(_EGLDriver *drv, _EGLDisplay *dpy, EGLint screen)
|
||||
|
||||
|
||||
static void
|
||||
check_extensions(struct GLX_egl_driver *GLX_drv,
|
||||
struct GLX_egl_display *GLX_dpy, EGLint screen)
|
||||
check_extensions(struct GLX_egl_display *GLX_dpy, EGLint screen)
|
||||
{
|
||||
GLX_dpy->extensions =
|
||||
GLX_drv->glXQueryExtensionsString(GLX_dpy->dpy, screen);
|
||||
glXQueryExtensionsString(GLX_dpy->dpy, screen);
|
||||
if (GLX_dpy->extensions) {
|
||||
/* glXGetProcAddress is assumed */
|
||||
|
||||
if (strstr(GLX_dpy->extensions, "GLX_SGI_make_current_read")) {
|
||||
/* GLX 1.3 entry points are used */
|
||||
GLX_dpy->have_make_current_read = EGL_TRUE;
|
||||
@@ -540,8 +480,13 @@ check_extensions(struct GLX_egl_driver *GLX_drv,
|
||||
}
|
||||
|
||||
if (strstr(GLX_dpy->extensions, "GLX_SGIX_pbuffer")) {
|
||||
if (GLX_drv->glXCreateGLXPbufferSGIX &&
|
||||
GLX_drv->glXDestroyGLXPbufferSGIX &&
|
||||
GLX_dpy->glXCreateGLXPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC)
|
||||
glXGetProcAddress((const GLubyte *) "glXCreateGLXPbufferSGIX");
|
||||
GLX_dpy->glXDestroyGLXPbufferSGIX = (PFNGLXDESTROYGLXPBUFFERSGIXPROC)
|
||||
glXGetProcAddress((const GLubyte *) "glXDestroyGLXPbufferSGIX");
|
||||
|
||||
if (GLX_dpy->glXCreateGLXPbufferSGIX &&
|
||||
GLX_dpy->glXDestroyGLXPbufferSGIX &&
|
||||
GLX_dpy->have_fbconfig)
|
||||
GLX_dpy->have_pbuffer = EGL_TRUE;
|
||||
}
|
||||
@@ -557,17 +502,16 @@ check_extensions(struct GLX_egl_driver *GLX_drv,
|
||||
|
||||
|
||||
static void
|
||||
check_quirks(struct GLX_egl_driver *GLX_drv,
|
||||
struct GLX_egl_display *GLX_dpy, EGLint screen)
|
||||
check_quirks(struct GLX_egl_display *GLX_dpy, EGLint screen)
|
||||
{
|
||||
const char *vendor;
|
||||
|
||||
GLX_dpy->single_buffered_quirk = EGL_TRUE;
|
||||
GLX_dpy->glx_window_quirk = EGL_TRUE;
|
||||
|
||||
vendor = GLX_drv->glXGetClientString(GLX_dpy->dpy, GLX_VENDOR);
|
||||
vendor = glXGetClientString(GLX_dpy->dpy, GLX_VENDOR);
|
||||
if (vendor && strstr(vendor, "NVIDIA")) {
|
||||
vendor = GLX_drv->glXQueryServerString(GLX_dpy->dpy, screen, GLX_VENDOR);
|
||||
vendor = glXQueryServerString(GLX_dpy->dpy, screen, GLX_VENDOR);
|
||||
if (vendor && strstr(vendor, "NVIDIA")) {
|
||||
_eglLog(_EGL_DEBUG, "disable quirks");
|
||||
GLX_dpy->single_buffered_quirk = EGL_FALSE;
|
||||
@@ -581,21 +525,16 @@ check_quirks(struct GLX_egl_driver *GLX_drv,
|
||||
* Called via eglInitialize(), GLX_drv->API.Initialize().
|
||||
*/
|
||||
static EGLBoolean
|
||||
GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
EGLint *major, EGLint *minor)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_display *GLX_dpy;
|
||||
|
||||
(void) drv;
|
||||
|
||||
if (disp->Platform != _EGL_PLATFORM_X11)
|
||||
return EGL_FALSE;
|
||||
|
||||
/* this is a fallback driver */
|
||||
if (!disp->Options.UseFallback)
|
||||
return EGL_FALSE;
|
||||
|
||||
if (disp->Options.TestOnly)
|
||||
return EGL_TRUE;
|
||||
|
||||
GLX_dpy = CALLOC_STRUCT(GLX_egl_display);
|
||||
if (!GLX_dpy)
|
||||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
@@ -610,8 +549,7 @@ GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
}
|
||||
}
|
||||
|
||||
if (!GLX_drv->glXQueryVersion(GLX_dpy->dpy,
|
||||
&GLX_dpy->glx_maj, &GLX_dpy->glx_min)) {
|
||||
if (!glXQueryVersion(GLX_dpy->dpy, &GLX_dpy->glx_maj, &GLX_dpy->glx_min)) {
|
||||
_eglLog(_EGL_WARNING, "GLX: glXQueryVersion failed");
|
||||
if (!disp->PlatformDisplay)
|
||||
XCloseDisplay(GLX_dpy->dpy);
|
||||
@@ -619,13 +557,10 @@ GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
disp->DriverData = (void *) GLX_dpy;
|
||||
disp->ClientAPIs = EGL_OPENGL_BIT;
|
||||
check_extensions(GLX_dpy, DefaultScreen(GLX_dpy->dpy));
|
||||
check_quirks(GLX_dpy, DefaultScreen(GLX_dpy->dpy));
|
||||
|
||||
check_extensions(GLX_drv, GLX_dpy, DefaultScreen(GLX_dpy->dpy));
|
||||
check_quirks(GLX_drv, GLX_dpy, DefaultScreen(GLX_dpy->dpy));
|
||||
|
||||
create_configs(drv, disp, DefaultScreen(GLX_dpy->dpy));
|
||||
create_configs(disp, GLX_dpy, DefaultScreen(GLX_dpy->dpy));
|
||||
if (!_eglGetArraySize(disp->Configs)) {
|
||||
_eglLog(_EGL_WARNING, "GLX: failed to create any config");
|
||||
if (!disp->PlatformDisplay)
|
||||
@@ -634,14 +569,16 @@ GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
disp->DriverData = (void *) GLX_dpy;
|
||||
disp->ClientAPIsMask = EGL_OPENGL_BIT;
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
*major = 1;
|
||||
*minor = 4;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called via eglTerminate(), drv->API.Terminate().
|
||||
*/
|
||||
@@ -675,11 +612,12 @@ static _EGLContext *
|
||||
GLX_eglCreateContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
_EGLContext *share_list, const EGLint *attrib_list)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_context *GLX_ctx = CALLOC_STRUCT(GLX_egl_context);
|
||||
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
|
||||
struct GLX_egl_context *GLX_ctx_shared = GLX_egl_context(share_list);
|
||||
|
||||
(void) drv;
|
||||
|
||||
if (!GLX_ctx) {
|
||||
_eglError(EGL_BAD_ALLOC, "eglCreateContext");
|
||||
return NULL;
|
||||
@@ -690,19 +628,19 @@ GLX_eglCreateContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (GLX_dpy->have_fbconfig) {
|
||||
GLX_ctx->context = GLX_drv->glXCreateNewContext(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
GLX_RGBA_TYPE,
|
||||
GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
|
||||
GL_TRUE);
|
||||
}
|
||||
else {
|
||||
GLX_ctx->context = GLX_drv->glXCreateContext(GLX_dpy->dpy,
|
||||
&GLX_dpy->visuals[GLX_egl_config_index(conf)],
|
||||
GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
|
||||
GL_TRUE);
|
||||
}
|
||||
if (GLX_dpy->have_fbconfig)
|
||||
GLX_ctx->context =
|
||||
glXCreateNewContext(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
GLX_RGBA_TYPE,
|
||||
GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
|
||||
GL_TRUE);
|
||||
else
|
||||
GLX_ctx->context =
|
||||
glXCreateContext(GLX_dpy->dpy,
|
||||
&GLX_dpy->visuals[GLX_egl_config_index(conf)],
|
||||
GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
|
||||
GL_TRUE);
|
||||
if (!GLX_ctx->context) {
|
||||
free(GLX_ctx);
|
||||
return NULL;
|
||||
@@ -735,7 +673,6 @@ static EGLBoolean
|
||||
GLX_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
|
||||
_EGLSurface *rsurf, _EGLContext *ctx)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
|
||||
struct GLX_egl_surface *GLX_dsurf = GLX_egl_surface(dsurf);
|
||||
struct GLX_egl_surface *GLX_rsurf = GLX_egl_surface(rsurf);
|
||||
@@ -746,6 +683,8 @@ GLX_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
|
||||
GLXContext cctx;
|
||||
EGLBoolean ret = EGL_FALSE;
|
||||
|
||||
(void) drv;
|
||||
|
||||
/* make new bindings */
|
||||
if (!_eglBindContext(ctx, dsurf, rsurf, &old_ctx, &old_dsurf, &old_rsurf))
|
||||
return EGL_FALSE;
|
||||
@@ -755,9 +694,9 @@ GLX_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
|
||||
cctx = (GLX_ctx) ? GLX_ctx->context : NULL;
|
||||
|
||||
if (GLX_dpy->have_make_current_read)
|
||||
ret = GLX_drv->glXMakeContextCurrent(GLX_dpy->dpy, ddraw, rdraw, cctx);
|
||||
ret = glXMakeContextCurrent(GLX_dpy->dpy, ddraw, rdraw, cctx);
|
||||
else if (ddraw == rdraw)
|
||||
ret = GLX_drv->glXMakeCurrent(GLX_dpy->dpy, ddraw, cctx);
|
||||
ret = glXMakeCurrent(GLX_dpy->dpy, ddraw, cctx);
|
||||
|
||||
if (ret) {
|
||||
if (_eglPutSurface(old_dsurf))
|
||||
@@ -808,11 +747,12 @@ GLX_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativeWindowType window,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
|
||||
struct GLX_egl_surface *GLX_surf;
|
||||
uint width, height;
|
||||
|
||||
(void) drv;
|
||||
|
||||
GLX_surf = CALLOC_STRUCT(GLX_egl_surface);
|
||||
if (!GLX_surf) {
|
||||
_eglError(EGL_BAD_ALLOC, "eglCreateWindowSurface");
|
||||
@@ -827,14 +767,13 @@ GLX_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
|
||||
GLX_surf->drawable = window;
|
||||
|
||||
if (GLX_dpy->have_1_3 && !GLX_dpy->glx_window_quirk) {
|
||||
GLX_surf->glx_drawable = GLX_drv->glXCreateWindow(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
GLX_surf->drawable, NULL);
|
||||
}
|
||||
else {
|
||||
if (GLX_dpy->have_1_3 && !GLX_dpy->glx_window_quirk)
|
||||
GLX_surf->glx_drawable =
|
||||
glXCreateWindow(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
GLX_surf->drawable, NULL);
|
||||
else
|
||||
GLX_surf->glx_drawable = GLX_surf->drawable;
|
||||
}
|
||||
|
||||
if (!GLX_surf->glx_drawable) {
|
||||
free(GLX_surf);
|
||||
@@ -842,7 +781,7 @@ GLX_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
}
|
||||
|
||||
if (GLX_dpy->have_1_3 && !GLX_dpy->glx_window_quirk)
|
||||
GLX_surf->destroy = GLX_drv->glXDestroyWindow;
|
||||
GLX_surf->destroy = glXDestroyWindow;
|
||||
|
||||
get_drawable_size(GLX_dpy->dpy, window, &width, &height);
|
||||
GLX_surf->Base.Width = width;
|
||||
@@ -856,11 +795,12 @@ GLX_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativePixmapType pixmap,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
|
||||
struct GLX_egl_surface *GLX_surf;
|
||||
uint width, height;
|
||||
|
||||
(void) drv;
|
||||
|
||||
GLX_surf = CALLOC_STRUCT(GLX_egl_surface);
|
||||
if (!GLX_surf) {
|
||||
_eglError(EGL_BAD_ALLOC, "eglCreatePixmapSurface");
|
||||
@@ -876,25 +816,25 @@ GLX_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
GLX_surf->drawable = pixmap;
|
||||
|
||||
if (GLX_dpy->have_1_3) {
|
||||
GLX_surf->glx_drawable = GLX_drv->glXCreatePixmap(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
GLX_surf->drawable, NULL);
|
||||
GLX_surf->glx_drawable =
|
||||
glXCreatePixmap(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
GLX_surf->drawable, NULL);
|
||||
}
|
||||
else if (GLX_dpy->have_fbconfig) {
|
||||
GLXFBConfig fbconfig = GLX_dpy->fbconfigs[GLX_egl_config_index(conf)];
|
||||
XVisualInfo *vinfo;
|
||||
|
||||
vinfo = GLX_drv->glXGetVisualFromFBConfig(GLX_dpy->dpy, fbconfig);
|
||||
XVisualInfo *vinfo = glXGetVisualFromFBConfig(GLX_dpy->dpy, fbconfig);
|
||||
if (vinfo) {
|
||||
GLX_surf->glx_drawable = GLX_drv->glXCreateGLXPixmap(GLX_dpy->dpy,
|
||||
vinfo, GLX_surf->drawable);
|
||||
GLX_surf->glx_drawable =
|
||||
glXCreateGLXPixmap(GLX_dpy->dpy, vinfo, GLX_surf->drawable);
|
||||
XFree(vinfo);
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLX_surf->glx_drawable = GLX_drv->glXCreateGLXPixmap(GLX_dpy->dpy,
|
||||
&GLX_dpy->visuals[GLX_egl_config_index(conf)],
|
||||
GLX_surf->drawable);
|
||||
GLX_surf->glx_drawable =
|
||||
glXCreateGLXPixmap(GLX_dpy->dpy,
|
||||
&GLX_dpy->visuals[GLX_egl_config_index(conf)],
|
||||
GLX_surf->drawable);
|
||||
}
|
||||
|
||||
if (!GLX_surf->glx_drawable) {
|
||||
@@ -903,7 +843,7 @@ GLX_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
}
|
||||
|
||||
GLX_surf->destroy = (GLX_dpy->have_1_3) ?
|
||||
GLX_drv->glXDestroyPixmap : GLX_drv->glXDestroyGLXPixmap;
|
||||
glXDestroyPixmap : glXDestroyGLXPixmap;
|
||||
|
||||
get_drawable_size(GLX_dpy->dpy, pixmap, &width, &height);
|
||||
GLX_surf->Base.Width = width;
|
||||
@@ -916,12 +856,13 @@ static _EGLSurface *
|
||||
GLX_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, const EGLint *attrib_list)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
|
||||
struct GLX_egl_surface *GLX_surf;
|
||||
int attribs[5];
|
||||
int i;
|
||||
|
||||
(void) drv;
|
||||
|
||||
GLX_surf = CALLOC_STRUCT(GLX_egl_surface);
|
||||
if (!GLX_surf) {
|
||||
_eglError(EGL_BAD_ALLOC, "eglCreatePbufferSurface");
|
||||
@@ -951,11 +892,14 @@ GLX_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
}
|
||||
attribs[i] = None;
|
||||
|
||||
GLX_surf->glx_drawable = GLX_drv->glXCreatePbuffer(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)], attribs);
|
||||
GLX_surf->glx_drawable =
|
||||
glXCreatePbuffer(GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
attribs);
|
||||
}
|
||||
else if (GLX_dpy->have_pbuffer) {
|
||||
GLX_surf->glx_drawable = GLX_drv->glXCreateGLXPbufferSGIX(GLX_dpy->dpy,
|
||||
GLX_surf->glx_drawable = GLX_dpy->glXCreateGLXPbufferSGIX(
|
||||
GLX_dpy->dpy,
|
||||
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
|
||||
GLX_surf->Base.Width,
|
||||
GLX_surf->Base.Height,
|
||||
@@ -968,7 +912,7 @@ GLX_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
}
|
||||
|
||||
GLX_surf->destroy = (GLX_dpy->have_1_3) ?
|
||||
GLX_drv->glXDestroyPbuffer : GLX_drv->glXDestroyGLXPbufferSGIX;
|
||||
glXDestroyPbuffer : GLX_dpy->glXDestroyGLXPbufferSGIX;
|
||||
|
||||
return &GLX_surf->Base;
|
||||
}
|
||||
@@ -989,11 +933,12 @@ GLX_eglDestroySurface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
static EGLBoolean
|
||||
GLX_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
|
||||
struct GLX_egl_surface *GLX_surf = GLX_egl_surface(draw);
|
||||
|
||||
GLX_drv->glXSwapBuffers(GLX_dpy->dpy, GLX_surf->glx_drawable);
|
||||
(void) drv;
|
||||
|
||||
glXSwapBuffers(GLX_dpy->dpy, GLX_surf->glx_drawable);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
@@ -1004,33 +949,31 @@ GLX_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
static _EGLProc
|
||||
GLX_eglGetProcAddress(_EGLDriver *drv, const char *procname)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
(void) drv;
|
||||
|
||||
return (_EGLProc) GLX_drv->glXGetProcAddress((const GLubyte *) procname);
|
||||
return (_EGLProc) glXGetProcAddress((const GLubyte *) procname);
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
GLX_eglWaitClient(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
|
||||
(void) drv;
|
||||
(void) dpy;
|
||||
(void) ctx;
|
||||
|
||||
GLX_drv->glXWaitGL();
|
||||
glXWaitGL();
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
GLX_eglWaitNative(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
|
||||
(void) drv;
|
||||
(void) dpy;
|
||||
|
||||
if (engine != EGL_CORE_NATIVE_ENGINE)
|
||||
return _eglError(EGL_BAD_PARAMETER, "eglWaitNative");
|
||||
GLX_drv->glXWaitX();
|
||||
glXWaitX();
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
@@ -1038,90 +981,16 @@ static void
|
||||
GLX_Unload(_EGLDriver *drv)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
|
||||
if (GLX_drv->handle)
|
||||
dlclose(GLX_drv->handle);
|
||||
free(GLX_drv);
|
||||
}
|
||||
|
||||
|
||||
static EGLBoolean
|
||||
GLX_Load(_EGLDriver *drv)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
|
||||
void *handle;
|
||||
|
||||
handle = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL);
|
||||
if (!handle)
|
||||
goto fail;
|
||||
|
||||
GLX_drv->glXGetProcAddress = dlsym(handle, "glXGetProcAddress");
|
||||
if (!GLX_drv->glXGetProcAddress)
|
||||
GLX_drv->glXGetProcAddress = dlsym(handle, "glXGetProcAddressARB");
|
||||
if (!GLX_drv->glXGetProcAddress)
|
||||
goto fail;
|
||||
|
||||
#define GET_PROC(proc_type, proc_name, check) \
|
||||
do { \
|
||||
GLX_drv->proc_name = (proc_type) \
|
||||
GLX_drv->glXGetProcAddress((const GLubyte *) #proc_name); \
|
||||
if (check && !GLX_drv->proc_name) goto fail; \
|
||||
} while (0)
|
||||
|
||||
/* GLX 1.0 */
|
||||
GET_PROC(GLXCREATECONTEXTPROC, glXCreateContext, EGL_TRUE);
|
||||
GET_PROC(GLXDESTROYCONTEXTPROC, glXDestroyContext, EGL_TRUE);
|
||||
GET_PROC(GLXMAKECURRENTPROC, glXMakeCurrent, EGL_TRUE);
|
||||
GET_PROC(GLXSWAPBUFFERSPROC, glXSwapBuffers, EGL_TRUE);
|
||||
GET_PROC(GLXCREATEGLXPIXMAPPROC, glXCreateGLXPixmap, EGL_TRUE);
|
||||
GET_PROC(GLXDESTROYGLXPIXMAPPROC, glXDestroyGLXPixmap, EGL_TRUE);
|
||||
GET_PROC(GLXQUERYVERSIONPROC, glXQueryVersion, EGL_TRUE);
|
||||
GET_PROC(GLXGETCONFIGPROC, glXGetConfig, EGL_TRUE);
|
||||
GET_PROC(GLXWAITGLPROC, glXWaitGL, EGL_TRUE);
|
||||
GET_PROC(GLXWAITXPROC, glXWaitX, EGL_TRUE);
|
||||
|
||||
/* GLX 1.1 */
|
||||
GET_PROC(GLXQUERYEXTENSIONSSTRINGPROC, glXQueryExtensionsString, EGL_TRUE);
|
||||
GET_PROC(GLXQUERYSERVERSTRINGPROC, glXQueryServerString, EGL_TRUE);
|
||||
GET_PROC(GLXGETCLIENTSTRINGPROC, glXGetClientString, EGL_TRUE);
|
||||
|
||||
/* GLX 1.3 */
|
||||
GET_PROC(PFNGLXGETFBCONFIGSPROC, glXGetFBConfigs, EGL_FALSE);
|
||||
GET_PROC(PFNGLXGETFBCONFIGATTRIBPROC, glXGetFBConfigAttrib, EGL_FALSE);
|
||||
GET_PROC(PFNGLXGETVISUALFROMFBCONFIGPROC, glXGetVisualFromFBConfig, EGL_FALSE);
|
||||
GET_PROC(PFNGLXCREATEWINDOWPROC, glXCreateWindow, EGL_FALSE);
|
||||
GET_PROC(PFNGLXDESTROYWINDOWPROC, glXDestroyWindow, EGL_FALSE);
|
||||
GET_PROC(PFNGLXCREATEPIXMAPPROC, glXCreatePixmap, EGL_FALSE);
|
||||
GET_PROC(PFNGLXDESTROYPIXMAPPROC, glXDestroyPixmap, EGL_FALSE);
|
||||
GET_PROC(PFNGLXCREATEPBUFFERPROC, glXCreatePbuffer, EGL_FALSE);
|
||||
GET_PROC(PFNGLXDESTROYPBUFFERPROC, glXDestroyPbuffer, EGL_FALSE);
|
||||
GET_PROC(PFNGLXCREATENEWCONTEXTPROC, glXCreateNewContext, EGL_FALSE);
|
||||
GET_PROC(PFNGLXMAKECONTEXTCURRENTPROC, glXMakeContextCurrent, EGL_FALSE);
|
||||
|
||||
/* GLX_SGIX_pbuffer */
|
||||
GET_PROC(PFNGLXCREATEGLXPBUFFERSGIXPROC,
|
||||
glXCreateGLXPbufferSGIX, EGL_FALSE);
|
||||
GET_PROC(PFNGLXDESTROYGLXPBUFFERSGIXPROC,
|
||||
glXDestroyGLXPbufferSGIX, EGL_FALSE);
|
||||
#undef GET_PROC
|
||||
|
||||
GLX_drv->handle = handle;
|
||||
|
||||
return EGL_TRUE;
|
||||
|
||||
fail:
|
||||
if (handle)
|
||||
dlclose(handle);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the main entrypoint into the driver, called by libEGL.
|
||||
* Create a new _EGLDriver object and init its dispatch table.
|
||||
*/
|
||||
_EGLDriver *
|
||||
_EGL_MAIN(const char *args)
|
||||
_eglMain(const char *args)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = CALLOC_STRUCT(GLX_egl_driver);
|
||||
|
||||
@@ -1130,12 +999,6 @@ _EGL_MAIN(const char *args)
|
||||
if (!GLX_drv)
|
||||
return NULL;
|
||||
|
||||
if (!GLX_Load(&GLX_drv->Base)) {
|
||||
_eglLog(_EGL_WARNING, "GLX: failed to load GLX");
|
||||
free(GLX_drv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_eglInitDriverFallbacks(&GLX_drv->Base);
|
||||
GLX_drv->Base.API.Initialize = GLX_eglInitialize;
|
||||
GLX_drv->Base.API.Terminate = GLX_eglTerminate;
|
||||
|
@@ -52,31 +52,12 @@ OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
# use dl*() to load drivers
|
||||
LOCAL_CFLAGS = -D_EGL_OS_UNIX=1
|
||||
LOCAL_LIBS =
|
||||
|
||||
# egl_dri2 and egl_glx are built-ins
|
||||
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 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
|
||||
EGL_LIB_DEPS += $(X11_LIBS) $(DLOPEN_LIBS)
|
||||
endif
|
||||
|
||||
# translate --with-egl-platforms to _EGLPlatformType
|
||||
EGL_NATIVE_PLATFORM=_EGL_INVALID_PLATFORM
|
||||
ifeq ($(firstword $(EGL_PLATFORMS)),x11)
|
||||
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11
|
||||
endif
|
||||
ifeq ($(firstword $(EGL_PLATFORMS)),wayland)
|
||||
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WAYLAND
|
||||
endif
|
||||
ifeq ($(firstword $(EGL_PLATFORMS)),drm)
|
||||
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_DRM
|
||||
endif
|
||||
@@ -99,12 +80,11 @@ default: depend library
|
||||
# EGL Library
|
||||
library: $(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME)
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
|
||||
$(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME): $(OBJECTS)
|
||||
$(MKLIB) -o $(EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
-major $(EGL_MAJOR) -minor $(EGL_MINOR) \
|
||||
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
-L$(TOP)/$(LIB_DIR) $(EGL_LIB_DEPS) \
|
||||
$(OBJECTS) $(LOCAL_LIBS)
|
||||
$(EGL_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
install-headers:
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/KHR
|
||||
|
@@ -7,23 +7,13 @@ Import('*')
|
||||
env = env.Clone()
|
||||
|
||||
env.Append(CPPDEFINES = [
|
||||
'_EGL_BUILT_IN_DRIVER_GALLIUM',
|
||||
'_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WINDOWS',
|
||||
'_EGL_DRIVER_SEARCH_DIR=\\"\\"',
|
||||
'_EGL_OS_WINDOWS',
|
||||
'_EGL_GET_CORE_ADDRESSES',
|
||||
'KHRONOS_DLL_EXPORTS',
|
||||
])
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
env.Append(CPPDEFINES = [
|
||||
'_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WINDOWS',
|
||||
'_EGL_OS_WINDOWS',
|
||||
'_EGL_GET_CORE_ADDRESSES',
|
||||
'KHRONOS_DLL_EXPORTS',
|
||||
])
|
||||
else:
|
||||
env.Append(CPPDEFINES = [
|
||||
'_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11',
|
||||
'_EGL_OS_UNIX',
|
||||
])
|
||||
|
||||
env.Append(CPPPATH = [
|
||||
'#/include',
|
||||
])
|
||||
@@ -48,9 +38,15 @@ egl_sources = [
|
||||
'eglsync.c',
|
||||
]
|
||||
|
||||
egl = env.ConvenienceLibrary(
|
||||
target = 'egl',
|
||||
source = egl_sources,
|
||||
egl = env.SharedLibrary(
|
||||
target = 'libEGL',
|
||||
source = egl_sources + ['egl.def'],
|
||||
)
|
||||
|
||||
installed_egl = env.InstallSharedLibrary(egl, version=(1, 4, 0))
|
||||
|
||||
env.Alias('egl', installed_egl)
|
||||
|
||||
egl = [env.FindIxes(egl, 'LIBPREFIX', 'LIBSUFFIX')]
|
||||
|
||||
Export('egl')
|
||||
|
@@ -57,6 +57,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "eglstring.h"
|
||||
#include "eglcontext.h"
|
||||
#include "egldisplay.h"
|
||||
#include "egltypedefs.h"
|
||||
@@ -293,14 +294,16 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
|
||||
if (!_eglMatchDriver(disp, EGL_FALSE))
|
||||
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
|
||||
|
||||
_eglsnprintf(disp->Version, sizeof(disp->Version), "%d.%d (%s)",
|
||||
disp->APImajor, disp->APIminor, disp->Driver->Name);
|
||||
/* limit to APIs supported by core */
|
||||
disp->ClientAPIs &= _EGL_API_ALL_BITS;
|
||||
disp->ClientAPIsMask &= _EGL_API_ALL_BITS;
|
||||
}
|
||||
|
||||
/* Update applications version of major and minor if not NULL */
|
||||
if ((major != NULL) && (minor != NULL)) {
|
||||
*major = disp->VersionMajor;
|
||||
*minor = disp->VersionMinor;
|
||||
*major = disp->APImajor;
|
||||
*minor = disp->APIminor;
|
||||
}
|
||||
|
||||
RETURN_EGL_SUCCESS(disp, EGL_TRUE);
|
||||
@@ -914,9 +917,11 @@ eglGetProcAddress(const char *procname)
|
||||
{ "eglCreateDRMImageMESA", (_EGLProc) eglCreateDRMImageMESA },
|
||||
{ "eglExportDRMImageMESA", (_EGLProc) eglExportDRMImageMESA },
|
||||
#endif
|
||||
#ifdef EGL_WL_bind_display
|
||||
{ "eglBindWaylandDisplayWL", (_EGLProc) eglBindWaylandDisplayWL },
|
||||
{ "eglUnbindWaylandDisplayWL", (_EGLProc) eglUnbindWaylandDisplayWL },
|
||||
#ifdef EGL_ANDROID_swap_rectangle
|
||||
{ "eglSetSwapRectangleANDROID", (_EGLProc) eglSetSwapRectangleANDROID },
|
||||
#endif
|
||||
#ifdef EGL_ANDROID_get_render_buffer
|
||||
{ "eglGetRenderBufferANDROID", (_EGLProc) eglGetRenderBufferANDROID },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
@@ -1496,42 +1501,48 @@ eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image,
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef EGL_WL_bind_wayland_display
|
||||
struct wl_display;
|
||||
#ifdef EGL_ANDROID_swap_rectangle
|
||||
|
||||
EGLBoolean EGLAPIENTRY
|
||||
eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
|
||||
eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
|
||||
EGLint left, EGLint top,
|
||||
EGLint width, EGLint height)
|
||||
{
|
||||
_EGLDisplay *disp = _eglLockDisplay(dpy);
|
||||
_EGLSurface *surf = _eglLookupSurface(draw, disp);
|
||||
_EGLDriver *drv;
|
||||
EGLBoolean ret;
|
||||
|
||||
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
|
||||
assert(disp->Extensions.WL_bind_wayland_display);
|
||||
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
|
||||
|
||||
if (!display)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
|
||||
if (!disp->Extensions.ANDROID_swap_rectangle)
|
||||
RETURN_EGL_EVAL(disp, EGL_FALSE);
|
||||
|
||||
ret = drv->API.BindWaylandDisplayWL(drv, disp, display);
|
||||
ret = drv->API.SetSwapRectangleANDROID(drv, disp, surf, left, top, width, height);
|
||||
|
||||
RETURN_EGL_EVAL(disp, ret);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef EGL_ANDROID_get_render_buffer
|
||||
|
||||
EGLClientBuffer EGLAPIENTRY
|
||||
eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw)
|
||||
{
|
||||
_EGLDisplay *disp = _eglLockDisplay(dpy);
|
||||
_EGLSurface *surf = _eglLookupSurface(draw, disp);
|
||||
_EGLDriver *drv;
|
||||
EGLClientBuffer ret;
|
||||
|
||||
_EGL_CHECK_SURFACE(disp, surf, NULL, drv);
|
||||
|
||||
if (!disp->Extensions.ANDROID_get_render_buffer)
|
||||
RETURN_EGL_EVAL(disp, NULL);
|
||||
|
||||
ret = drv->API.GetRenderBufferANDROID(drv, disp, surf);
|
||||
|
||||
RETURN_EGL_EVAL(disp, ret);
|
||||
}
|
||||
|
||||
EGLBoolean EGLAPIENTRY
|
||||
eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
|
||||
{
|
||||
_EGLDisplay *disp = _eglLockDisplay(dpy);
|
||||
_EGLDriver *drv;
|
||||
EGLBoolean ret;
|
||||
|
||||
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
|
||||
assert(disp->Extensions.WL_bind_wayland_display);
|
||||
|
||||
if (!display)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
|
||||
|
||||
ret = drv->API.UnbindWaylandDisplayWL(drv, disp, display);
|
||||
|
||||
RETURN_EGL_EVAL(disp, ret);
|
||||
}
|
||||
#endif
|
||||
|
@@ -12,7 +12,7 @@ typedef void (*_EGLProc)(void);
|
||||
*/
|
||||
|
||||
/* driver funcs */
|
||||
typedef EGLBoolean (*Initialize_t)(_EGLDriver *, _EGLDisplay *dpy);
|
||||
typedef EGLBoolean (*Initialize_t)(_EGLDriver *, _EGLDisplay *dpy, EGLint *major, EGLint *minor);
|
||||
typedef EGLBoolean (*Terminate_t)(_EGLDriver *, _EGLDisplay *dpy);
|
||||
|
||||
/* config funcs */
|
||||
@@ -95,10 +95,12 @@ typedef _EGLImage *(*CreateDRMImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, c
|
||||
typedef EGLBoolean (*ExportDRMImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, EGLint *name, EGLint *handle, EGLint *stride);
|
||||
#endif
|
||||
|
||||
#ifdef EGL_WL_bind_wayland_display
|
||||
struct wl_display;
|
||||
typedef EGLBoolean (*BindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
|
||||
typedef EGLBoolean (*UnbindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
|
||||
#ifdef EGL_ANDROID_swap_rectangle
|
||||
typedef EGLBoolean (*SetSwapRectangleANDROID_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw, EGLint left, EGLint top, EGLint width, EGLint height);
|
||||
#endif
|
||||
|
||||
#ifdef EGL_ANDROID_get_render_buffer
|
||||
typedef EGLClientBuffer (*GetRenderBufferANDROID_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -176,9 +178,11 @@ struct _egl_api
|
||||
ExportDRMImageMESA_t ExportDRMImageMESA;
|
||||
#endif
|
||||
|
||||
#ifdef EGL_WL_bind_wayland_display
|
||||
BindWaylandDisplayWL_t BindWaylandDisplayWL;
|
||||
UnbindWaylandDisplayWL_t UnbindWaylandDisplayWL;
|
||||
#ifdef EGL_ANDROID_swap_rectangle
|
||||
SetSwapRectangleANDROID_t SetSwapRectangleANDROID;
|
||||
#endif
|
||||
#ifdef EGL_ANDROID_get_render_buffer
|
||||
GetRenderBufferANDROID_t GetRenderBufferANDROID;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -286,9 +286,6 @@ _eglError(EGLint errCode, const char *msg)
|
||||
case EGL_BAD_SURFACE:
|
||||
s = "EGL_BAD_SURFACE";
|
||||
break;
|
||||
case EGL_NOT_INITIALIZED:
|
||||
s = "EGL_NOT_INITIALIZED";
|
||||
break;
|
||||
#ifdef EGL_MESA_screen_surface
|
||||
case EGL_BAD_SCREEN_MESA:
|
||||
s = "EGL_BAD_SCREEN_MESA";
|
||||
@@ -298,7 +295,7 @@ _eglError(EGLint errCode, const char *msg)
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
s = "other EGL error";
|
||||
s = "other";
|
||||
}
|
||||
_eglLog(_EGL_DEBUG, "EGL user error 0x%x (%s) in %s\n", errCode, s, msg);
|
||||
}
|
||||
|
@@ -27,9 +27,9 @@ _eglGetNativePlatformFromEnv(void)
|
||||
} egl_platforms[_EGL_NUM_PLATFORMS] = {
|
||||
{ _EGL_PLATFORM_WINDOWS, "gdi" },
|
||||
{ _EGL_PLATFORM_X11, "x11" },
|
||||
{ _EGL_PLATFORM_WAYLAND, "wayland" },
|
||||
{ _EGL_PLATFORM_DRM, "drm" },
|
||||
{ _EGL_PLATFORM_FBDEV, "fbdev" }
|
||||
{ _EGL_PLATFORM_FBDEV, "fbdev" },
|
||||
{ _EGL_PLATFORM_ANDROID, "android" }
|
||||
};
|
||||
_EGLPlatformType plat = _EGL_INVALID_PLATFORM;
|
||||
const char *plat_name;
|
||||
|
@@ -11,9 +11,9 @@
|
||||
enum _egl_platform_type {
|
||||
_EGL_PLATFORM_WINDOWS,
|
||||
_EGL_PLATFORM_X11,
|
||||
_EGL_PLATFORM_WAYLAND,
|
||||
_EGL_PLATFORM_DRM,
|
||||
_EGL_PLATFORM_FBDEV,
|
||||
_EGL_PLATFORM_ANDROID,
|
||||
|
||||
_EGL_NUM_PLATFORMS,
|
||||
_EGL_INVALID_PLATFORM = -1
|
||||
@@ -58,8 +58,6 @@ struct _egl_extensions
|
||||
EGLBoolean MESA_drm_display;
|
||||
EGLBoolean MESA_drm_image;
|
||||
|
||||
EGLBoolean WL_bind_wayland_display;
|
||||
|
||||
EGLBoolean KHR_image_base;
|
||||
EGLBoolean KHR_image_pixmap;
|
||||
EGLBoolean KHR_vg_parent_image;
|
||||
@@ -77,6 +75,12 @@ struct _egl_extensions
|
||||
|
||||
EGLBoolean NOK_swap_region;
|
||||
EGLBoolean NOK_texture_from_pixmap;
|
||||
|
||||
EGLBoolean ANDROID_image_native_buffer;
|
||||
EGLBoolean ANDROID_swap_rectangle;
|
||||
EGLBoolean ANDROID_get_render_buffer;
|
||||
|
||||
char String[_EGL_MAX_EXTENSIONS_LEN];
|
||||
};
|
||||
|
||||
|
||||
@@ -87,29 +91,21 @@ struct _egl_display
|
||||
|
||||
_EGLMutex Mutex;
|
||||
|
||||
_EGLPlatformType Platform; /**< The type of the platform display */
|
||||
void *PlatformDisplay; /**< A pointer to the platform display */
|
||||
_EGLPlatformType Platform;
|
||||
void *PlatformDisplay;
|
||||
|
||||
_EGLDriver *Driver; /**< Matched driver of the display */
|
||||
EGLBoolean Initialized; /**< True if the display is initialized */
|
||||
EGLBoolean Initialized; /**< True if the display is initialized */
|
||||
_EGLDriver *Driver;
|
||||
void *DriverData; /* private to driver */
|
||||
|
||||
/* options that affect how the driver initializes the display */
|
||||
struct {
|
||||
EGLBoolean TestOnly; /**< Driver should not set fields when true */
|
||||
EGLBoolean UseFallback; /**< Use fallback driver (sw or less features) */
|
||||
} Options;
|
||||
int APImajor, APIminor; /**< as returned by eglInitialize() */
|
||||
char Version[1000]; /**< initialized from APImajor/minor, DriverName */
|
||||
|
||||
/* these fields are set by the driver during init */
|
||||
void *DriverData; /**< Driver private data */
|
||||
EGLint VersionMajor; /**< EGL major version */
|
||||
EGLint VersionMinor; /**< EGL minor version */
|
||||
EGLint ClientAPIs; /**< Bitmask of APIs supported (EGL_xxx_BIT) */
|
||||
_EGLExtensions Extensions; /**< Extensions supported */
|
||||
/** Bitmask of supported APIs (EGL_xx_BIT) set by the driver during init */
|
||||
EGLint ClientAPIsMask;
|
||||
char ClientAPIs[1000]; /**< updated by eglQueryString */
|
||||
|
||||
/* these fields are derived from above */
|
||||
char VersionString[1000]; /**< EGL_VERSION */
|
||||
char ClientAPIsString[1000]; /**< EGL_CLIENT_APIS */
|
||||
char ExtensionsString[_EGL_MAX_EXTENSIONS_LEN]; /**< EGL_EXTENSIONS */
|
||||
_EGLExtensions Extensions;
|
||||
|
||||
_EGLArray *Screens;
|
||||
_EGLArray *Configs;
|
||||
|
@@ -25,7 +25,6 @@
|
||||
|
||||
typedef struct _egl_module {
|
||||
char *Path;
|
||||
_EGLMain_t BuiltIn;
|
||||
void *Handle;
|
||||
_EGLDriver *Driver;
|
||||
} _EGLModule;
|
||||
@@ -33,21 +32,6 @@ typedef struct _egl_module {
|
||||
static _EGL_DECLARE_MUTEX(_eglModuleMutex);
|
||||
static _EGLArray *_eglModules;
|
||||
|
||||
const struct {
|
||||
const char *name;
|
||||
_EGLMain_t main;
|
||||
} _eglBuiltInDrivers[] = {
|
||||
#ifdef _EGL_BUILT_IN_DRIVER_GALLIUM
|
||||
{ "egl_gallium", _eglBuiltInDriverGALLIUM },
|
||||
#endif
|
||||
#ifdef _EGL_BUILT_IN_DRIVER_DRI2
|
||||
{ "egl_dri2", _eglBuiltInDriverDRI2 },
|
||||
#endif
|
||||
#ifdef _EGL_BUILT_IN_DRIVER_GLX
|
||||
{ "egl_glx", _eglBuiltInDriverGLX },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrappers for dlopen/dlclose()
|
||||
@@ -102,6 +86,30 @@ library_suffix(void)
|
||||
}
|
||||
|
||||
|
||||
#else /* _EGL_PLATFORM_NO_OS */
|
||||
|
||||
|
||||
typedef void *lib_handle;
|
||||
|
||||
static INLINE void *
|
||||
open_library(const char *filename)
|
||||
{
|
||||
return (void *) filename;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
close_library(void *lib)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
library_suffix(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,11 +147,16 @@ _eglOpenLibrary(const char *driverPath, lib_handle *handle)
|
||||
else {
|
||||
error = dlerror();
|
||||
}
|
||||
#else /* _EGL_PLATFORM_NO_OS */
|
||||
mainFunc = (_EGLMain_t) _eglMain;
|
||||
#endif
|
||||
|
||||
if (!lib) {
|
||||
_eglLog(_EGL_WARNING, "Could not open driver %s (%s)",
|
||||
driverPath, error);
|
||||
if (!getenv("EGL_DRIVER"))
|
||||
_eglLog(_EGL_WARNING,
|
||||
"The driver can be overridden by setting EGL_DRIVER");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -170,18 +183,9 @@ _eglLoadModule(_EGLModule *mod)
|
||||
lib_handle lib;
|
||||
_EGLDriver *drv;
|
||||
|
||||
if (mod->Driver)
|
||||
return EGL_TRUE;
|
||||
|
||||
if (mod->BuiltIn) {
|
||||
lib = (lib_handle) NULL;
|
||||
mainFunc = mod->BuiltIn;
|
||||
}
|
||||
else {
|
||||
mainFunc = _eglOpenLibrary(mod->Path, &lib);
|
||||
if (!mainFunc)
|
||||
return EGL_FALSE;
|
||||
}
|
||||
mainFunc = _eglOpenLibrary(mod->Path, &lib);
|
||||
if (!mainFunc)
|
||||
return EGL_FALSE;
|
||||
|
||||
drv = mainFunc(NULL);
|
||||
if (!drv) {
|
||||
@@ -208,22 +212,11 @@ _eglLoadModule(_EGLModule *mod)
|
||||
static void
|
||||
_eglUnloadModule(_EGLModule *mod)
|
||||
{
|
||||
#if defined(_EGL_OS_UNIX)
|
||||
/* destroy the driver */
|
||||
if (mod->Driver && mod->Driver->Unload)
|
||||
mod->Driver->Unload(mod->Driver);
|
||||
|
||||
/*
|
||||
* XXX At this point (atexit), the module might be the last reference to
|
||||
* libEGL. Closing the module might unmap libEGL and give problems.
|
||||
*/
|
||||
#if 0
|
||||
if (mod->Handle)
|
||||
close_library(mod->Handle);
|
||||
#endif
|
||||
#elif defined(_EGL_OS_WINDOWS)
|
||||
/* XXX Windows unloads DLLs before atexit */
|
||||
#endif
|
||||
|
||||
mod->Driver = NULL;
|
||||
mod->Handle = NULL;
|
||||
@@ -334,6 +327,68 @@ _eglLoaderFile(const char *dir, size_t len, void *loader_data)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A loader function for use with _eglPreloadForEach. The loader data is the
|
||||
* pattern (prefix) of the files to look for.
|
||||
*/
|
||||
static EGLBoolean
|
||||
_eglLoaderPattern(const char *dir, size_t len, void *loader_data)
|
||||
{
|
||||
#if defined(_EGL_OS_UNIX)
|
||||
const char *prefix, *suffix;
|
||||
size_t prefix_len, suffix_len;
|
||||
DIR *dirp;
|
||||
struct dirent *dirent;
|
||||
char path[1024];
|
||||
|
||||
if (len + 2 > sizeof(path))
|
||||
return EGL_TRUE;
|
||||
if (len) {
|
||||
memcpy(path, dir, len);
|
||||
path[len++] = '/';
|
||||
}
|
||||
path[len] = '\0';
|
||||
|
||||
dirp = opendir(path);
|
||||
if (!dirp)
|
||||
return EGL_TRUE;
|
||||
|
||||
prefix = (const char *) loader_data;
|
||||
prefix_len = strlen(prefix);
|
||||
suffix = library_suffix();
|
||||
suffix_len = (suffix) ? strlen(suffix) : 0;
|
||||
|
||||
while ((dirent = readdir(dirp))) {
|
||||
size_t dirent_len = strlen(dirent->d_name);
|
||||
const char *p;
|
||||
|
||||
/* match the prefix */
|
||||
if (strncmp(dirent->d_name, prefix, prefix_len) != 0)
|
||||
continue;
|
||||
/* match the suffix */
|
||||
if (suffix) {
|
||||
p = dirent->d_name + dirent_len - suffix_len;
|
||||
if (p < dirent->d_name || strcmp(p, suffix) != 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* make a full path and add it to the module array */
|
||||
if (len + dirent_len + 1 <= sizeof(path)) {
|
||||
strcpy(path + len, dirent->d_name);
|
||||
_eglAddModule(path);
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dirp);
|
||||
|
||||
return EGL_TRUE;
|
||||
#else /* _EGL_OS_UNIX */
|
||||
/* stop immediately */
|
||||
return EGL_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run the callback function on each driver directory.
|
||||
*
|
||||
@@ -432,12 +487,11 @@ _eglGetSearchPath(void)
|
||||
*
|
||||
* The user driver is specified by EGL_DRIVER.
|
||||
*/
|
||||
static EGLBoolean
|
||||
static void
|
||||
_eglAddUserDriver(void)
|
||||
{
|
||||
const char *search_path = _eglGetSearchPath();
|
||||
char *env;
|
||||
size_t name_len = 0;
|
||||
|
||||
env = getenv("EGL_DRIVER");
|
||||
#if defined(_EGL_OS_UNIX)
|
||||
@@ -449,73 +503,39 @@ _eglAddUserDriver(void)
|
||||
env = NULL;
|
||||
}
|
||||
}
|
||||
else if (env) {
|
||||
char *suffix = strchr(env, '.');
|
||||
name_len = (suffix) ? suffix - env : strlen(env);
|
||||
}
|
||||
#else
|
||||
if (env)
|
||||
name_len = strlen(env);
|
||||
#endif /* _EGL_OS_UNIX */
|
||||
|
||||
/*
|
||||
* Try built-in drivers first if we know the driver name. This makes sure
|
||||
* we do not load the outdated external driver that is still on the
|
||||
* filesystem.
|
||||
*/
|
||||
if (name_len) {
|
||||
_EGLModule *mod;
|
||||
EGLint i;
|
||||
|
||||
for (i = 0; _eglBuiltInDrivers[i].name; i++) {
|
||||
if (strlen(_eglBuiltInDrivers[i].name) == name_len &&
|
||||
!strncmp(_eglBuiltInDrivers[i].name, env, name_len)) {
|
||||
mod = _eglAddModule(env);
|
||||
if (mod)
|
||||
mod->BuiltIn = _eglBuiltInDrivers[i].main;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* otherwise, treat env as a path */
|
||||
if (env) {
|
||||
if (env)
|
||||
_eglPreloadForEach(search_path, _eglLoaderFile, (void *) env);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add egl_gallium to the module array.
|
||||
* Add default drivers to the module array.
|
||||
*/
|
||||
static void
|
||||
_eglAddGalliumDriver(void)
|
||||
_eglAddDefaultDrivers(void)
|
||||
{
|
||||
#ifndef _EGL_BUILT_IN_DRIVER_GALLIUM
|
||||
void *external = (void *) "egl_gallium";
|
||||
_eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add built-in drivers to the module array.
|
||||
*/
|
||||
static void
|
||||
_eglAddBuiltInDrivers(void)
|
||||
{
|
||||
_EGLModule *mod;
|
||||
const char *search_path = _eglGetSearchPath();
|
||||
EGLint i;
|
||||
#if defined(_EGL_OS_WINDOWS)
|
||||
const char *DefaultDriverNames[] = {
|
||||
"egl_gallium"
|
||||
};
|
||||
#elif defined(_EGL_OS_UNIX)
|
||||
const char *DefaultDriverNames[] = {
|
||||
"egl_gallium",
|
||||
"egl_dri2",
|
||||
"egl_glx"
|
||||
};
|
||||
#else /* _EGL_PLATFORM_NO_OS */
|
||||
const char *DefaultDriverNames[] = {
|
||||
"<builtin>"
|
||||
};
|
||||
#endif
|
||||
|
||||
for (i = 0; _eglBuiltInDrivers[i].name; i++) {
|
||||
mod = _eglAddModule(_eglBuiltInDrivers[i].name);
|
||||
if (mod)
|
||||
mod->BuiltIn = _eglBuiltInDrivers[i].main;
|
||||
for (i = 0; i < ARRAY_SIZE(DefaultDriverNames); i++) {
|
||||
void *name = (void *) DefaultDriverNames[i];
|
||||
_eglPreloadForEach(search_path, _eglLoaderFile, name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,96 +550,113 @@ _eglAddDrivers(void)
|
||||
if (_eglModules)
|
||||
return EGL_TRUE;
|
||||
|
||||
if (!_eglAddUserDriver()) {
|
||||
/*
|
||||
* Add other drivers only when EGL_DRIVER is not set. The order here
|
||||
* decides the priorities.
|
||||
*/
|
||||
_eglAddGalliumDriver();
|
||||
_eglAddBuiltInDrivers();
|
||||
}
|
||||
/* the order here decides the priorities of the drivers */
|
||||
_eglAddUserDriver();
|
||||
_eglAddDefaultDrivers();
|
||||
_eglPreloadForEach(_eglGetSearchPath(), _eglLoaderPattern, (void *) "egl_");
|
||||
|
||||
return (_eglModules != NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A helper function for _eglMatchDriver. It finds the first driver that can
|
||||
* initialize the display and return.
|
||||
*/
|
||||
static _EGLDriver *
|
||||
_eglMatchAndInitialize(_EGLDisplay *dpy)
|
||||
{
|
||||
_EGLDriver *drv = NULL;
|
||||
EGLint i = 0;
|
||||
|
||||
if (!_eglAddDrivers()) {
|
||||
_eglLog(_EGL_WARNING, "failed to find any driver");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (dpy->Driver) {
|
||||
drv = dpy->Driver;
|
||||
/* no re-matching? */
|
||||
if (!drv->API.Initialize(drv, dpy))
|
||||
drv = NULL;
|
||||
return drv;
|
||||
}
|
||||
|
||||
while (i < _eglModules->Size) {
|
||||
_EGLModule *mod = (_EGLModule *) _eglModules->Elements[i];
|
||||
|
||||
if (!_eglLoadModule(mod)) {
|
||||
/* remove invalid modules */
|
||||
_eglEraseArray(_eglModules, i, _eglFreeModule);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mod->Driver->API.Initialize(mod->Driver, dpy)) {
|
||||
drv = mod->Driver;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return drv;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Match a display to a driver. The display is initialized unless test_only is
|
||||
* true. The matching is done by finding the first driver that can initialize
|
||||
* the display.
|
||||
* Match a display to a driver. The display is initialized unless use_probe is
|
||||
* true.
|
||||
*
|
||||
* The matching is done by finding the first driver that can initialize the
|
||||
* display, or when use_probe is true, the driver with highest score.
|
||||
*/
|
||||
_EGLDriver *
|
||||
_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only)
|
||||
_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean use_probe)
|
||||
{
|
||||
_EGLDriver *best_drv;
|
||||
|
||||
assert(!dpy->Initialized);
|
||||
_EGLModule *mod;
|
||||
_EGLDriver *best_drv = NULL;
|
||||
EGLint best_score = 0;
|
||||
EGLint major, minor, i;
|
||||
|
||||
_eglLockMutex(&_eglModuleMutex);
|
||||
|
||||
/* set options */
|
||||
dpy->Options.TestOnly = test_only;
|
||||
dpy->Options.UseFallback = EGL_FALSE;
|
||||
if (!_eglAddDrivers()) {
|
||||
_eglUnlockMutex(&_eglModuleMutex);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
best_drv = _eglMatchAndInitialize(dpy);
|
||||
/* match the loaded modules */
|
||||
for (i = 0; i < _eglModules->Size; i++) {
|
||||
mod = (_EGLModule *) _eglModules->Elements[i];
|
||||
if (!mod->Driver)
|
||||
break;
|
||||
|
||||
if (use_probe) {
|
||||
EGLint score = (mod->Driver->Probe) ?
|
||||
mod->Driver->Probe(mod->Driver, dpy) : 1;
|
||||
if (score > best_score) {
|
||||
best_drv = mod->Driver;
|
||||
best_score = score;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (mod->Driver->API.Initialize(mod->Driver, dpy, &major, &minor)) {
|
||||
best_drv = mod->Driver;
|
||||
best_score = 100;
|
||||
}
|
||||
}
|
||||
/* perfect match */
|
||||
if (best_score >= 100)
|
||||
break;
|
||||
}
|
||||
|
||||
/* load more modules */
|
||||
if (!best_drv) {
|
||||
dpy->Options.UseFallback = EGL_TRUE;
|
||||
best_drv = _eglMatchAndInitialize(dpy);
|
||||
EGLint first_unloaded = i;
|
||||
|
||||
while (i < _eglModules->Size) {
|
||||
mod = (_EGLModule *) _eglModules->Elements[i];
|
||||
assert(!mod->Driver);
|
||||
|
||||
if (!_eglLoadModule(mod)) {
|
||||
/* remove invalid modules */
|
||||
_eglEraseArray(_eglModules, i, _eglFreeModule);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (use_probe) {
|
||||
best_score = (mod->Driver->Probe) ?
|
||||
mod->Driver->Probe(mod->Driver, dpy) : 1;
|
||||
}
|
||||
else {
|
||||
if (mod->Driver->API.Initialize(mod->Driver, dpy, &major, &minor))
|
||||
best_score = 100;
|
||||
}
|
||||
|
||||
if (best_score > 0) {
|
||||
best_drv = mod->Driver;
|
||||
/* loaded modules come before unloaded ones */
|
||||
if (first_unloaded != i) {
|
||||
void *tmp = _eglModules->Elements[i];
|
||||
_eglModules->Elements[i] =
|
||||
_eglModules->Elements[first_unloaded];
|
||||
_eglModules->Elements[first_unloaded] = tmp;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else {
|
||||
_eglUnloadModule(mod);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_eglUnlockMutex(&_eglModuleMutex);
|
||||
|
||||
if (best_drv) {
|
||||
_eglLog(_EGL_DEBUG, "the best driver is %s%s",
|
||||
best_drv->Name, (test_only) ? " (test only) " : "");
|
||||
if (!test_only) {
|
||||
_eglLog(_EGL_DEBUG, "the best driver is %s (score %d)",
|
||||
best_drv->Name, best_score);
|
||||
if (!use_probe) {
|
||||
dpy->Driver = best_drv;
|
||||
dpy->Initialized = EGL_TRUE;
|
||||
dpy->APImajor = major;
|
||||
dpy->APIminor = minor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -663,7 +700,12 @@ _eglUnloadDrivers(void)
|
||||
{
|
||||
/* this is called at atexit time */
|
||||
if (_eglModules) {
|
||||
#if defined(_EGL_OS_UNIX)
|
||||
_eglDestroyArray(_eglModules, _eglFreeModule);
|
||||
#elif defined(_EGL_OS_WINDOWS)
|
||||
/* XXX Windows unloads DLLs before atexit */
|
||||
_eglDestroyArray(_eglModules, NULL);
|
||||
#endif
|
||||
_eglModules = NULL;
|
||||
}
|
||||
}
|
||||
|
@@ -43,6 +43,16 @@ struct _egl_driver
|
||||
{
|
||||
const char *Name; /**< name of this driver */
|
||||
|
||||
/**
|
||||
* Probe a display and return a score.
|
||||
*
|
||||
* Roughly,
|
||||
* 50 means the driver supports the display;
|
||||
* 90 means the driver can accelerate the display;
|
||||
* 100 means a perfect match.
|
||||
*/
|
||||
EGLint (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy);
|
||||
|
||||
/**
|
||||
* Release the driver resource.
|
||||
*
|
||||
@@ -54,24 +64,12 @@ struct _egl_driver
|
||||
};
|
||||
|
||||
|
||||
extern _EGLDriver *
|
||||
_eglBuiltInDriverGALLIUM(const char *args);
|
||||
|
||||
|
||||
extern _EGLDriver *
|
||||
_eglBuiltInDriverDRI2(const char *args);
|
||||
|
||||
|
||||
extern _EGLDriver *
|
||||
_eglBuiltInDriverGLX(const char *args);
|
||||
|
||||
|
||||
PUBLIC _EGLDriver *
|
||||
_eglMain(const char *args);
|
||||
|
||||
|
||||
extern _EGLDriver *
|
||||
_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only);
|
||||
_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean probe_only);
|
||||
|
||||
|
||||
extern __eglMustCastToProperFunctionPointerType
|
||||
|
@@ -36,8 +36,6 @@
|
||||
#include "eglcurrent.h"
|
||||
#include "eglmisc.h"
|
||||
#include "egldisplay.h"
|
||||
#include "egldriver.h"
|
||||
#include "eglstring.h"
|
||||
|
||||
|
||||
/**
|
||||
@@ -75,11 +73,11 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
|
||||
do { \
|
||||
if (dpy->Extensions.ext) { \
|
||||
_eglAppendExtension(&exts, "EGL_" #ext); \
|
||||
assert(exts <= dpy->ExtensionsString + _EGL_MAX_EXTENSIONS_LEN); \
|
||||
assert(exts <= dpy->Extensions.String + _EGL_MAX_EXTENSIONS_LEN); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
char *exts = dpy->ExtensionsString;
|
||||
char *exts = dpy->Extensions.String;
|
||||
|
||||
if (exts[0])
|
||||
return;
|
||||
@@ -89,8 +87,6 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
|
||||
_EGL_CHECK_EXTENSION(MESA_drm_display);
|
||||
_EGL_CHECK_EXTENSION(MESA_drm_image);
|
||||
|
||||
_EGL_CHECK_EXTENSION(WL_bind_wayland_display);
|
||||
|
||||
_EGL_CHECK_EXTENSION(KHR_image_base);
|
||||
_EGL_CHECK_EXTENSION(KHR_image_pixmap);
|
||||
if (dpy->Extensions.KHR_image_base && dpy->Extensions.KHR_image_pixmap)
|
||||
@@ -111,6 +107,10 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
|
||||
|
||||
_EGL_CHECK_EXTENSION(NOK_swap_region);
|
||||
_EGL_CHECK_EXTENSION(NOK_texture_from_pixmap);
|
||||
|
||||
_EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
|
||||
_EGL_CHECK_EXTENSION(ANDROID_swap_rectangle);
|
||||
_EGL_CHECK_EXTENSION(ANDROID_get_render_buffer);
|
||||
#undef _EGL_CHECK_EXTENSION
|
||||
}
|
||||
|
||||
@@ -118,24 +118,24 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
|
||||
static void
|
||||
_eglUpdateAPIsString(_EGLDisplay *dpy)
|
||||
{
|
||||
char *apis = dpy->ClientAPIsString;
|
||||
char *apis = dpy->ClientAPIs;
|
||||
|
||||
if (apis[0] || !dpy->ClientAPIs)
|
||||
if (apis[0] || !dpy->ClientAPIsMask)
|
||||
return;
|
||||
|
||||
if (dpy->ClientAPIs & EGL_OPENGL_BIT)
|
||||
if (dpy->ClientAPIsMask & EGL_OPENGL_BIT)
|
||||
strcat(apis, "OpenGL ");
|
||||
|
||||
if (dpy->ClientAPIs & EGL_OPENGL_ES_BIT)
|
||||
if (dpy->ClientAPIsMask & EGL_OPENGL_ES_BIT)
|
||||
strcat(apis, "OpenGL_ES ");
|
||||
|
||||
if (dpy->ClientAPIs & EGL_OPENGL_ES2_BIT)
|
||||
if (dpy->ClientAPIsMask & EGL_OPENGL_ES2_BIT)
|
||||
strcat(apis, "OpenGL_ES2 ");
|
||||
|
||||
if (dpy->ClientAPIs & EGL_OPENVG_BIT)
|
||||
if (dpy->ClientAPIsMask & EGL_OPENVG_BIT)
|
||||
strcat(apis, "OpenVG ");
|
||||
|
||||
assert(strlen(apis) < sizeof(dpy->ClientAPIsString));
|
||||
assert(strlen(apis) < sizeof(dpy->ClientAPIs));
|
||||
}
|
||||
|
||||
|
||||
@@ -143,21 +143,20 @@ const char *
|
||||
_eglQueryString(_EGLDriver *drv, _EGLDisplay *dpy, EGLint name)
|
||||
{
|
||||
(void) drv;
|
||||
|
||||
(void) dpy;
|
||||
switch (name) {
|
||||
case EGL_VENDOR:
|
||||
return _EGL_VENDOR_STRING;
|
||||
case EGL_VERSION:
|
||||
_eglsnprintf(dpy->VersionString, sizeof(dpy->VersionString),
|
||||
"%d.%d (%s)", dpy->VersionMajor, dpy->VersionMinor,
|
||||
dpy->Driver->Name);
|
||||
return dpy->VersionString;
|
||||
return dpy->Version;
|
||||
case EGL_EXTENSIONS:
|
||||
_eglUpdateExtensionsString(dpy);
|
||||
return dpy->ExtensionsString;
|
||||
return dpy->Extensions.String;
|
||||
#ifdef EGL_VERSION_1_2
|
||||
case EGL_CLIENT_APIS:
|
||||
_eglUpdateAPIsString(dpy);
|
||||
return dpy->ClientAPIsString;
|
||||
return dpy->ClientAPIs;
|
||||
#endif
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "eglQueryString");
|
||||
return NULL;
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#define EGLSTRING_INCLUDED
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _EGL_OS_WINDOWS
|
||||
#define _eglstrcasecmp _stricmp
|
||||
|
@@ -1,30 +0,0 @@
|
||||
# src/egl/wayland/Makefile
|
||||
|
||||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
SUBDIRS = wayland-drm wayland-egl
|
||||
|
||||
default: subdirs
|
||||
|
||||
|
||||
subdirs:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1 ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
install:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) install) || exit 1 ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
clean:
|
||||
-@for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) clean) ; \
|
||||
fi \
|
||||
done
|
3
src/egl/wayland/wayland-drm/.gitignore
vendored
3
src/egl/wayland/wayland-drm/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
wayland-drm-client-protocol.h
|
||||
wayland-drm-server-protocol.h
|
||||
wayland-drm-protocol.c
|
@@ -1,46 +0,0 @@
|
||||
# src/egl/wayland/wayland-drm/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
GEN_SOURCES = wayland-drm-protocol.c
|
||||
|
||||
GEN_HEADERS = wayland-drm-client-protocol.h wayland-drm-server-protocol.h
|
||||
|
||||
wayland_drm_SOURCES = wayland-drm.c $(GEN_SOURCES)
|
||||
wayland_drm_OBJECTS = $(wayland_drm_SOURCES:.c=.o)
|
||||
|
||||
wayland_drm_INCLUDES = \
|
||||
$(WAYLAND_CFLAGS) \
|
||||
-I$(TOP)/src/egl/main \
|
||||
-I$(TOP)/include
|
||||
|
||||
# Generate protocol sources
|
||||
prefix=$(shell pkg-config --variable=prefix wayland-server)
|
||||
exec_prefx=$(shell pkg-config --variable=exec_prefix wayland-server)
|
||||
wayland_protocoldir = $(PWD)/protocol
|
||||
wayland_scanner=$(exec_prefix)/bin/wayland-scanner
|
||||
|
||||
default: depend libwayland-drm.a $(GEN_SOURCES) $(GEN_HEADERS)
|
||||
|
||||
libwayland-drm.a: $(wayland_drm_OBJECTS) Makefile
|
||||
$(MKLIB) -o wayland-drm -static $(wayland_drm_OBJECTS)
|
||||
|
||||
depend:
|
||||
rm -f depend
|
||||
touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(wayland_drm_INCLUDES) $(wayland_drm_SOURCES) 2> /dev/null
|
||||
|
||||
clean:
|
||||
rm -rf libwayland-drm.a $(wayland_drm_OBJECTS) \
|
||||
$(GEN_SOURCES) $(GEN_HEADERS)
|
||||
|
||||
install:
|
||||
@echo -n ""
|
||||
|
||||
$(wayland_drm_OBJECTS): %.o: %.c $(GEN_HEADERS)
|
||||
$(CC) -c $(wayland_drm_INCLUDES) $(CFLAGS) $< -o $@
|
||||
|
||||
include $(prefix)/share/aclocal/wayland-scanner.mk
|
||||
|
||||
sinclude depend
|
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="drm">
|
||||
<!-- drm support. This object is created by the server and published
|
||||
using the display's global event. -->
|
||||
<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
|
||||
completed before create_buffer could be used. -->
|
||||
<request name="authenticate">
|
||||
<arg name="id" type="uint"/>
|
||||
</request>
|
||||
|
||||
<!-- 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="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="visual"/>
|
||||
</request>
|
||||
|
||||
<!-- Notification of the path of the drm device which is used by
|
||||
the server. The client should use this device for creating
|
||||
local buffers. Only buffers created from this device should
|
||||
be be passed to the server using this drm object's
|
||||
create_buffer request. -->
|
||||
<event name="device">
|
||||
<arg name="name" type="string"/>
|
||||
</event>
|
||||
|
||||
<!-- Raised if the authenticate request succeeded -->
|
||||
<event name="authenticated"/>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
@@ -1,203 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2011 Kristian Høgsberg
|
||||
*
|
||||
* 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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <wayland-server.h>
|
||||
#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;
|
||||
|
||||
_EGLDisplay *edisp;
|
||||
|
||||
char *device_name;
|
||||
authenticate_t authenticate;
|
||||
};
|
||||
|
||||
static void
|
||||
drm_buffer_damage(struct wl_buffer *buffer_base,
|
||||
struct wl_surface *surface,
|
||||
int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_buffer(struct wl_resource *resource, struct wl_client *client)
|
||||
{
|
||||
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) resource;
|
||||
_EGLDriver *drv = buffer->drm->edisp->Driver;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
const static struct wl_buffer_interface buffer_interface = {
|
||||
buffer_destroy
|
||||
};
|
||||
|
||||
static void
|
||||
drm_create_buffer(struct wl_client *client, struct wl_drm *drm,
|
||||
uint32_t id, uint32_t name, int32_t width, int32_t height,
|
||||
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 = 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.attach = NULL;
|
||||
buffer->buffer.damage = drm_buffer_damage;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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->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))
|
||||
&buffer_interface;
|
||||
|
||||
buffer->buffer.resource.destroy = destroy_buffer;
|
||||
|
||||
wl_client_add_resource(client, &buffer->buffer.resource);
|
||||
}
|
||||
|
||||
static void
|
||||
drm_authenticate(struct wl_client *client,
|
||||
struct wl_drm *drm, uint32_t id)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
const static struct wl_drm_interface drm_interface = {
|
||||
drm_authenticate,
|
||||
drm_create_buffer
|
||||
};
|
||||
|
||||
static void
|
||||
post_drm_device(struct wl_client *client, struct wl_object *global)
|
||||
{
|
||||
struct wl_drm *drm = (struct wl_drm *) global;
|
||||
|
||||
wl_client_post_event(client, global, WL_DRM_DEVICE, drm->device_name);
|
||||
}
|
||||
|
||||
struct wl_drm *
|
||||
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->object.interface = &wl_drm_interface;
|
||||
drm->object.implementation = (void (**)(void)) &drm_interface;
|
||||
wl_display_add_object(display, &drm->object);
|
||||
wl_display_add_global(display, &drm->object, post_drm_device);
|
||||
|
||||
return drm;
|
||||
}
|
||||
|
||||
void
|
||||
wayland_drm_destroy(struct wl_drm *drm)
|
||||
{
|
||||
free(drm->device_name);
|
||||
|
||||
/* FIXME: need wl_display_del_{object,global} */
|
||||
|
||||
free(drm);
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
#ifndef WAYLAND_DRM_H
|
||||
#define WAYLAND_DRM_H
|
||||
|
||||
#include "egldisplay.h"
|
||||
#include "eglimage.h"
|
||||
|
||||
#include <wayland-server.h>
|
||||
|
||||
struct wl_drm;
|
||||
|
||||
typedef int (*authenticate_t) (_EGLDisplay *disp, uint32_t id);
|
||||
|
||||
struct wl_drm_buffer {
|
||||
struct wl_buffer buffer;
|
||||
struct wl_drm *drm;
|
||||
_EGLImage *image;
|
||||
};
|
||||
|
||||
struct wl_drm *
|
||||
wayland_drm_init(struct wl_display *display, _EGLDisplay *disp,
|
||||
authenticate_t authenticate, char *device_name);
|
||||
|
||||
void
|
||||
wayland_drm_destroy(struct wl_drm *drm);
|
||||
|
||||
#endif
|
@@ -1,71 +0,0 @@
|
||||
# src/egl/wayland/wayland-egl/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
INCLUDE_DIRS = -I$(TOP)/include \
|
||||
-I$(TOP)/include/EGL \
|
||||
-I$(TOP)/src/egl/wayland/wayland-drm
|
||||
|
||||
|
||||
HEADERS = wayland-egl-priv.h
|
||||
SOURCES = wayland-egl.c
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
LOCAL_CFLAGS = $(LIBDRM_CFLAGS) \
|
||||
$(WAYLAND_CFLAGS)
|
||||
|
||||
LOCAL_LIBS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
default: depend library
|
||||
|
||||
# wayland-egl Library
|
||||
library: $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME)
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
|
||||
$(MKLIB) -o $(WAYLAND_EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
-L$(TOP)/$(LIB_DIR) $(WAYLAND_EGL_LIB_DEPS) \
|
||||
$(OBJECTS) $(LOCAL_LIBS)
|
||||
|
||||
PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
|
||||
|
||||
gl_pcedit = sed \
|
||||
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
||||
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
|
||||
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
|
||||
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
|
||||
-e 's,@WAYLAND_EGL_PC_REQ_PRIV@,$(WAYLAND_EGL_PC_REQ_PRIV),' \
|
||||
-e 's,@WAYLAND_EGL_PC_LIB_PRIV@,$(WAYLAND_EGL_PC_LIB_PRIV),' \
|
||||
-e 's,@WAYLAND_EGL_PC_CFLAGS@,$(WAYLAND_EGL_PC_CFLAGS),' \
|
||||
-e 's,@WAYLAND_EGL_LIB@,$(WAYLAND_EGL_LIB),'
|
||||
|
||||
wayland-egl.pc: wayland-egl.pc.in
|
||||
$(gl_pcedit) $< > $@
|
||||
|
||||
install: default wayland-egl.pc
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_GLOB) \
|
||||
$(DESTDIR)$(INSTALL_LIB_DIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
|
||||
$(INSTALL) -m 644 wayland-egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
|
||||
|
||||
clean:
|
||||
-rm -f *.o
|
||||
-rm -f depend depend.bak
|
||||
|
||||
depend: $(SOURCES) $(HEADERS)
|
||||
@ echo "running $(MKDEP)"
|
||||
@ rm -f depend
|
||||
@ touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
|
||||
$(SOURCES) $(HEADERS) > /dev/null 2>/dev/null
|
||||
|
||||
|
||||
-include depend
|
||||
# DO NOT DELETE
|
@@ -1,60 +0,0 @@
|
||||
#ifndef _WAYLAND_EGL_PRIV_H
|
||||
#define _WAYLAND_EGL_PRIV_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GCC visibility */
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define WL_EGL_EXPORT __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#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;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
int dx;
|
||||
int dy;
|
||||
|
||||
int attached_width;
|
||||
int attached_height;
|
||||
};
|
||||
|
||||
struct wl_egl_pixmap {
|
||||
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);
|
||||
|
||||
void *driver_private;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -1,226 +0,0 @@
|
||||
#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,
|
||||
int width, int height,
|
||||
int dx, int dy)
|
||||
{
|
||||
egl_window->width = width;
|
||||
egl_window->height = height;
|
||||
egl_window->dx = dx;
|
||||
egl_window->dy = dy;
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_egl_window *
|
||||
wl_egl_window_create(struct wl_egl_display *egl_display,
|
||||
struct wl_surface *surface,
|
||||
int width, int height,
|
||||
struct wl_visual *visual)
|
||||
{
|
||||
struct wl_egl_window *egl_window;
|
||||
|
||||
egl_window = malloc(sizeof *egl_window);
|
||||
if (!egl_window)
|
||||
return NULL;
|
||||
|
||||
egl_window->surface = surface;
|
||||
egl_window->visual = visual;
|
||||
wl_egl_window_resize(egl_window, width, height, 0, 0);
|
||||
egl_window->attached_width = 0;
|
||||
egl_window->attached_height = 0;
|
||||
|
||||
return egl_window;
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT void
|
||||
wl_egl_window_destroy(struct wl_egl_window *egl_window)
|
||||
{
|
||||
free(egl_window);
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT void
|
||||
wl_egl_window_get_attached_size(struct wl_egl_window *egl_window,
|
||||
int *width, int *height)
|
||||
{
|
||||
if (width)
|
||||
*width = egl_window->attached_width;
|
||||
if (height)
|
||||
*height = egl_window->attached_height;
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_egl_pixmap *
|
||||
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;
|
||||
|
||||
egl_pixmap = malloc(sizeof *egl_pixmap);
|
||||
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;
|
||||
|
||||
return egl_pixmap;
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT void
|
||||
wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
if (egl_pixmap->destroy)
|
||||
egl_pixmap->destroy(egl_pixmap);
|
||||
free(egl_pixmap);
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_buffer *
|
||||
wl_egl_pixmap_create_buffer(struct wl_egl_display *egl_display,
|
||||
struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
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();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user