Compare commits
229 Commits
i965-primi
...
mesa-8.0
Author | SHA1 | Date | |
---|---|---|---|
|
f9c9933f9c | ||
|
b2b5d6b8fb | ||
|
e86d90eb20 | ||
|
1531b94471 | ||
|
b5efe0881e | ||
|
73e15679ce | ||
|
974a67b41e | ||
|
83075bd0fe | ||
|
d799a7b585 | ||
|
2b4df494b1 | ||
|
728bda08d8 | ||
|
f775d9aa84 | ||
|
6887ec766b | ||
|
6d82dc18f1 | ||
|
02962ea086 | ||
|
358389fe59 | ||
|
2ed8367d72 | ||
|
f723df005c | ||
|
92d842c073 | ||
|
1b5e151ffa | ||
|
20da01fecd | ||
|
203ef2a12b | ||
|
05ff4d209d | ||
|
c1ccb52c72 | ||
|
35af090907 | ||
|
80cd02f517 | ||
|
0749290d69 | ||
|
f62c8648d3 | ||
|
869728bd99 | ||
|
1100a19da8 | ||
|
f811d501b6 | ||
|
ecd0d46070 | ||
|
cf4a7c41f6 | ||
|
74a5f03066 | ||
|
65b500857e | ||
|
c231482725 | ||
|
50a8b9971e | ||
|
a4cb2fdb64 | ||
|
1c403f4999 | ||
|
ad83ddc868 | ||
|
ac089040d7 | ||
|
0e08205421 | ||
|
cc27a42b6f | ||
|
67937502f5 | ||
|
1a77654e6a | ||
|
b38640082c | ||
|
736f1e53e4 | ||
|
d45d250ad1 | ||
|
4635e26db2 | ||
|
65b9c1dee6 | ||
|
c34947dbb1 | ||
|
9da7b58b39 | ||
|
5ac4c8cf53 | ||
|
7f5d3f7ed2 | ||
|
442dc31fa7 | ||
|
3ad7f44926 | ||
|
9f0088e906 | ||
|
f893fde63b | ||
|
6bb4823f7d | ||
|
ddd2503750 | ||
|
5f60d134e6 | ||
|
caebd7929d | ||
|
0dddf4c575 | ||
|
4aa158d09a | ||
|
38b76cf831 | ||
|
73ff415b59 | ||
|
58e0c4f872 | ||
|
eea63b7621 | ||
|
85a52bf7b5 | ||
|
05b7f13af1 | ||
|
93d5799e8b | ||
|
4f8b00d8ef | ||
|
b5a5a1c615 | ||
|
4d72e190c0 | ||
|
e442906c87 | ||
|
12370e050a | ||
|
5163fed919 | ||
|
acfbf24335 | ||
|
765892865f | ||
|
9daa974d4d | ||
|
05adf4d6e4 | ||
|
eca54b1eb4 | ||
|
8e5cf4cb45 | ||
|
1fd179b984 | ||
|
843194d89f | ||
|
7c95a4ec22 | ||
|
9567178ca2 | ||
|
83602e8342 | ||
|
b31bfae0db | ||
|
49ab5ad142 | ||
|
5916b15247 | ||
|
a36cc604cf | ||
|
73ed8cec4a | ||
|
c6e56a69d8 | ||
|
d980b8350f | ||
|
143999bdd8 | ||
|
ae3bd76e31 | ||
|
86fc256131 | ||
|
5cb5aa4a84 | ||
|
f0ad188c9f | ||
|
8786555199 | ||
|
f29212ecba | ||
|
8e5e735424 | ||
|
f5367c4503 | ||
|
d60bcbe31d | ||
|
64deeddce8 | ||
|
514fcec7da | ||
|
9b5e402837 | ||
|
57df49908e | ||
|
38e4496ac3 | ||
|
39d978a60c | ||
|
e4b42d618c | ||
|
d85b4bae0e | ||
|
3dd8937492 | ||
|
1f0cc3faf2 | ||
|
f00ba21915 | ||
|
c8562a6ed3 | ||
|
48173180b5 | ||
|
349d5a8a38 | ||
|
fee5f10241 | ||
|
83eb5e4372 | ||
|
5f6676b0ee | ||
|
7c6f54811c | ||
|
a42dcf1614 | ||
|
573e1478eb | ||
|
490057ae81 | ||
|
d2d1419ba0 | ||
|
0941b808a6 | ||
|
ac6074de17 | ||
|
289a7e74b3 | ||
|
889f756c28 | ||
|
e10c47adff | ||
|
dcaf26ac91 | ||
|
9a33b5a269 | ||
|
61be81ae5c | ||
|
46c146116f | ||
|
e695c7e5b8 | ||
|
bc973082fc | ||
|
f92503e171 | ||
|
e406659b8b | ||
|
19f88670b5 | ||
|
dcb1a3bc27 | ||
|
b064078581 | ||
|
252a1d8635 | ||
|
8e42dadf70 | ||
|
0b6003af71 | ||
|
d8f66afa5d | ||
|
09b6308a2d | ||
|
30e9bfd84a | ||
|
aa00ccdc02 | ||
|
a62a4f77e8 | ||
|
2fae4d26f3 | ||
|
759da0cb56 | ||
|
4dbc544bb1 | ||
|
c256fd094b | ||
|
f0662ee609 | ||
|
99c0aeb3db | ||
|
7861ccbe23 | ||
|
bffefc3d27 | ||
|
531948947e | ||
|
decf80c621 | ||
|
812a8eade5 | ||
|
230f6e7ddc | ||
|
655b36d1d5 | ||
|
7a11d201e7 | ||
|
dd73100c24 | ||
|
5f25e0a39c | ||
|
f48e6748a7 | ||
|
68a9cd6fa1 | ||
|
907495465a | ||
|
daf5ee5ef1 | ||
|
1a499d761a | ||
|
f97ee64606 | ||
|
4ac2e2f159 | ||
|
f5b787b9e3 | ||
|
84d2bb4dfc | ||
|
e1a02333a0 | ||
|
20457cfcb8 | ||
|
fceca6191a | ||
|
a71013d120 | ||
|
cbdf7de014 | ||
|
daefd7f20b | ||
|
4b6dc4c1b3 | ||
|
0d6f7b181f | ||
|
6988699e44 | ||
|
533651b679 | ||
|
ee6a817f80 | ||
|
1b33ae3a7d | ||
|
41c1a7311e | ||
|
d090099f7d | ||
|
8ac4470041 | ||
|
6382f98b9a | ||
|
274e8b9234 | ||
|
a12606cb54 | ||
|
33f5c3946d | ||
|
a07afa11d2 | ||
|
9e0cec45ae | ||
|
c85402aba9 | ||
|
9c81e4eed1 | ||
|
daa2545508 | ||
|
baaa30ad52 | ||
|
b178514e24 | ||
|
48e72b6605 | ||
|
89fdeab1a2 | ||
|
504eaa1212 | ||
|
399b9799de | ||
|
2c1ee157c7 | ||
|
8b7f6de8b9 | ||
|
eb8063361e | ||
|
b26682e12e | ||
|
deff0244ed | ||
|
830688b36a | ||
|
cd56917a50 | ||
|
867fdbd36d | ||
|
d7a4eb331b | ||
|
ee5b35c568 | ||
|
a748a9f8ee | ||
|
f1ff449120 | ||
|
af33e16eab | ||
|
89a1e7caf4 | ||
|
ad77e2fb78 | ||
|
1e51d4b4f6 | ||
|
0b9e6d2017 | ||
|
57665cb09e | ||
|
372b7f1d35 | ||
|
4b86bd1347 | ||
|
7465c5d976 | ||
|
9489ae8938 | ||
|
b8af8b83cf |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -2,8 +2,6 @@
|
||||
*.dll
|
||||
*.exe
|
||||
*.ilk
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
*.os
|
||||
@@ -21,11 +19,9 @@
|
||||
*~
|
||||
depend
|
||||
depend.bak
|
||||
bin/ltmain.sh
|
||||
lib
|
||||
lib64
|
||||
configure
|
||||
configure.lineno
|
||||
autom4te.cache
|
||||
aclocal.m4
|
||||
config.log
|
||||
@@ -34,9 +30,5 @@ cscope*
|
||||
.scon*
|
||||
config.py
|
||||
build
|
||||
libtool
|
||||
manifest.txt
|
||||
Makefile.in
|
||||
.dir-locals.el
|
||||
.deps/
|
||||
.libs/
|
||||
|
@@ -24,7 +24,7 @@
|
||||
# BOARD_GPU_DRIVERS should be defined. The valid values are
|
||||
#
|
||||
# classic drivers: i915 i965
|
||||
# gallium drivers: swrast i915g nouveau r300g r600g radeonsi vmwgfx
|
||||
# gallium drivers: swrast i915g nouveau r300g r600g vmwgfx
|
||||
#
|
||||
# The main target is libGLES_mesa. For each classic driver enabled, a DRI
|
||||
# module will also be built. DRI modules will be loaded by libGLES_mesa.
|
||||
@@ -37,7 +37,7 @@ DRM_TOP := external/drm
|
||||
DRM_GRALLOC_TOP := hardware/drm_gralloc
|
||||
|
||||
classic_drivers := i915 i965
|
||||
gallium_drivers := swrast i915g nouveau r300g r600g radeonsi vmwgfx
|
||||
gallium_drivers := swrast i915g nouveau r300g r600g vmwgfx
|
||||
|
||||
MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS))
|
||||
|
||||
|
14
Makefile
14
Makefile
@@ -22,7 +22,7 @@ doxygen:
|
||||
cd doxygen && $(MAKE)
|
||||
|
||||
check:
|
||||
make -C src/glsl/tests check
|
||||
cd src/glsl/tests/ && ./optimization-test
|
||||
make -C tests check
|
||||
|
||||
clean:
|
||||
@@ -184,7 +184,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
PACKAGE_VERSION=8.1-devel
|
||||
PACKAGE_VERSION=8.0
|
||||
PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
|
||||
PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
|
||||
|
||||
@@ -199,12 +199,6 @@ EXTRA_FILES = \
|
||||
src/glsl/glcpp/glcpp-lex.c \
|
||||
src/glsl/glcpp/glcpp-parse.c \
|
||||
src/glsl/glcpp/glcpp-parse.h \
|
||||
src/mesa/main/api_exec_es1.c \
|
||||
src/mesa/main/api_exec_es1_dispatch.h \
|
||||
src/mesa/main/api_exec_es1_remap_helper.h \
|
||||
src/mesa/main/api_exec_es2.c \
|
||||
src/mesa/main/api_exec_es2_dispatch.h \
|
||||
src/mesa/main/api_exec_es2_remap_helper.h \
|
||||
src/mesa/program/lex.yy.c \
|
||||
src/mesa/program/program_parse.tab.c \
|
||||
src/mesa/program/program_parse.tab.h
|
||||
@@ -266,6 +260,4 @@ md5: $(ARCHIVES)
|
||||
@-md5sum $(PACKAGE_NAME).tar.bz2
|
||||
@-md5sum $(PACKAGE_NAME).zip
|
||||
|
||||
am--refresh:
|
||||
|
||||
.PHONY: tarballs md5 am--refresh
|
||||
.PHONY: tarballs md5
|
||||
|
5
bin/.gitignore
vendored
5
bin/.gitignore
vendored
@@ -1,7 +1,2 @@
|
||||
config.guess
|
||||
config.sub
|
||||
install-sh
|
||||
/depcomp
|
||||
/missing
|
||||
ylwrap
|
||||
compile
|
||||
|
1555
bin/config.guess
vendored
Executable file
1555
bin/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1685
bin/config.sub
vendored
Executable file
1685
bin/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1
bin/install-sh
Symbolic link
1
bin/install-sh
Symbolic link
@@ -0,0 +1 @@
|
||||
minstall
|
@@ -334,9 +334,7 @@ case $ARCH in
|
||||
# environment. If so, pass -m32 flag to linker.
|
||||
set ${OBJECTS}
|
||||
ABI32=`file $1 | grep 32-bit`
|
||||
ARM=`file $1 | grep ARM`
|
||||
# Do not add "-m32" option for arm.
|
||||
if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then
|
||||
if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
|
||||
OPTS="-m32 ${OPTS}"
|
||||
fi
|
||||
|
||||
@@ -393,9 +391,7 @@ case $ARCH in
|
||||
# environment. If so, pass -m32 flag to linker.
|
||||
set ${OBJECTS}
|
||||
ABI32=`file $1 | grep 32-bit`
|
||||
ARM=`file $1 | grep ARM`
|
||||
# Do not add "-m32" option for arm.
|
||||
if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then
|
||||
if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
|
||||
OPTS="-m32 ${OPTS}"
|
||||
fi
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
|
@@ -31,15 +31,9 @@ _machine_map = {
|
||||
'i486': 'x86',
|
||||
'i586': 'x86',
|
||||
'i686': 'x86',
|
||||
'BePC': 'x86',
|
||||
'Intel': 'x86',
|
||||
'ppc' : 'ppc',
|
||||
'BeBox': 'ppc',
|
||||
'BeMac': 'ppc',
|
||||
'AMD64': 'x86_64',
|
||||
'x86_64': 'x86_64',
|
||||
'sparc': 'sparc',
|
||||
'sun4u': 'sparc',
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +83,7 @@ def AddOptions(opts):
|
||||
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', 'windows', 'darwin', 'cygwin', 'sunos', 'freebsd8', 'haiku')))
|
||||
allowed_values=('linux', 'windows', 'darwin', 'cygwin', 'sunos', 'freebsd8')))
|
||||
opts.Add(BoolOption('embedded', 'embedded build', 'no'))
|
||||
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
|
||||
opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 'no'))
|
||||
|
@@ -32,12 +32,9 @@ INTEL_LIBS = @INTEL_LIBS@
|
||||
INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||
X11_LIBS = @X11_LIBS@
|
||||
X11_CFLAGS = @X11_CFLAGS@
|
||||
LLVM_BINDIR = @LLVM_BINDIR@
|
||||
LLVM_CFLAGS = @LLVM_CFLAGS@
|
||||
LLVM_CXXFLAGS = @LLVM_CXXFLAGS@
|
||||
LLVM_LDFLAGS = @LLVM_LDFLAGS@
|
||||
LLVM_LIBS = @LLVM_LIBS@
|
||||
LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@
|
||||
GLW_CFLAGS = @GLW_CFLAGS@
|
||||
GLX_TLS = @GLX_TLS@
|
||||
DRI_CFLAGS = @DRI_CFLAGS@
|
||||
@@ -61,16 +58,13 @@ AWK = @AWK@
|
||||
GREP = @GREP@
|
||||
NM = @NM@
|
||||
|
||||
# Perl
|
||||
PERL = @PERL@
|
||||
|
||||
# Python and flags (generally only needed by the developers)
|
||||
PYTHON2 = @PYTHON2@
|
||||
PYTHON_FLAGS = -t -O -O
|
||||
|
||||
# Flex and Bison for GLSL compiler
|
||||
FLEX = @LEX@
|
||||
BISON = @YACC@
|
||||
FLEX = @FLEX@
|
||||
BISON = @BISON@
|
||||
|
||||
# Library names (base name)
|
||||
GL_LIB = @GL_LIB@
|
||||
@@ -81,6 +75,8 @@ GLESv1_CM_LIB = GLESv1_CM
|
||||
GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
GLAPI_LIB = glapi
|
||||
WAYLAND_EGL_LIB = wayland-egl
|
||||
GBM_LIB = gbm
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = @GL_LIB_NAME@
|
||||
@@ -92,6 +88,8 @@ 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@
|
||||
GBM_LIB_NAME = @GBM_LIB_NAME@
|
||||
|
||||
# Globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = @GL_LIB_GLOB@
|
||||
@@ -103,12 +101,16 @@ 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@
|
||||
GBM_LIB_GLOB = @GBM_LIB_GLOB@
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = @LIB_DIR@
|
||||
SRC_DIRS = @SRC_DIRS@
|
||||
GLU_DIRS = @GLU_DIRS@
|
||||
DRIVER_DIRS = @DRIVER_DIRS@
|
||||
EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@
|
||||
GBM_BACKEND_DIRS = @GBM_BACKEND_DIRS@
|
||||
GALLIUM_DIRS = @GALLIUM_DIRS@
|
||||
GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
|
||||
GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
|
||||
@@ -145,6 +147,8 @@ GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@
|
||||
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@
|
||||
VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@
|
||||
GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@
|
||||
WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @WAYLAND_EGL_LIB_DEPS@
|
||||
GBM_LIB_DEPS = $(EXTRA_LIB_PATH) @GBM_LIB_DEPS@
|
||||
|
||||
# DRI dependencies
|
||||
MESA_MODULES = @MESA_MODULES@
|
||||
@@ -175,9 +179,6 @@ DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@
|
||||
# EGL driver install directory
|
||||
EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@
|
||||
|
||||
# XVMC library install directory
|
||||
XVMC_LIB_INSTALL_DIR=@XVMC_LIB_INSTALL_DIR@
|
||||
|
||||
# VDPAU library install directory
|
||||
VDPAU_LIB_INSTALL_DIR=@VDPAU_LIB_INSTALL_DIR@
|
||||
|
||||
@@ -206,6 +207,12 @@ 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@
|
||||
GBM_PC_REQ_PRIV = @GBM_PC_REQ_PRIV@
|
||||
GBM_PC_LIB_PRIV = @GBM_PC_LIB_PRIV@
|
||||
GBM_PC_CFLAGS = @GBM_PC_CFLAGS@
|
||||
|
||||
XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
|
||||
XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
|
||||
@@ -217,8 +224,9 @@ WAYLAND_LIBS = @WAYLAND_LIBS@
|
||||
MESA_LLVM = @MESA_LLVM@
|
||||
|
||||
LLVM_VERSION = @LLVM_VERSION@
|
||||
ifneq ($(LLVM_VERSION),)
|
||||
HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=))
|
||||
DEFINES += -DHAVE_LLVM=$(HAVE_LLVM)
|
||||
endif
|
||||
|
||||
HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@
|
||||
|
||||
GALLIUM_PIPE_LOADER_DEFINES = @GALLIUM_PIPE_LOADER_DEFINES@
|
||||
GALLIUM_PIPE_LOADER_LIBS = @GALLIUM_PIPE_LOADER_LIBS@
|
||||
|
@@ -9,8 +9,8 @@ INSTALL_DIR = /usr/X11
|
||||
X11_DIR = $(INSTALL_DIR)
|
||||
|
||||
# Compiler and flags
|
||||
CC = $(shell xcrun -find cc)
|
||||
CXX = $(shell xcrun -find c++)
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
PIC_FLAGS = -fPIC
|
||||
DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
|
||||
-DGLX_ALIAS_UNSUPPORTED \
|
||||
@@ -24,14 +24,11 @@ DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
|
||||
# -DIN_DRI_DRIVER
|
||||
|
||||
ARCH_FLAGS += $(RC_CFLAGS)
|
||||
INCLUDE_FLAGS = -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
|
||||
OPT_FLAGS = -g3 -gdwarf-2 -Os -ffast-math -fno-strict-aliasing
|
||||
WARN_FLAGS = -Wall -Wmissing-prototypes
|
||||
|
||||
CFLAGS = -std=c99 -fvisibility=hidden \
|
||||
$(OPT_FLAGS) $(WARN_FLAGS) $(INCLUDE_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) $(EXTRA_CFLAGS)
|
||||
CXXFLAGS = -fvisibility=hidden \
|
||||
$(OPT_FLAGS) $(WARN_FLAGS) $(INCLUDE_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) $(EXTRA_CFLAGS)
|
||||
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fvisibility=hidden \
|
||||
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing -fvisibility=hidden \
|
||||
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = lib$(GL_LIB).dylib
|
||||
@@ -47,15 +44,15 @@ GLW_LIB_GLOB = lib$(GLW_LIB).*dylib
|
||||
OSMESA_LIB_GLOB = lib$(OSMESA_LIB).*dylib
|
||||
VG_LIB_GLOB = lib$(VG_LIB).*dylib
|
||||
|
||||
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11-xcb -lxcb -lX11 -lXext $(EXTRA_LDFLAGS)
|
||||
OSMESA_LIB_DEPS = $(EXTRA_LDFLAGS)
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LDFLAGS)
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt $(EXTRA_LDFLAGS)
|
||||
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
|
||||
|
||||
SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa glu
|
||||
SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa gallium glu
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = osmesa
|
||||
#DRIVER_DIRS = dri
|
||||
DRI_DIRS = swrast
|
||||
#GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad
|
||||
GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad
|
||||
#GALLIUM_DRIVERS_DIRS += llvmpipe
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# Configuration for Darwin / MacOS X, making 32bit and 64bit fat dynamic libs for intel
|
||||
|
||||
RC_CFLAGS=-arch i386 -arch x86_64
|
||||
|
||||
include $(TOP)/configs/darwin
|
||||
|
||||
CONFIG_NAME = darwin-fat-intel
|
@@ -9,7 +9,7 @@ CONFIG_NAME = default
|
||||
|
||||
# Version info
|
||||
MESA_MAJOR=8
|
||||
MESA_MINOR=1
|
||||
MESA_MINOR=0
|
||||
MESA_TINY=0
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
@@ -62,6 +62,8 @@ GLESv1_CM_LIB = GLESv1_CM
|
||||
GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
GLAPI_LIB = glapi
|
||||
WAYLAND_EGL_LIB = wayland-egl
|
||||
GBM_LIB = gbm
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = lib$(GL_LIB).so
|
||||
@@ -73,6 +75,8 @@ 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
|
||||
GBM_LIB_NAME = lib$(GBM_LIB).so
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = $(GL_LIB_NAME)*
|
||||
@@ -84,6 +88,8 @@ 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)*
|
||||
GBM_LIB_GLOB = $(GBM_LIB_NAME)*
|
||||
|
||||
DRI_CFLAGS = $(CFLAGS)
|
||||
DRI_CXXFLAGS = $(CXXFLAGS)
|
||||
@@ -104,6 +110,12 @@ SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = x11 osmesa
|
||||
|
||||
# EGL drivers to build
|
||||
EGL_DRIVERS_DIRS = glx
|
||||
|
||||
# gbm backends to build
|
||||
GBM_BACKEND_DIRS = dri
|
||||
|
||||
# Gallium directories and
|
||||
GALLIUM_DIRS = auxiliary drivers state_trackers
|
||||
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
@@ -128,6 +140,8 @@ 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
|
||||
GBM_LIB_DEPS = $(EXTRA_LIB_PATH) -ludev -ldl
|
||||
|
||||
# Program dependencies - specific GL libraries added in Makefiles
|
||||
X11_LIBS = -lX11
|
||||
@@ -146,6 +160,9 @@ DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||
# EGL driver install directory
|
||||
EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
|
||||
|
||||
# gbm backend install directory
|
||||
GBM_BACKEND_INSTALL_DIR = $(INSTALL_LIB_DIR)/gbm
|
||||
|
||||
# Xorg driver install directory (for xorg state-tracker)
|
||||
XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
|
||||
|
||||
@@ -172,3 +189,9 @@ 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 =
|
||||
GBM_PC_REQ_PRIV =
|
||||
GBM_PC_LIB_PRIV =
|
||||
GBM_PC_CFLAGS =
|
||||
|
@@ -46,3 +46,6 @@ SRC_DIRS = glx gallium mesa glu
|
||||
DRIVER_DIRS = dri
|
||||
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
|
||||
DRI_DIRS = i915 i965 r200 radeon
|
||||
|
||||
|
@@ -54,12 +54,15 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
# Directories
|
||||
SRC_DIRS := glx egl $(SRC_DIRS)
|
||||
|
||||
# EGL directories
|
||||
EGL_DRIVERS_DIRS = glx
|
||||
|
||||
DRIVER_DIRS = dri
|
||||
GALLIUM_WINSYS_DIRS = sw sw/xlib drm/vmware drm/intel svga/drm
|
||||
GALLIUM_TARGET_DIRS = dri-vmwgfx
|
||||
GALLIUM_STATE_TRACKERS_DIRS = egl dri
|
||||
|
||||
DRI_DIRS = swrast
|
||||
DRI_DIRS = i915 i965 nouveau r200 radeon swrast
|
||||
|
||||
INTEL_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_intel)
|
||||
INTEL_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_intel)
|
||||
|
@@ -6,3 +6,9 @@ include $(TOP)/configs/linux-dri
|
||||
CONFIG_NAME = linux-dri-debug
|
||||
OPT_FLAGS = -O0 -g
|
||||
ARCH_FLAGS = -DDEBUG
|
||||
|
||||
# Helpful to reduce the amount of stuff that gets built sometimes:
|
||||
#DRI_DIRS = i915tex i915
|
||||
#DRI_DIRS = i965
|
||||
#DRI_DIRS = radeon r200
|
||||
|
||||
|
@@ -7,3 +7,11 @@ CONFIG_NAME = linux-dri-ppc
|
||||
|
||||
OPT_FLAGS = -Os -mcpu=603
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM
|
||||
MESA_ASM_SOURCES = $(PPC_SOURCES)
|
||||
|
||||
# Build only the drivers for cards that exist on PowerPC. At some point MGA
|
||||
# will be added, but not yet.
|
||||
DRI_DIRS = r200 radeon
|
||||
|
||||
|
@@ -15,3 +15,6 @@ LIB_DIR = lib64
|
||||
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
|
||||
|
||||
DRI_DIRS = i915 i965 r200 radeon
|
||||
|
||||
|
@@ -52,3 +52,4 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
|
||||
SRC_DIRS = glx gallium mesa glu
|
||||
|
||||
DRIVER_DIRS = dri
|
||||
DRI_DIRS = i915 r200 radeon
|
||||
|
@@ -14,6 +14,7 @@ DEFINES += -DGLX_DIRECT_RENDERING
|
||||
|
||||
# no mesa or egl drivers
|
||||
DRIVER_DIRS =
|
||||
EGL_DRIVERS_DIRS =
|
||||
|
||||
GALLIUM_DRIVERS_DIRS = softpipe
|
||||
|
||||
|
514
configure.ac
514
configure.ac
@@ -16,19 +16,7 @@ AC_INIT([Mesa],[mesa_version],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||
AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CANONICAL_HOST
|
||||
AM_INIT_AUTOMAKE([foreign -Wall])
|
||||
|
||||
dnl http://people.gnome.org/~walters/docs/build-api.txt
|
||||
dnl We don't support srcdir != builddir.
|
||||
echo \#buildapi-variable-no-builddir >/dev/null
|
||||
|
||||
# Support silent build rules, requires at least automake-1.11. Disable
|
||||
# by either passing --disable-silent-rules to configure or passing V=1
|
||||
# to make
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
LT_PREREQ([2.2])
|
||||
LT_INIT([disable-static])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
|
||||
dnl Save user CFLAGS and CXXFLAGS so one can override the default ones
|
||||
USER_CFLAGS="$CFLAGS"
|
||||
@@ -36,10 +24,9 @@ USER_CXXFLAGS="$CXXFLAGS"
|
||||
|
||||
dnl Versions for external dependencies
|
||||
LIBDRM_REQUIRED=2.4.24
|
||||
LIBDRM_RADEON_REQUIRED=2.4.31
|
||||
LIBDRM_INTEL_REQUIRED=2.4.32
|
||||
LIBDRM_NVVIEUX_REQUIRED=2.4.33
|
||||
LIBDRM_NOUVEAU_REQUIRED=2.4.33
|
||||
LIBDRM_RADEON_REQUIRED=2.4.24
|
||||
LIBDRM_INTEL_REQUIRED=2.4.30
|
||||
LIBDRM_NOUVEAU_REQUIRED=0.6
|
||||
DRI2PROTO_REQUIRED=2.6
|
||||
GLPROTO_REQUIRED=1.4.14
|
||||
LIBDRM_XORG_REQUIRED=2.4.24
|
||||
@@ -49,27 +36,20 @@ dnl Check for progs
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AM_PROG_CC_C_O
|
||||
AC_CHECK_PROGS([MAKE], [gmake make])
|
||||
AC_CHECK_PROGS([PYTHON2], [python2 python])
|
||||
AC_PROG_SED
|
||||
AC_PROG_MKDIR_P
|
||||
AC_PATH_PROG([MKDEP], [makedepend])
|
||||
|
||||
if test "x$MKDEP" = "x"; then
|
||||
AC_MSG_ERROR([makedepend is required to build Mesa])
|
||||
fi
|
||||
|
||||
AC_PROG_YACC
|
||||
AC_PATH_PROG([YACC_INST], $YACC)
|
||||
if test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.y"; then
|
||||
if test -z "$YACC_INST"; then
|
||||
AC_MSG_ERROR([yacc not found - unable to compile glcpp-parse.y])
|
||||
fi
|
||||
fi
|
||||
AC_PROG_LEX
|
||||
AC_PATH_PROG([FLEX], [flex])
|
||||
test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build Mesa])
|
||||
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
AC_PATH_PROG([BISON], [bison])
|
||||
test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build Mesa])
|
||||
|
||||
dnl Our fallback install-sh is a symlink to minstall. Use the existing
|
||||
dnl configuration in that case.
|
||||
@@ -86,6 +66,18 @@ solaris*)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_PATH_PROG([GTESTCONFIG], [gtest-config])
|
||||
if test "x$GTESTCONFIG" != "x"; then
|
||||
GTEST_CFLAGS=`gtest-config --cppflags --cxxflags`
|
||||
GTEST_LIBS=`gtest-config --ldflags --libs`
|
||||
AC_SUBST([GTEST_CFLAGS])
|
||||
AC_SUBST([GTEST_LIBS])
|
||||
HAVE_GTEST=yes
|
||||
else
|
||||
HAVE_GTEST=no
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GTEST, test x$HAVE_GTEST = xyes)
|
||||
|
||||
dnl clang is mostly GCC-compatible, but its version is much lower,
|
||||
dnl so we have to check for it.
|
||||
AC_MSG_CHECKING([if compiling with clang])
|
||||
@@ -109,11 +101,11 @@ if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
|
||||
|
||||
GCC_VERSION=`$CC -dumpversion`
|
||||
if test $? -eq 0; then
|
||||
GCC_VERSION_MAJOR=`echo $GCC_VERSION | cut -d. -f1`
|
||||
GCC_VERSION_MINOR=`echo $GCC_VERSION | cut -d. -f2`
|
||||
major=`echo $GCC_VERSION | cut -d. -f1`
|
||||
minor=`echo $GCC_VERSION | cut -d. -f2`
|
||||
fi
|
||||
|
||||
if test $GCC_VERSION_MAJOR -lt 3 -o $GCC_VERSION_MAJOR -eq 3 -a $GCC_VERSION_MINOR -lt 3 ; then
|
||||
if test $major -lt 3 -o $major -eq 3 -a $minor -lt 3 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.])
|
||||
else
|
||||
@@ -175,20 +167,10 @@ esac
|
||||
|
||||
dnl Add flags for gcc and g++
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -Wall -std=c99"
|
||||
|
||||
# Enable -Werror=implicit-function-declaration and
|
||||
# -Werror=missing-prototypes, if available, or otherwise, just
|
||||
# -Wmissing-prototypes. This is particularly useful to avoid
|
||||
# generating a loadable driver module that has undefined symbols.
|
||||
save_CFLAGS="$CFLAGS"
|
||||
AC_MSG_CHECKING([whether $CC supports -Werror=missing-prototypes])
|
||||
CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
|
||||
CFLAGS="$CFLAGS -Werror=missing-prototypes"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
AC_MSG_RESULT([yes]),
|
||||
[CFLAGS="$save_CFLAGS -Wmissing-prototypes";
|
||||
AC_MSG_RESULT([no])]);
|
||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99"
|
||||
if test "x$CLANG" = "xno"; then
|
||||
CFLAGS="$CFLAGS -ffast-math"
|
||||
fi
|
||||
|
||||
# Enable -fvisibility=hidden if using a gcc that supports it
|
||||
save_CFLAGS="$CFLAGS"
|
||||
@@ -285,9 +267,39 @@ if test "x$enable_64bit" = xyes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl shared/static libraries, mimic libtool options
|
||||
dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static],
|
||||
[build static libraries @<:@default=disabled@:>@])],
|
||||
[enable_static="$enableval"],
|
||||
[enable_static=no]
|
||||
)
|
||||
case "x$enable_static" in
|
||||
xyes|xno ) ;;
|
||||
x ) enable_static=no ;;
|
||||
* )
|
||||
AC_MSG_ERROR([Static library option '$enable_static' is not a valid])
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--disable-shared],
|
||||
[build shared libraries @<:@default=enabled@:>@])],
|
||||
[enable_shared="$enableval"],
|
||||
[enable_shared=yes]
|
||||
)
|
||||
case "x$enable_shared" in
|
||||
xyes|xno ) ;;
|
||||
x ) enable_shared=yes ;;
|
||||
* )
|
||||
AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Can't have static and shared libraries, default to static if user
|
||||
dnl explicitly requested. If both disabled, set to static since shared
|
||||
dnl was explicitly requested.
|
||||
dnl was explicitly requirested.
|
||||
case "x$enable_static$enable_shared" in
|
||||
xyesyes )
|
||||
AC_MSG_WARN([Can't build static and shared libraries, disabling shared])
|
||||
@@ -371,7 +383,6 @@ fi
|
||||
AC_SUBST([GL_LIB])
|
||||
AC_SUBST([GLU_LIB])
|
||||
AC_SUBST([OSMESA_LIB])
|
||||
AM_CONDITIONAL(HAVE_MANGLED_GL, test $GL_LIB = MangledGL)
|
||||
|
||||
dnl
|
||||
dnl potentially-infringing-but-nobody-knows-for-sure stuff
|
||||
@@ -396,6 +407,8 @@ 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}
|
||||
GBM_LIB_NAME='lib$(GBM_LIB).'${LIB_EXTENSION}
|
||||
|
||||
GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
@@ -406,6 +419,8 @@ GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'
|
||||
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}'*'
|
||||
GBM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GBM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
|
||||
|
||||
AC_SUBST([GL_LIB_NAME])
|
||||
AC_SUBST([GLU_LIB_NAME])
|
||||
@@ -415,6 +430,8 @@ 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([GBM_LIB_NAME])
|
||||
|
||||
AC_SUBST([GL_LIB_GLOB])
|
||||
AC_SUBST([GLU_LIB_GLOB])
|
||||
@@ -424,6 +441,8 @@ 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])
|
||||
AC_SUBST([GBM_LIB_GLOB])
|
||||
|
||||
dnl
|
||||
dnl Arch/platform-specific settings
|
||||
@@ -495,6 +514,11 @@ if test "x$enable_asm" = xyes; then
|
||||
GLAPI_ASM_SOURCES='$(X86-64_API)'
|
||||
AC_MSG_RESULT([yes, x86_64])
|
||||
;;
|
||||
ppc)
|
||||
ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
|
||||
MESA_ASM_SOURCES='$(PPC_SOURCES)'
|
||||
AC_MSG_RESULT([yes, ppc])
|
||||
;;
|
||||
sparc)
|
||||
ASM_FLAGS="-DUSE_SPARC_ASM"
|
||||
MESA_ASM_SOURCES='$(SPARC_SOURCES)'
|
||||
@@ -616,11 +640,7 @@ AC_ARG_ENABLE([va],
|
||||
[enable va library @<:@default=auto@:>@])],
|
||||
[enable_va="$enableval"],
|
||||
[enable_va=auto])
|
||||
AC_ARG_ENABLE([opencl],
|
||||
[AS_HELP_STRING([--enable-opencl],
|
||||
[enable OpenCL library @<:@default=no@:>@])],
|
||||
[enable_opencl="$enableval"],
|
||||
[enable_opencl=no])
|
||||
|
||||
AC_ARG_ENABLE([xlib_glx],
|
||||
[AS_HELP_STRING([--enable-xlib-glx],
|
||||
[make GLX library Xlib-based instead of DRI-based @<:@default=disable@:>@])],
|
||||
@@ -641,18 +661,6 @@ AC_ARG_ENABLE([gallium_gbm],
|
||||
[enable_gallium_gbm="$enableval"],
|
||||
[enable_gallium_gbm=auto])
|
||||
|
||||
AC_ARG_ENABLE([r600-llvm-compiler],
|
||||
[AS_HELP_STRING([--enable-r600-llvm-compiler],
|
||||
[Enable experimental LLVM backend for graphics shaders @<:@default=disable@:>@])],
|
||||
[enable_r600_llvm="$enableval"],
|
||||
[enable_r600_llvm=no])
|
||||
|
||||
AC_ARG_ENABLE([gallium_tests],
|
||||
[AS_HELP_STRING([--enable-gallium-tests],
|
||||
[Enable optional Gallium tests) @<:@default=disable@:>@])],
|
||||
[enable_gallium_tests="$enableval"],
|
||||
[enable_gallium_tests=no])
|
||||
|
||||
# Option for Gallium drivers
|
||||
GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
|
||||
|
||||
@@ -680,8 +688,7 @@ if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_d3d1x" = xno -a \
|
||||
"x$enable_xvmc" = xno -a \
|
||||
"x$enable_vdpau" = xno -a \
|
||||
"x$enable_va" = xno -a \
|
||||
"x$enable_opencl" = xno; then
|
||||
"x$enable_va" = xno; then
|
||||
AC_MSG_ERROR([at least one API should be enabled])
|
||||
fi
|
||||
|
||||
@@ -708,13 +715,8 @@ AC_ARG_ENABLE([shared-glapi],
|
||||
SHARED_GLAPI="0"
|
||||
if test "x$enable_shared_glapi" = xyes; then
|
||||
SHARED_GLAPI="1"
|
||||
# libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use
|
||||
# the remap table)
|
||||
DEFINES="$DEFINES -DIN_DRI_DRIVER"
|
||||
SRC_DIRS="$SRC_DIRS mapi/shared-glapi"
|
||||
fi
|
||||
AC_SUBST([SHARED_GLAPI])
|
||||
AM_CONDITIONAL(HAVE_SHARED_GLAPI, test $SHARED_GLAPI = 1)
|
||||
|
||||
dnl
|
||||
dnl Driver configuration. Options are xlib, dri and osmesa right now.
|
||||
@@ -725,7 +727,7 @@ default_driver="xlib"
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64|powerpc*|sparc*|ia64*) default_driver="dri";;
|
||||
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
|
||||
esac
|
||||
;;
|
||||
*freebsd* | dragonfly* | *netbsd*)
|
||||
@@ -794,8 +796,6 @@ if test "x$enable_glx" = xno; then
|
||||
enable_xlib_glx=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_DRI, test x"$enable_dri" = xyes)
|
||||
|
||||
dnl
|
||||
dnl Driver specific build directories
|
||||
dnl
|
||||
@@ -803,7 +803,7 @@ dnl
|
||||
dnl this variable will be prepended to SRC_DIRS and is not exported
|
||||
CORE_DIRS=""
|
||||
|
||||
SRC_DIRS="gtest"
|
||||
SRC_DIRS=""
|
||||
GLU_DIRS="sgi"
|
||||
GALLIUM_DIRS="auxiliary drivers state_trackers"
|
||||
GALLIUM_TARGET_DIRS=""
|
||||
@@ -1052,7 +1052,6 @@ esac
|
||||
# builds.
|
||||
AM_CONDITIONAL(HAVE_XCB_GLX_CREATE_CONTEXT,
|
||||
test x$HAVE_XCB_GLX_CREATE_CONTEXT = xyes)
|
||||
AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes)
|
||||
|
||||
GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
|
||||
GLESv1_CM_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
|
||||
@@ -1079,14 +1078,26 @@ DRI_CXXFLAGS='$(CXXFLAGS)'
|
||||
DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
|
||||
MESA_MODULES='$(TOP)/src/mesa/libmesa.a'
|
||||
|
||||
if test "x$enable_dri" = xyes && test "x$driglx_direct" = xyes ; then
|
||||
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)'
|
||||
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 "x$enable_dri" = xyes ; 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])
|
||||
@@ -1250,23 +1261,18 @@ if test "x$enable_dri" = xyes; then
|
||||
EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
|
||||
])
|
||||
AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])])
|
||||
save_LIBS="$LIBS"
|
||||
AC_CHECK_LIB([expat],[XML_ParserCreate],[],
|
||||
[AC_MSG_ERROR([Expat required for DRI.])])
|
||||
LIBS="$save_LIBS"
|
||||
fi
|
||||
|
||||
# if we are building any dri driver other than swrast ...
|
||||
# libdrm is required for all except swrast
|
||||
if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then
|
||||
# ... libdrm is required
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
|
||||
fi
|
||||
# ... and build dricommon
|
||||
HAVE_COMMON_DRI=yes
|
||||
fi
|
||||
|
||||
# put all the necessary libs together
|
||||
# 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"
|
||||
fi
|
||||
AC_SUBST([DRI_DIRS])
|
||||
@@ -1276,59 +1282,21 @@ AC_SUBST([DRI_LIB_DEPS])
|
||||
case $DRI_DIRS in
|
||||
*i915*|*i965*)
|
||||
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
|
||||
|
||||
for d in $(echo $DRI_DIRS | sed 's/,/ /g'); do
|
||||
case $d in
|
||||
i915)
|
||||
HAVE_I915_DRI=yes;
|
||||
;;
|
||||
i965)
|
||||
HAVE_I965_DRI=yes;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
case $DRI_DIRS in
|
||||
*nouveau*)
|
||||
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NVVIEUX_REQUIRED])
|
||||
HAVE_NOUVEAU_DRI=yes;
|
||||
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
|
||||
;;
|
||||
esac
|
||||
|
||||
case $DRI_DIRS in
|
||||
*radeon*|*r200*)
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
|
||||
for d in $(echo $DRI_DIRS | sed 's/,/ /g'); do
|
||||
case $d in
|
||||
radeon)
|
||||
HAVE_RADEON_DRI=yes;
|
||||
;;
|
||||
r200)
|
||||
HAVE_R200_DRI=yes;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
case $DRI_DIRS in
|
||||
*swrast*)
|
||||
HAVE_SWRAST_DRI=yes;
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_I965_DRI, test x$HAVE_I965_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes)
|
||||
|
||||
dnl
|
||||
dnl OSMesa configuration
|
||||
@@ -1387,9 +1355,11 @@ if test "x$enable_gbm" = xauto; then
|
||||
fi
|
||||
if test "x$enable_gbm" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS gbm"
|
||||
GBM_BACKEND_DIRS=""
|
||||
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
|
||||
AC_MSG_ERROR([gbm needs udev]))
|
||||
GBM_LIB_DEPS="$DLOPEN_LIBS $LIBUDEV_LIBS"
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
|
||||
@@ -1398,10 +1368,14 @@ if test "x$enable_gbm" = xyes; then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([GBM_LIB_DEPS])
|
||||
AC_SUBST([GBM_BACKEND_DIRS])
|
||||
GBM_PC_REQ_PRIV="libudev"
|
||||
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
|
||||
GBM_PC_CFLAGS=
|
||||
AC_SUBST([GBM_PC_REQ_PRIV])
|
||||
AC_SUBST([GBM_PC_LIB_PRIV])
|
||||
AC_SUBST([GBM_PC_CFLAGS])
|
||||
|
||||
dnl
|
||||
dnl EGL configuration
|
||||
@@ -1411,13 +1385,14 @@ EGL_CLIENT_APIS=""
|
||||
if test "x$enable_egl" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS egl"
|
||||
EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
|
||||
EGL_DRIVERS_DIRS=""
|
||||
|
||||
AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"])
|
||||
|
||||
if test "$enable_static" != yes; then
|
||||
# build egl_glx when libGL is built
|
||||
if test "x$enable_glx" = xyes; then
|
||||
HAVE_EGL_DRIVER_GLX=1
|
||||
EGL_DRIVERS_DIRS="glx"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
|
||||
@@ -1429,19 +1404,21 @@ if test "x$enable_egl" = xyes; then
|
||||
# build egl_dri2 when xcb-dri2 is available
|
||||
PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes],
|
||||
[have_xcb_dri2=yes],[have_xcb_dri2=no])
|
||||
|
||||
if test "$have_xcb_dri2" = yes; then
|
||||
HAVE_EGL_DRIVER_DRI2=1
|
||||
EGL_DRIVER_DRI2=dri2
|
||||
DEFINES="$DEFINES -DHAVE_XCB_DRI2"
|
||||
# workaround a bug in xcb-dri2 generated by xcb-proto 1.6
|
||||
save_LIBS="$LIBS"
|
||||
AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
|
||||
[DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
|
||||
LIBS="$save_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS $EGL_DRIVER_DRI2"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([EGL_LIB_DEPS])
|
||||
AC_SUBST([EGL_DRIVERS_DIRS])
|
||||
|
||||
dnl
|
||||
dnl EGL Gallium configuration
|
||||
@@ -1488,7 +1465,6 @@ if test "x$enable_gallium_gbm" = xyes; then
|
||||
GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
|
||||
HAVE_ST_GBM="yes"
|
||||
enable_gallium_loader=yes
|
||||
fi
|
||||
|
||||
dnl
|
||||
@@ -1590,42 +1566,24 @@ if test "x$enable_gallium_g3dvl" = xyes; then
|
||||
fi
|
||||
|
||||
if test "x$enable_xvmc" = xyes; then
|
||||
PKG_CHECK_MODULES([XVMC], [xvmc >= 1.0.6 x11-xcb xcb-dri2 >= 1.8])
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xvmc"
|
||||
PKG_CHECK_MODULES([XVMC], [xvmc >= 1.0.6])
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg/xvmc"
|
||||
HAVE_ST_XVMC="yes"
|
||||
fi
|
||||
|
||||
if test "x$enable_vdpau" = xyes; then
|
||||
PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1 x11-xcb xcb-dri2 >= 1.8])
|
||||
PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1])
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau"
|
||||
HAVE_ST_VDPAU="yes"
|
||||
fi
|
||||
|
||||
if test "x$enable_va" = xyes; then
|
||||
PKG_CHECK_MODULES([LIBVA], [libva = 0.31.1 x11-xcb xcb-dri2 >= 1.8])
|
||||
PKG_CHECK_MODULES([LIBVA], [libva = 0.31.1])
|
||||
AC_MSG_WARN([vaapi state tracker currently unmaintained])
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS va"
|
||||
HAVE_ST_VA="yes"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl OpenCL configuration
|
||||
dnl
|
||||
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
if test "x$with_gallium_drivers" = x; then
|
||||
AC_MSG_ERROR([cannot enable OpenCL without Gallium])
|
||||
fi
|
||||
|
||||
if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 6; then
|
||||
AC_MSG_ERROR([gcc >= 4.6 is required to build clover])
|
||||
fi
|
||||
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS clover"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS opencl"
|
||||
enable_gallium_loader=yes
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl GLU configuration
|
||||
dnl
|
||||
@@ -1687,12 +1645,9 @@ if test "x$with_gallium_drivers" != x; then
|
||||
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
|
||||
fi
|
||||
|
||||
AC_SUBST([LLVM_BINDIR])
|
||||
AC_SUBST([LLVM_CFLAGS])
|
||||
AC_SUBST([LLVM_CXXFLAGS])
|
||||
AC_SUBST([LLVM_LIBS])
|
||||
AC_SUBST([LLVM_LDFLAGS])
|
||||
AC_SUBST([LLVM_INCLUDEDIR])
|
||||
AC_SUBST([LLVM_VERSION])
|
||||
|
||||
case "x$enable_opengl$enable_gles1$enable_gles2" in
|
||||
@@ -1709,23 +1664,26 @@ AC_ARG_WITH([egl-platforms],
|
||||
[comma delimited native platforms libEGL supports, e.g.
|
||||
"x11,drm" @<:@default=auto@:>@])],
|
||||
[with_egl_platforms="$withval"],
|
||||
[if test "x$enable_egl" = xyes; then
|
||||
with_egl_platforms="x11"
|
||||
else
|
||||
with_egl_platforms=""
|
||||
fi])
|
||||
[with_egl_platforms=yes])
|
||||
|
||||
EGL_PLATFORMS=""
|
||||
WAYLAND_EGL_LIB_DEPS=""
|
||||
|
||||
if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
|
||||
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
|
||||
fi
|
||||
|
||||
# verify the requested driver directories exist
|
||||
egl_platforms=`IFS=', '; echo $with_egl_platforms`
|
||||
for plat in $egl_platforms; do
|
||||
case "$with_egl_platforms" in
|
||||
yes)
|
||||
if test "x$enable_egl" = xyes; then
|
||||
EGL_PLATFORMS="x11"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test "x$enable_egl" != xyes; then
|
||||
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
|
||||
fi
|
||||
# verify the requested driver directories exist
|
||||
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' does not exist])
|
||||
AC_MSG_ERROR([EGL platform '$plat' doesn't exist])
|
||||
if test "$plat" = "fbdev"; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev"
|
||||
fi
|
||||
@@ -1735,10 +1693,8 @@ for plat in $egl_platforms; do
|
||||
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"
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
|
||||
|
||||
m4_ifdef([WAYLAND_SCANNER_RULES],
|
||||
[WAYLAND_SCANNER_RULES(['$(top_srcdir)/src/egl/wayland/wayland-drm/protocol'])])
|
||||
fi
|
||||
if test "$plat" = "drm" && test "x$enable_gbm" = "xno"; then
|
||||
AC_MSG_ERROR([EGL platform drm needs gbm])
|
||||
@@ -1747,31 +1703,21 @@ for plat in $egl_platforms; do
|
||||
waylandno|drmno)
|
||||
AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# libEGL wants to default to the first platform specified in
|
||||
# ./configure. parse that here.
|
||||
if test "x$egl_platforms" != "x"; then
|
||||
FIRST_PLATFORM_CAPS=`echo $egl_platforms | sed 's| .*||' | tr 'a-z' 'A-Z'`
|
||||
EGL_NATIVE_PLATFORM="_EGL_PLATFORM_$FIRST_PLATFORM_CAPS"
|
||||
else
|
||||
EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM"
|
||||
fi
|
||||
|
||||
EGL_PLATFORMS="$egl_platforms"
|
||||
|
||||
AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1)
|
||||
AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1)
|
||||
AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1)
|
||||
AM_CONDITIONAL(HAVE_EGL_PLATFORM_FBDEV, echo "$egl_platforms" | grep 'fbdev' >/dev/null 2>&1)
|
||||
AM_CONDITIONAL(HAVE_EGL_PLATFORM_NULL, echo "$egl_platforms" | grep 'null' >/dev/null 2>&1)
|
||||
|
||||
AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
|
||||
AM_CONDITIONAL(HAVE_EGL_DRIVER_GLX, test "x$HAVE_EGL_DRIVER_GLX" != "x")
|
||||
|
||||
AC_SUBST([EGL_NATIVE_PLATFORM])
|
||||
done
|
||||
EGL_PLATFORMS="$egl_platforms"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([EGL_PLATFORMS])
|
||||
AC_SUBST([EGL_CFLAGS])
|
||||
|
||||
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],
|
||||
@@ -1810,13 +1756,6 @@ AC_ARG_ENABLE([gallium-llvm],
|
||||
[build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
|
||||
[enable_gallium_llvm="$enableval"],
|
||||
[enable_gallium_llvm=auto])
|
||||
|
||||
AC_ARG_WITH([llvm-shared-libs],
|
||||
[AS_HELP_STRING([--with-llvm-shared-libs],
|
||||
[link with LLVM shared libraries @<:@default=disabled@:>@])],
|
||||
[with_llvm_shared_libs=yes],
|
||||
[with_llvm_shared_libs=no])
|
||||
|
||||
if test "x$with_gallium_drivers" = x; then
|
||||
enable_gallium_llvm=no
|
||||
fi
|
||||
@@ -1831,17 +1770,10 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
if test "x$LLVM_CONFIG" != xno; then
|
||||
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
|
||||
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g'`
|
||||
if test "x$with_llvm_shared_libs" = xyes; then
|
||||
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
|
||||
LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`"
|
||||
else
|
||||
LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter`"
|
||||
fi
|
||||
LLVM_LIBS="`$LLVM_CONFIG --libs`"
|
||||
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
|
||||
LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags`
|
||||
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`"
|
||||
DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"
|
||||
MESA_LLVM=1
|
||||
else
|
||||
MESA_LLVM=0
|
||||
@@ -1850,22 +1782,6 @@ else
|
||||
MESA_LLVM=0
|
||||
fi
|
||||
|
||||
dnl Directory for XVMC libs
|
||||
AC_ARG_WITH([xvmc-libdir],
|
||||
[AS_HELP_STRING([--with-xvmc-libdir=DIR],
|
||||
[directory for the XVMC libraries @<:@default=${libdir}@:>@])],
|
||||
[XVMC_LIB_INSTALL_DIR="$withval"],
|
||||
[XVMC_LIB_INSTALL_DIR='${libdir}'])
|
||||
AC_SUBST([XVMC_LIB_INSTALL_DIR])
|
||||
|
||||
dnl
|
||||
dnl Gallium Tests
|
||||
dnl
|
||||
if test "x$enable_gallium_tests" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS gallium/tests/trivial"
|
||||
enable_gallium_loader=yes
|
||||
fi
|
||||
|
||||
dnl Directory for VDPAU libs
|
||||
AC_ARG_WITH([vdpau-libdir],
|
||||
[AS_HELP_STRING([--with-vdpau-libdir=DIR],
|
||||
@@ -1882,14 +1798,6 @@ AC_ARG_WITH([va-libdir],
|
||||
[VA_LIB_INSTALL_DIR='${libdir}/va'])
|
||||
AC_SUBST([VA_LIB_INSTALL_DIR])
|
||||
|
||||
dnl Directory for OpenCL libs
|
||||
AC_ARG_WITH([opencl-libdir],
|
||||
[AS_HELP_STRING([--with-opencl-libdir=DIR],
|
||||
[directory for the OpenCL libraries @<:@default=${libdir}/opencl@:>@])],
|
||||
[OPENCL_LIB_INSTALL_DIR="$withval"],
|
||||
[OPENCL_LIB_INSTALL_DIR='${libdir}/opencl'])
|
||||
AC_SUBST([OPENCL_LIB_INSTALL_DIR])
|
||||
|
||||
dnl
|
||||
dnl Gallium helper functions
|
||||
dnl
|
||||
@@ -1913,12 +1821,15 @@ gallium_check_st() {
|
||||
fi
|
||||
if test "x$HAVE_ST_XVMC" = xyes && test "x$5" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
|
||||
NEED_G3DVL_DRI="yes"
|
||||
fi
|
||||
if test "x$HAVE_ST_VDPAU" = xyes && test "x$6" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
|
||||
NEED_G3DVL_DRI="yes"
|
||||
fi
|
||||
if test "x$HAVE_ST_VA" = xyes && test "x$7" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $7"
|
||||
NEED_G3DVL_DRI="yes"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1930,17 +1841,6 @@ gallium_require_llvm() {
|
||||
fi
|
||||
}
|
||||
|
||||
gallium_require_drm_loader() {
|
||||
if test "x$enable_gallium_loader" = xyes; then
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
|
||||
AC_MSG_ERROR([Gallium drm loader requrires libudev]))
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
|
||||
fi
|
||||
enable_gallium_drm_loader=yes
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Gallium drivers
|
||||
dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
|
||||
if test "x$with_gallium_drivers" != x; then
|
||||
@@ -1961,38 +1861,17 @@ if test "x$with_gallium_drivers" != x; then
|
||||
gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
|
||||
;;
|
||||
xr300)
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
gallium_require_llvm "Gallium R300"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
|
||||
gallium_check_st "radeon/drm" "dri-r300" "xorg-r300" "" "xvmc-r300" "vdpau-r300" "va-r300"
|
||||
;;
|
||||
xr600)
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
|
||||
if test "x$enable_r600_llvm" = xyes; then
|
||||
if test "x$LLVM_VERSION" != "x3.1"; then
|
||||
AC_MSG_ERROR([LLVM 3.1 is required for the r600 llvm compiler.])
|
||||
fi
|
||||
NEED_RADEON_GALLIUM=yes;
|
||||
USE_R600_LLVM_COMPILER=yes;
|
||||
fi
|
||||
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" "va-r600"
|
||||
;;
|
||||
xradeonsi)
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
|
||||
if test "x$LLVM_VERSION" != "x3.1"; then
|
||||
AC_MSG_ERROR([LLVM 3.1 is required to build the radeonsi driver.])
|
||||
fi
|
||||
NEED_RADEON_GALLIUM=yes;
|
||||
gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi"
|
||||
;;
|
||||
xnouveau)
|
||||
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv50 nvc0"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
|
||||
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
|
||||
;;
|
||||
xswrast)
|
||||
@@ -2028,52 +1907,10 @@ if test "x$with_gallium_drivers" != x; then
|
||||
done
|
||||
fi
|
||||
|
||||
if test "x$enable_gallium_loader" = xyes; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
|
||||
GALLIUM_PIPE_LOADER_DEFINES="-DHAVE_PIPE_LOADER_SW"
|
||||
GALLIUM_PIPE_LOADER_LIBS="\$(TOP)/src/gallium/auxiliary/pipe-loader/libpipe_loader.a"
|
||||
GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(TOP)/src/gallium/winsys/sw/null/libws_null.a"
|
||||
|
||||
if test "x$HAVE_WINSYS_XLIB" = xyes; then
|
||||
GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
|
||||
GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a"
|
||||
fi
|
||||
|
||||
if test "x$enable_gallium_drm_loader" = xyes; then
|
||||
GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_DRM"
|
||||
fi
|
||||
|
||||
AC_SUBST([GALLIUM_PIPE_LOADER_DEFINES])
|
||||
AC_SUBST([GALLIUM_PIPE_LOADER_LIBS])
|
||||
if test "x$NEED_G3DVL_DRI" = xyes; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS g3dvl/dri"
|
||||
fi
|
||||
|
||||
dnl Tell Automake which drivers to build
|
||||
for driver in $GALLIUM_DRIVERS_DIRS; do
|
||||
case "x$driver" in
|
||||
xgalahad)
|
||||
HAVE_GALAHAD_GALLIUM=yes;
|
||||
;;
|
||||
xidentity)
|
||||
HAVE_IDENTITY_GALLIUM=yes;
|
||||
;;
|
||||
xnoop)
|
||||
HAVE_NOOP_GALLIUM=yes;
|
||||
;;
|
||||
*)
|
||||
GALLIUM_MAKE_DIRS="$GALLIUM_MAKE_DIRS $driver"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
AM_CONDITIONAL(HAVE_GALAHAD_GALLIUM, test x$HAVE_GALAHAD_GALLIUM = xyes)
|
||||
AM_CONDITIONAL(HAVE_IDENTITY_GALLIUM, test x$HAVE_IDENTITY_GALLIUM = xyes)
|
||||
AM_CONDITIONAL(HAVE_NOOP_GALLIUM, test x$HAVE_NOOP_GALLIUM = xyes)
|
||||
AM_CONDITIONAL(NEED_RADEON_GALLIUM, test x$NEED_RADEON_GALLIUM = xyes)
|
||||
AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
|
||||
AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
|
||||
AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
|
||||
AC_SUBST([GALLIUM_MAKE_DIRS])
|
||||
|
||||
dnl prepend CORE_DIRS to SRC_DIRS
|
||||
SRC_DIRS="$CORE_DIRS $SRC_DIRS"
|
||||
|
||||
@@ -2087,36 +1924,6 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
|
||||
|
||||
dnl Substitute the config
|
||||
AC_CONFIG_FILES([configs/autoconf
|
||||
src/gallium/auxiliary/pipe-loader/Makefile
|
||||
src/gallium/state_trackers/clover/Makefile
|
||||
src/gallium/drivers/Makefile
|
||||
src/gallium/drivers/r300/Makefile
|
||||
src/gallium/drivers/r600/Makefile
|
||||
src/gallium/targets/opencl/Makefile
|
||||
src/gbm/Makefile
|
||||
src/gbm/main/gbm.pc
|
||||
src/egl/drivers/Makefile
|
||||
src/egl/drivers/dri2/Makefile
|
||||
src/egl/drivers/glx/Makefile
|
||||
src/egl/main/Makefile
|
||||
src/egl/main/egl.pc
|
||||
src/egl/wayland/Makefile
|
||||
src/egl/wayland/wayland-egl/Makefile
|
||||
src/egl/wayland/wayland-egl/wayland-egl.pc
|
||||
src/egl/wayland/wayland-drm/Makefile
|
||||
src/glsl/tests/Makefile
|
||||
src/glx/Makefile
|
||||
src/mapi/shared-glapi/Makefile
|
||||
src/gtest/Makefile
|
||||
src/mesa/drivers/dri/dri.pc
|
||||
src/mesa/drivers/dri/Makefile
|
||||
src/mesa/drivers/dri/common/Makefile
|
||||
src/mesa/drivers/dri/i915/Makefile
|
||||
src/mesa/drivers/dri/i965/Makefile
|
||||
src/mesa/drivers/dri/nouveau/Makefile
|
||||
src/mesa/drivers/dri/r200/Makefile
|
||||
src/mesa/drivers/dri/radeon/Makefile
|
||||
src/mesa/drivers/dri/swrast/Makefile
|
||||
tests/Makefile
|
||||
tests/glx/Makefile])
|
||||
|
||||
@@ -2132,7 +1939,6 @@ dnl Sort the dirs alphabetically
|
||||
GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
GALLIUM_MAKE_DIRS=`echo $GALLIUM_MAKE_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -2168,6 +1974,7 @@ if test "x$enable_dri" != xno; then
|
||||
echo " DRI drivers: $dri_dirs"
|
||||
fi
|
||||
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
|
||||
echo " Shared dricore: $enable_dricore"
|
||||
fi
|
||||
|
||||
case "x$enable_glx$enable_xlib_glx" in
|
||||
@@ -2192,12 +1999,9 @@ if test "$enable_egl" = yes; then
|
||||
echo " EGL platforms: $EGL_PLATFORMS"
|
||||
|
||||
egl_drivers=""
|
||||
if test "x$HAVE_EGL_DRIVER_GLX" != "x"; then
|
||||
egl_drivers="$egl_drivers builtin:egl_glx"
|
||||
fi
|
||||
if test "x$HAVE_EGL_DRIVER_DRI2" != "x"; then
|
||||
egl_drivers="$egl_drivers builtin:egl_dri2"
|
||||
fi
|
||||
for d in $EGL_DRIVERS_DIRS; do
|
||||
egl_drivers="$egl_drivers builtin:egl_$d"
|
||||
done
|
||||
|
||||
if test "x$HAVE_ST_EGL" = xyes; then
|
||||
echo " EGL drivers: ${egl_drivers} egl_gallium"
|
||||
|
69
docs/GL3.txt
69
docs/GL3.txt
@@ -14,44 +14,45 @@ GL 3.0:
|
||||
|
||||
GLSL 1.30 DONE
|
||||
glBindFragDataLocation, glGetFragDataLocation DONE
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (i965, r300, r600, swrast)
|
||||
Map buffer subranges (GL_ARB_map_buffer_range) DONE (i965, r300, r600, swrast)
|
||||
Clamping controls (GL_ARB_color_buffer_float) DONE (i965, r300, r600)
|
||||
Float textures, renderbuffers (GL_ARB_texture_float) DONE (i965, r300, r600)
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (i965, r600, swrast)
|
||||
Map buffer subranges (GL_ARB_map_buffer_range) DONE (i965, r600, swrast)
|
||||
Clamping controls (GL_ARB_color_buffer_float) DONE (i965, r600)
|
||||
Float textures, renderbuffers (GL_ARB_texture_float) DONE (i965, r600)
|
||||
GL_EXT_packed_float DONE (i965, r600)
|
||||
GL_EXT_texture_shared_exponent DONE (i965, r600, swrast)
|
||||
Float depth buffers (GL_ARB_depth_buffer_float) DONE (i965, r600)
|
||||
Framebuffer objects (GL_ARB_framebuffer_object) DONE (i965, r300, r600, swrast)
|
||||
Framebuffer objects (GL_EXT_framebuffer_object) DONE (i965, r600, swrast)
|
||||
Half-float DONE
|
||||
Non-normalized Integer texture/framebuffer formats DONE (i965)
|
||||
Multisample blit DONE
|
||||
Non-normalized Integer texture/framebuffer formats ~50% done
|
||||
1D/2D Texture arrays DONE
|
||||
Packed depth/stencil formats DONE
|
||||
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, swrast)
|
||||
GL_EXT_texture_compression_rgtc DONE (i965, r300, r600, swrast)
|
||||
GL_EXT_texture_compression_rgtc DONE (i965, r600, swrast)
|
||||
Red and red/green texture formats DONE (i965, swrast, gallium)
|
||||
Transform feedback (GL_EXT_transform_feedback) DONE (i965)
|
||||
Vertex array objects (GL_APPLE_vertex_array_object) DONE (i965, r300, r600, swrast)
|
||||
Vertex array objects (GL_APPLE_vertex_array_object) DONE (i965, r600, swrast)
|
||||
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600)
|
||||
glClearBuffer commands DONE
|
||||
glGetStringi command DONE
|
||||
glTexParameterI, glGetTexParameterI commands DONE
|
||||
glVertexAttribI commands ~50% done (converts int
|
||||
values to floats)
|
||||
glVertexAttribI commands DONE (but converts int
|
||||
values to floats)
|
||||
Depth format cube textures DONE
|
||||
GLX_ARB_create_context (GLX 1.4 is required) DONE
|
||||
|
||||
|
||||
GL 3.1:
|
||||
|
||||
GLSL 1.40 missing: UBOS, inverse(),
|
||||
highp change
|
||||
Instanced drawing (GL_ARB_draw_instanced) DONE (i965, gallium, swrast)
|
||||
Buffer copying (GL_ARB_copy_buffer) DONE (i965, r300, r600, swrast)
|
||||
Primitive restart (GL_NV_primitive_restart) DONE (i965, r600)
|
||||
GLSL 1.40 not started
|
||||
Instanced drawing (GL_ARB_draw_instanced) DONE (gallium, swrast)
|
||||
Buffer copying (GL_ARB_copy_buffer) DONE (i965, r600, swrast)
|
||||
Primitive restart (GL_NV_primitive_restart) DONE (r600)
|
||||
16 vertex texture image units DONE
|
||||
Texture buffer objs (GL_ARB_texture_buffer_object) needs GL3.1 enabling (i965)
|
||||
Rectangular textures (GL_ARB_texture_rectangle) DONE (i965, r300, r600, swrast)
|
||||
Texture buffer objs (GL_ARB_texture_buffer_object) not started
|
||||
Rectangular textures (GL_ARB_texture_rectangle) DONE (i965, r600, swrast)
|
||||
Uniform buffer objs (GL_ARB_uniform_buffer_object) not started
|
||||
Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600)
|
||||
Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r600)
|
||||
|
||||
|
||||
GL 3.2:
|
||||
@@ -59,28 +60,28 @@ GL 3.2:
|
||||
Core/compatibility profiles not started
|
||||
GLSL 1.50 not started
|
||||
Geometry shaders (GL_ARB_geometry_shader4) partially done (Zack)
|
||||
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (i965, r300, r600, swrast)
|
||||
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (i965, r300, r600, swrast)
|
||||
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, swrast)
|
||||
Provoking vertex (GL_ARB_provoking_vertex) DONE (i965, r300, r600, swrast)
|
||||
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (i965, r600, swrast)
|
||||
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (i965, r600, swrast)
|
||||
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r600, swrast)
|
||||
Provoking vertex (GL_ARB_provoking_vertex) DONE (i965, r600, swrast)
|
||||
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE (i965, r600)
|
||||
Multisample textures (GL_ARB_texture_multisample) not started
|
||||
Frag depth clamp (GL_ARB_depth_clamp) DONE (i965, r600, swrast)
|
||||
Fence objects (GL_ARB_sync) DONE (i965, r300, r600, swrast)
|
||||
Fence objects (GL_ARB_sync) DONE (i965, r600, swrast)
|
||||
GLX_ARB_create_context_profile DONE
|
||||
|
||||
|
||||
GL 3.3:
|
||||
|
||||
GLSL 3.30 not started
|
||||
GL_ARB_blend_func_extended DONE (r600, softpipe)
|
||||
GL_ARB_explicit_attrib_location DONE (i915, i965, r300, r600, swrast)
|
||||
GL_ARB_occlusion_query2 DONE (r300, r600, swrast)
|
||||
GL_ARB_sampler_objects DONE (i965, r300, r600)
|
||||
GL_ARB_texture_rgb10_a2ui DONE (r600)
|
||||
GL_ARB_texture_swizzle DONE (same as EXT version) (i965, r300, r600, swrast)
|
||||
GL_ARB_blend_func_extended not started
|
||||
GL_ARB_explicit_attrib_location DONE (i915, i965, r600, swrast)
|
||||
GL_ARB_occlusion_query2 DONE (r600, swrast)
|
||||
GL_ARB_sampler_objects DONE (i965, r600)
|
||||
GL_ARB_texture_rgb10_a2ui DONE (gallium)
|
||||
GL_ARB_texture_swizzle DONE (same as EXT version) (i965, r600, swrast)
|
||||
GL_ARB_timer_query ~60% done (the EXT variant)
|
||||
GL_ARB_instanced_arrays DONE (r300, r600)
|
||||
GL_ARB_instanced_arrays DONE (r600)
|
||||
GL_ARB_vertex_type_2_10_10_10_rev DONE (r600)
|
||||
|
||||
|
||||
@@ -88,7 +89,7 @@ GL 4.0:
|
||||
|
||||
GLSL 4.0 not started
|
||||
GL_ARB_texture_query_lod not started
|
||||
GL_ARB_draw_buffers_blend DONE (i965, r600, softpipe)
|
||||
GL_ARB_draw_buffers_blend DONE (r600, softpipe)
|
||||
GL_ARB_draw_indirect not started
|
||||
GL_ARB_gpu_shader_fp64 not started
|
||||
GL_ARB_sample_shading not started
|
||||
@@ -104,7 +105,7 @@ GL_ARB_transform_feedback3 not started
|
||||
GL 4.1:
|
||||
|
||||
GLSL 4.1 not started
|
||||
GL_ARB_ES2_compatibility DONE (i965, r300, r600)
|
||||
GL_ARB_ES2_compatibility DONE (i965, r600)
|
||||
GL_ARB_get_program_binary not started
|
||||
GL_ARB_separate_shader_objects some infrastructure done
|
||||
GL_ARB_shader_precision not started
|
||||
@@ -117,11 +118,11 @@ GLSL 4.2 not started
|
||||
GL_ARB_texture_compression_bptc not started
|
||||
GL_ARB_compressed_texture_pixel_storage not started
|
||||
GL_ARB_shader_atomic_counters not started
|
||||
GL_ARB_texture_storage DONE (r300, r600, swrast)
|
||||
GL_ARB_texture_storage DONE (r600, swrast)
|
||||
GL_ARB_transform_feedback_instanced not started
|
||||
GL_ARB_base_instance not started
|
||||
GL_ARB_shader_image_load_store not started
|
||||
GL_ARB_conservative_depth DONE (softpipe)
|
||||
GL_ARB_conservative_depth DONE (compiler)
|
||||
GL_ARB_shading_language_420pack not started
|
||||
GL_ARB_internalformat_query not started
|
||||
GL_ARB_map_buffer_alignment not started
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ><html LANG=en>
|
||||
<html>
|
||||
|
||||
<title>Compilation and Installation using Autoconf</title>
|
||||
|
||||
@@ -10,22 +10,23 @@
|
||||
<h1>Compilation and Installation using Autoconf</h1>
|
||||
|
||||
<ol>
|
||||
<li><p ><a href="#basic">Basic Usage</a></li>
|
||||
<li><p ><a href="#driver">Driver Options</a>
|
||||
<li><a href="#basic">Basic Usage</a></li>
|
||||
<li><a href="#driver">Driver Options</a></li>
|
||||
<ul>
|
||||
<li><a href="#xlib">Xlib Driver Options</a></li>
|
||||
<li><a href="#dri">DRI Driver Options</a></li>
|
||||
<li><a href="#osmesa">OSMesa Driver Options</a></li>
|
||||
</ul>
|
||||
<li><p ><a href="#library">Library Options</a>
|
||||
<li><a href="#library">Library Options</a></li>
|
||||
<ul>
|
||||
<li><a href="#glu">GLU</a></li>
|
||||
</ul>
|
||||
<li><p ><a href="#demos">Demo Program Options</a>
|
||||
<li><a href="#demos">Demo Program Options</a></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<h2 id="basic">1. Basic Usage</h2>
|
||||
<a name="basic">
|
||||
<h2>1. Basic Usage</h2>
|
||||
|
||||
<p>
|
||||
The autoconf generated configure script can be used to guess your
|
||||
@@ -103,6 +104,7 @@ package metadata in <code>/usr/X11R6</code> before the standard
|
||||
directories.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are also a few general options for altering the Mesa build:
|
||||
@@ -137,9 +139,11 @@ to force 32- or 64-bit code generation as used on the x86 and x86_64
|
||||
architectures.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
<h2 id="driver">2. Driver Options</h2>
|
||||
<a name="driver">
|
||||
<h2>2. Driver Options</h2>
|
||||
|
||||
<p>
|
||||
There are several different driver modes that Mesa can use. These are
|
||||
@@ -149,70 +153,84 @@ configure option --with-driver. There are currently three supported
|
||||
options in the configure script.
|
||||
</p>
|
||||
|
||||
<h3 id="xlib">Xlib</h3 ><p >This is the default mode for building Mesa.
|
||||
<ul>
|
||||
|
||||
<a name="xlib">
|
||||
<li><b><em>Xlib</em></b> - This is the default mode for building Mesa.
|
||||
It uses Xlib as a software renderer to do all rendering. It corresponds
|
||||
to the option <code>--with-driver=xlib</code>. The libX11 and libXext
|
||||
libraries, as well as the X11 development headers, will be need to
|
||||
support the Xlib driver.
|
||||
</li>
|
||||
|
||||
<h3 id="dri">DRI </h3 ><p >This mode uses the DRI hardware drivers for
|
||||
<a name="dri">
|
||||
<li><b><em>DRI</em></b> - This mode uses the DRI hardware drivers for
|
||||
accelerated OpenGL rendering. Enable the DRI drivers with the option
|
||||
<code>--with-driver=dri</code>. See the <a href="install.html">basic
|
||||
installation instructions</a> for details on prerequisites for the DRI
|
||||
drivers.
|
||||
</li>
|
||||
|
||||
<!-- DRI specific options -->
|
||||
<dl>
|
||||
<dt><code>--with-dri-driverdir=DIR</code>
|
||||
<dd ><p > This option specifies the
|
||||
<p>
|
||||
<ul>
|
||||
<li><code>--with-dri-driverdir=DIR</code> - This option specifies the
|
||||
location the DRI drivers will be installed to and the location libGL
|
||||
will search for DRI drivers. The default is <code>${libdir}/dri</code>.
|
||||
<dt><code>--with-dri-drivers=DRIVER,DRIVER,...</code>
|
||||
<dd ><p > This option
|
||||
</li>
|
||||
<li><code>--with-dri-drivers=DRIVER,DRIVER,...</code> - This option
|
||||
allows a specific set of DRI drivers to be built. For example,
|
||||
<code>--with-dri-drivers="swrast,i965,radeon,nouveau"</code>. By
|
||||
default, the drivers will be chosen depending on the target platform.
|
||||
See the directory <code>src/mesa/drivers/dri</code> in the source tree
|
||||
for available drivers. Beware that the swrast DRI driver is used by both
|
||||
libGL and the X.Org xserver GLX module to do software rendering, so you
|
||||
may run into problems if it is not available.
|
||||
may run into problems if it is not available.</li>
|
||||
<!-- This explanation might be totally bogus. Kristian? -->
|
||||
<dt><code>--disable-driglx-direct</code>
|
||||
<dd ><p > Disable direct rendering in
|
||||
<li><code>--disable-driglx-direct</code> - Disable direct rendering in
|
||||
GLX. Normally, direct hardware rendering through the DRI drivers and
|
||||
indirect software rendering are enabled in GLX. This option disables
|
||||
direct rendering entirely. It can be useful on architectures where
|
||||
kernel DRM modules are not available.
|
||||
<dt><code>--enable-glx-tls</code> <dd ><p >
|
||||
Enable Thread Local Storage (TLS) in
|
||||
</li>
|
||||
<li><code>--enable-glx-tls</code> - Enable Thread Local Storage (TLS) in
|
||||
GLX.
|
||||
<dt><code>--with-expat=DIR</code> <dd > The DRI-enabled libGL uses expat to
|
||||
</li>
|
||||
<li><code>--with-expat=DIR</code> - The DRI-enabled libGL uses expat to
|
||||
parse the DRI configuration files in <code>/etc/drirc</code> and
|
||||
<code>~/.drirc</code>. This option allows a specific expat installation
|
||||
to be used. For example, <code>--with-expat=/usr/local</code> will
|
||||
search for expat headers and libraries in <code>/usr/local/include</code>
|
||||
and <code>/usr/local/lib</code>, respectively.
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<h3 id="osmesa">OSMesa </h3><p> No libGL is built in this
|
||||
<a name="osmesa">
|
||||
<li><b><em>OSMesa</em></b> - No libGL is built in this
|
||||
mode. Instead, the driver code is built into the Off-Screen Mesa
|
||||
(OSMesa) library. See the <a href="osmesa.html">Off-Screen Rendering</a>
|
||||
page for more details.
|
||||
</li>
|
||||
|
||||
<!-- OSMesa specific options -->
|
||||
<dl>
|
||||
<dt><code>--with-osmesa-bits=BITS</code>
|
||||
<dd><p> This option allows the size
|
||||
<p>
|
||||
<ul>
|
||||
<li><code>--with-osmesa-bits=BITS</code> - This option allows the size
|
||||
of the color channel in bits to be specified. By default, an 8-bit
|
||||
channel will be used, and the driver will be named libOSMesa. Other
|
||||
options are 16- and 32-bit color channels, which will add the bit size
|
||||
to the library name. For example, <code>--with-osmesa-bits=16</code>
|
||||
will create the libOSMesa16 library with a 16-bit color channel.
|
||||
</dl>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 id="library">3. Library Options</h2>
|
||||
<a name="library">
|
||||
<h2>3. Library Options</h2>
|
||||
|
||||
<p>
|
||||
The configure script provides more fine grained control over the GL
|
||||
@@ -220,14 +238,18 @@ libraries that will be built. More details on the specific GL libraries
|
||||
can be found in the <a href="install.html">basic installation
|
||||
instructions</a>.
|
||||
|
||||
<dl>
|
||||
<dt id="glu">GLU <dd><p> The libGLU library will be built by default
|
||||
<ul>
|
||||
<a name="glu">
|
||||
<li><b><em>GLU</em></b> - The libGLU library will be built by default
|
||||
on all drivers. This can be disable with the option
|
||||
<code>--disable-glu</code>.
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
<h2 id="demos">4. Demo Program Options</h2>
|
||||
<a name="demos">
|
||||
<h2>4. Demo Program Options</h2>
|
||||
|
||||
<p>
|
||||
There are many demonstration programs in the MesaDemos tarball. If the
|
||||
@@ -235,16 +257,18 @@ programs are available when <code>./configure</code> is run, a subset of
|
||||
the programs will be built depending on the driver and library options
|
||||
chosen. See the directory <code>progs</code> for the full set of demos.
|
||||
|
||||
<dl>
|
||||
<dt><code>--with-demos=DEMOS,DEMOS,...</code>
|
||||
<dd><p> This option allows a
|
||||
<ul>
|
||||
<li><code>--with-demos=DEMOS,DEMOS,...</code> - This option allows a
|
||||
specific set of demo programs to be built. For example,
|
||||
<code>--with-demos="xdemos,slang"</code>. Beware that if this option is
|
||||
used, it will not be ensured that the necessary GL libraries will be
|
||||
available.
|
||||
<dt><code>--without-demos</code> <dd><p> This completely disables building the
|
||||
</li>
|
||||
<li><code>--without-demos</code> - This completely disables building the
|
||||
demo programs. It is equivalent to <code>--with-demos=no</code>.
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,27 +1,27 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html LANG=en>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Banner</title
|
||||
><STYLE TYPE="TEXT/CSS" ><!--
|
||||
BODY { BACKGROUND: BLACK; COLOR: WHITE } TABLE { width: 94%; text-align: left; }
|
||||
TD { vertical-align: top }
|
||||
H1 {
|
||||
FONT: X-LARGE sans-serif; TEXT-ALIGN: CENTER;
|
||||
HEIGHT: 75PX; MARGIN-LEFT: 100PX; MARGIN-RIGHT: 100PX }
|
||||
.gears { WIDTH: 100PX; HEIGHT: 73PX; FLOAT: LEFT; BACKGROUND: URL('gears.png') RIGHT NO-REPEAT }
|
||||
DIV + .gears { FLOAT: RIGHT; BACKGROUND-POSITION: LEFT }
|
||||
/*
|
||||
This should happen in the future instead:
|
||||
H1 {
|
||||
BORDER-LEFT: 71PX SOLID #C11800; BORDER-RIGHT: 71PX SOLID #00C130;
|
||||
BORDER-TOP: 0PX; BORDER-BOTTOM: 0PX;
|
||||
border-image: url(gears.png) 100%; -WEBKIT-border-image: url(gears.png) 100%;
|
||||
}
|
||||
*/
|
||||
}
|
||||
--></STYLE >
|
||||
<title>Banner</title>
|
||||
</head>
|
||||
<body ><DIV CLASS="gears" ></DIV ><DIV CLASS="gears" ></DIV ><H1 >The
|
||||
Mesa 3D Graphics Library</H1 >
|
||||
<body bgcolor="#000000" text="#ffffff">
|
||||
<center>
|
||||
<table style="width: 95%; text-align: left;" border="0" cellpadding="2"
|
||||
cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">
|
||||
<p><img src="gears.png"> </p>
|
||||
</td>
|
||||
<td style="text-align: center;"><font face="sans-serif" size="5">The
|
||||
Mesa 3D Graphics Library</font></td>
|
||||
<td style="vertical-align: top; text-align: right;">
|
||||
<p><img src="gears.png"> </p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><font face="sans-serif" size="5"><br>
|
||||
</font></p>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" >
|
||||
<HTML LANG=en >
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Bug Reporting</TITLE>
|
||||
|
||||
|
@@ -52,6 +52,7 @@ a:visited {
|
||||
|
||||
<b>User Topics</b>
|
||||
<ul>
|
||||
<li><a href="shading.html" target="MainFrame">Shading Language</a>
|
||||
<li><a href="egl.html" target="MainFrame">EGL</a>
|
||||
<li><a href="opengles.html" target="MainFrame">OpenGL ES</a>
|
||||
<li><a href="openvg.html" target="MainFrame">OpenVG / Vega</a>
|
||||
|
@@ -20,11 +20,25 @@ When a new release is coming, release candidates (betas) may be found
|
||||
</p>
|
||||
|
||||
|
||||
<H1>Unpacking</H1>
|
||||
|
||||
<p>
|
||||
Mesa releases are available in three formats: .tar.bz2, .tar.gz, and .zip
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
In the past, there was also MesaGLUT-x.y.z.{tar.bz2, tar.gz, zip} packages which
|
||||
contained Mark Kilgard's GLUT library.
|
||||
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.
|
||||
</p>
|
||||
|
||||
|
||||
<H1>Unpacking</H1>
|
||||
|
||||
<p>
|
||||
To unpack .tar.gz files:
|
||||
@@ -72,6 +86,10 @@ src/glu - libGLU source code
|
||||
src/glx - sources for building libGL with full GLX and DRI support
|
||||
</pre>
|
||||
|
||||
If you downloaded and unpacked the MesaGLUT.x.y.z package:
|
||||
<pre>
|
||||
src/glut - GLUT library source code
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Proceed to the <a href="install.html">compilation and installation
|
||||
@@ -79,24 +97,5 @@ instructions</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<H1>Demos and GLUT</H2>
|
||||
|
||||
<p>
|
||||
A package of Mark Kilgard's GLUT library is available
|
||||
<a href="ftp://ftp.freedesktop.org/pub/mesa/glut/" target="_parent">here</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Mesa demos collection is available
|
||||
<a href="ftp://ftp.freedesktop.org/pub/mesa/demos/" target="_parent">here</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In the past, GLUT and the Mesa demos were released in conjunction with
|
||||
Mesa releases. But since GLUT and the demos change infrequently, they
|
||||
were split off some time ago.
|
||||
</p>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
@@ -100,10 +100,10 @@ See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
|
||||
<h2>Radeon R300 driver environment variables (non-Gallium)</h2>
|
||||
|
||||
<ul>
|
||||
<li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
|
||||
<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
|
||||
</ul>
|
||||
|
||||
|
||||
|
@@ -10,132 +10,74 @@
|
||||
<H1>Compiling and Installing</H1>
|
||||
|
||||
<ol>
|
||||
<li><a href="#prereq-general">Prerequisites for building</a>
|
||||
<li><a href="#unix-x11">Unix / X11</a>
|
||||
<ul>
|
||||
<li><a href="#prereq-general">General prerequisites</a>
|
||||
<li><a href="#prereq-dri">For DRI and hardware acceleration</a>
|
||||
<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="#autoconf">Building with autoconf</a>
|
||||
<li><a href="#traditional">Building with traditional Makefiles</a>
|
||||
<li><a href="#libs">The Libraries</a>
|
||||
<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="#autoconf">Building with autoconf (Linux/Unix/X11)</a>
|
||||
<li><a href="#scons">Building with SCons (Windows)</a>
|
||||
<li><a href="#legacy">Building with legacy Makefiles (deprecated)</a>
|
||||
<li><a href="#other">Building for other systems</a>
|
||||
<li><a href="#libs">Library Information</a>
|
||||
<li><a href="#pkg-config">Building OpenGL programs with pkg-config
|
||||
<li><a href="#windows">Windows</a>
|
||||
<li><a href="#scons">Building with SCons</a>
|
||||
<li><a href="#other">Other</a>
|
||||
</ol>
|
||||
<br>
|
||||
|
||||
|
||||
<a name="unix-x11">
|
||||
<H2>1. Unix/X11 Compilation and Installation</H1>
|
||||
|
||||
|
||||
<a name="prereq-general">
|
||||
<h1>1. Prerequisites for building</h1>
|
||||
<h3>1.1 General prerequisites for building</h3>
|
||||
|
||||
<h2>1.1 General</h2>
|
||||
<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.
|
||||
<br>
|
||||
<br>
|
||||
On Windows with MinGW, install flex and bison with:
|
||||
<pre>mingw-get install msys-flex msys-bison</pre>
|
||||
</li>
|
||||
<li>python - Python is needed for building the Gallium components.
|
||||
Version 2.6.4 or later should work.
|
||||
<br>
|
||||
<br>
|
||||
To build OpenGL ES 1.1 and 2.0 you'll also need
|
||||
<a href="http://xmlsoft.org/sources/win32/python/libxml2-python-2.7.7.win32-py2.7.exe">libxml2-python</a>.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="prereq-dri">
|
||||
<h3>1.2 For DRI and hardware acceleration</h3>
|
||||
<h3>1.2 Prerequisites for DRI and hardware acceleration</h3>
|
||||
|
||||
<p>
|
||||
The following are required for DRI-based hardware acceleration with Mesa:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://xorg.freedesktop.org/releases/individual/proto/"
|
||||
target="_parent">dri2proto</a> version 2.6 or later
|
||||
<li><a href="http://xorg.freedesktop.org/releases/individual/proto/">dri2proto</a> version 1.99.3 or later
|
||||
<li>Linux 2.6.28
|
||||
<li><a href="http://dri.freedesktop.org/libdrm/" target="_parent">libDRM</a>
|
||||
version 2.4.33 or later
|
||||
version 2.4.15 or later
|
||||
<li>Xorg server version 1.5 or later
|
||||
<li>Linux 2.6.28 or later
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
If you're using a fedora distro the following command should install all
|
||||
the needed dependencies:
|
||||
<pre>
|
||||
sudo yum install flex bison imake libtool xorg-x11-proto-devel libdrm-devel \
|
||||
gcc-c++ xorg-x11-server-devel libXi-devel libXmu-devel libXdamage-devel git \
|
||||
expat-devel llvm-devel
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
<a name="autoconf">
|
||||
<H1>2. Building with autoconf (Linux/Unix/X11)</H1>
|
||||
<h3>1.3 Building with Autoconf</h3>
|
||||
|
||||
<p>
|
||||
The primary method to build Mesa on Unix systems is with autoconf.
|
||||
</p>
|
||||
Mesa may be <a href="autoconf.html">built using autoconf</a>.
|
||||
This should work well on most GNU-based systems.
|
||||
If that fails the traditional Mesa build system is available.
|
||||
|
||||
|
||||
|
||||
<a name="traditional">
|
||||
<h3>1.4 Building with traditional Makefiles</h3>
|
||||
|
||||
<p>
|
||||
The general approach is the standard:
|
||||
<pre>
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
</pre>
|
||||
But please read the <a href="autoconf.html">detailed autoconf instructions</a>
|
||||
for more details.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<a name="scons">
|
||||
<H1>3. Building with SCons (Windows)</H1>
|
||||
|
||||
<p>
|
||||
To build Mesa with SCons on Linux or Windows do
|
||||
</p>
|
||||
<pre>
|
||||
scons
|
||||
</pre>
|
||||
<p>
|
||||
The build output will be placed in
|
||||
build/<i>platform</i>-<i>machine</i>-<i>debug</i>/..., where <i>platform</i> is for
|
||||
example linux or windows, <i>machine</i> is x86 or x86_64, optionally followed
|
||||
by -debug for debug builds.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
|
||||
</p>
|
||||
<pre>
|
||||
scons platform=windows toolchain=crossmingw machine=x86 mesagdi libgl-gdi
|
||||
</pre>
|
||||
<p>
|
||||
This will create:
|
||||
</p>
|
||||
<ul>
|
||||
<li>build/windows-x86-debug/mesa/drivers/windows/gdi/opengl32.dll — Mesa + swrast, binary compatible with Windows's opengl32.dll
|
||||
<li>build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll
|
||||
</ul>
|
||||
<p>
|
||||
Put them all in the same directory to test them.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<a name="legacy">
|
||||
<h1>4. Building with legacy Makefiles (deprecated)</h1>
|
||||
|
||||
<p>
|
||||
The legacy Mesa build system is based on a collection of pre-defined
|
||||
The traditional Mesa build system is based on a collection of pre-defined
|
||||
system configurations.
|
||||
Some of these might work for older systems not supported by autoconf.
|
||||
</p>
|
||||
<p>
|
||||
To see the list of configurations, just type <code>make</code>.
|
||||
@@ -186,6 +128,8 @@ Make sure you have the prerequisite versions of DRM and Xserver mentioned
|
||||
above.
|
||||
</p>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -195,9 +139,58 @@ Later, if you want to rebuild for a different configuration run
|
||||
</p>
|
||||
|
||||
|
||||
<a name="libs">
|
||||
<h3>1.5 The libraries</h3>
|
||||
|
||||
<p>
|
||||
When compilation has finished, look in the top-level <code>lib/</code>
|
||||
(or <code>lib64/</code>) directory.
|
||||
You'll see a set of library files similar to this:
|
||||
</p>
|
||||
<pre>
|
||||
lrwxrwxrwx 1 brian users 10 Mar 26 07:53 libGL.so -> libGL.so.1*
|
||||
lrwxrwxrwx 1 brian users 19 Mar 26 07:53 libGL.so.1 -> libGL.so.1.5.060100*
|
||||
-rwxr-xr-x 1 brian users 3375861 Mar 26 07:53 libGL.so.1.5.060100*
|
||||
lrwxrwxrwx 1 brian users 11 Mar 26 07:53 libGLU.so -> libGLU.so.1*
|
||||
lrwxrwxrwx 1 brian users 20 Mar 26 07:53 libGLU.so.1 -> libGLU.so.1.3.060100*
|
||||
-rwxr-xr-x 1 brian users 549269 Mar 26 07:53 libGLU.so.1.3.060100*
|
||||
lrwxrwxrwx 1 brian users 12 Mar 26 07:53 libglut.so -> libglut.so.3*
|
||||
lrwxrwxrwx 1 brian users 16 Mar 26 07:53 libglut.so.3 -> libglut.so.3.7.1*
|
||||
-rwxr-xr-x 1 brian users 597754 Mar 26 07:53 libglut.so.3.7.1*
|
||||
lrwxrwxrwx 1 brian users 14 Mar 26 07:53 libOSMesa.so -> libOSMesa.so.6*
|
||||
lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSMesa.so.6.1.060100*
|
||||
-rwxr-xr-x 1 brian users 23871 Mar 26 07:53 libOSMesa.so.6.1.060100*
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<b>libGL</b> is the main OpenGL library (i.e. Mesa).
|
||||
<br>
|
||||
<b>libGLU</b> is the OpenGL Utility library.
|
||||
<br>
|
||||
<b>libglut</b> is the GLUT library.
|
||||
<br>
|
||||
<b>libOSMesa</b> is the OSMesa (Off-Screen) interface library.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
||||
</p>
|
||||
<pre>
|
||||
-rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i915_dri.so
|
||||
-rwxr-xr-x 1 brian users 11849858 Jul 21 12:12 r200_dri.so
|
||||
-rwxr-xr-x 1 brian users 16050488 Jul 21 12:11 r300_dri.so
|
||||
-rwxr-xr-x 1 brian users 11757388 Jul 21 12:12 radeon_dri.so
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If you built with Gallium support, look in lib/gallium/ for Gallium-based
|
||||
versions of libGL and device drivers.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<a name="install">
|
||||
<H2>Installing the header and library files</H2>
|
||||
<H3>1.6 Installing the header and library files</H3>
|
||||
|
||||
<p>
|
||||
The standard location for the OpenGL header files on Unix-type systems is
|
||||
@@ -237,70 +230,8 @@ This is a handy way to compare multiple OpenGL implementations.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="other">
|
||||
<H1>5. Building for other systems</H1>
|
||||
|
||||
<p>
|
||||
Documentation for other environments (some may be very out of date):
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<li><A HREF="README.VMS">README.VMS</A> - VMS
|
||||
<LI><A HREF="README.CYGWIN">README.CYGWIN</A> - Cygwin
|
||||
<LI><A HREF="README.WIN32">README.WIN32</A> - Win32
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<a name="libs">
|
||||
<H1>6. Library Information</H1>
|
||||
|
||||
<p>
|
||||
When compilation has finished, look in the top-level <code>lib/</code>
|
||||
(or <code>lib64/</code>) directory.
|
||||
You'll see a set of library files similar to this:
|
||||
</p>
|
||||
<pre>
|
||||
lrwxrwxrwx 1 brian users 10 Mar 26 07:53 libGL.so -> libGL.so.1*
|
||||
lrwxrwxrwx 1 brian users 19 Mar 26 07:53 libGL.so.1 -> libGL.so.1.5.060100*
|
||||
-rwxr-xr-x 1 brian users 3375861 Mar 26 07:53 libGL.so.1.5.060100*
|
||||
lrwxrwxrwx 1 brian users 11 Mar 26 07:53 libGLU.so -> libGLU.so.1*
|
||||
lrwxrwxrwx 1 brian users 20 Mar 26 07:53 libGLU.so.1 -> libGLU.so.1.3.060100*
|
||||
-rwxr-xr-x 1 brian users 549269 Mar 26 07:53 libGLU.so.1.3.060100*
|
||||
lrwxrwxrwx 1 brian users 14 Mar 26 07:53 libOSMesa.so -> libOSMesa.so.6*
|
||||
lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSMesa.so.6.1.060100*
|
||||
-rwxr-xr-x 1 brian users 23871 Mar 26 07:53 libOSMesa.so.6.1.060100*
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<b>libGL</b> is the main OpenGL library (i.e. Mesa).
|
||||
<br>
|
||||
<b>libGLU</b> is the OpenGL Utility library.
|
||||
<br>
|
||||
<b>libOSMesa</b> is the OSMesa (Off-Screen) interface library.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
||||
</p>
|
||||
<pre>
|
||||
-rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i915_dri.so
|
||||
-rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i965_dri.so
|
||||
-rwxr-xr-x 1 brian users 11849858 Jul 21 12:12 r200_dri.so
|
||||
-rwxr-xr-x 1 brian users 16050488 Jul 21 12:11 r300_dri.so
|
||||
-rwxr-xr-x 1 brian users 11757388 Jul 21 12:12 radeon_dri.so
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If you built with Gallium support, look in lib/gallium/ for Gallium-based
|
||||
versions of libGL and device drivers.
|
||||
</p>
|
||||
|
||||
|
||||
<a name="pkg-config">
|
||||
<H1>7. Building OpenGL programs with pkg-config</H1>
|
||||
<H3>1.7 Building OpenGL programs with pkg-config</H3>
|
||||
|
||||
<p>
|
||||
Running <code>make install</code> will install package configuration files
|
||||
@@ -321,6 +252,64 @@ For example, compiling and linking a GLUT application can be done with:
|
||||
|
||||
<br>
|
||||
|
||||
<a name="windows">
|
||||
<H2>2. Windows Compilation and Installation</H1>
|
||||
|
||||
<p>
|
||||
Please see the <a href="#scons">instructions on building with SCons</a>.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<a name="scons">
|
||||
<H2>3. Building with SCons</H1>
|
||||
|
||||
<p>
|
||||
To build Mesa with SCons on Linux or Windows do
|
||||
</p>
|
||||
<pre>
|
||||
scons
|
||||
</pre>
|
||||
<p>
|
||||
The build output will be placed in
|
||||
build/<i>platform</i>-<i>machine</i>-<i>debug</i>/..., where <i>platform</i> is for
|
||||
example linux or windows, <i>machine</i> is x86 or x86_64, optionally followed
|
||||
by -debug for debug builds.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
|
||||
</p>
|
||||
<pre>
|
||||
scons platform=windows toolchain=crossmingw machine=x86 mesagdi libgl-gdi
|
||||
</pre>
|
||||
<p>
|
||||
This will create:
|
||||
</p>
|
||||
<ul>
|
||||
<li>build/windows-x86-debug/mesa/drivers/windows/gdi/opengl32.dll — Mesa + swrast, binary compatible with Windows's opengl32.dll
|
||||
<li>build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll
|
||||
</ul>
|
||||
<p>
|
||||
Put them all in the same directory to test them.
|
||||
</p>
|
||||
|
||||
|
||||
<a name="other">
|
||||
<H2>4. Other systems</H1>
|
||||
|
||||
<p>
|
||||
Documentation for other environments (some may be very out of date):
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<li><A HREF="README.VMS">README.VMS</A> - VMS
|
||||
<LI><A HREF="README.CYGWIN">README.CYGWIN</A> - Cygwin
|
||||
<LI><A HREF="README.WIN32">README.WIN32</A> - Win32
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -95,7 +95,17 @@ Device drivers src/mesa/drivers/* MIT, generally
|
||||
Ext headers include/GL/glext.h Khronos
|
||||
include/GL/glxext.h
|
||||
|
||||
GLUT src/glut/ Mark Kilgard's copyright
|
||||
|
||||
SGI GLU library src/glu/sgi/ SGI Free B
|
||||
|
||||
demo programs progs/demos/ see source files
|
||||
|
||||
X demos progs/xdemos/ see source files
|
||||
|
||||
SGI demos progs/samples/ SGI license
|
||||
|
||||
RedBook demos progs/redbook/ SGI license
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
|
@@ -11,31 +11,6 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>March 21, 2012</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-8.0.2.html">Mesa 8.0.2</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>February 16, 2012</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-8.0.1.html">Mesa 8.0.1</a> is released. This is a bug fix
|
||||
release. See the release notes for more information about the release.
|
||||
</p>
|
||||
|
||||
<h2>February 9, 2012</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-8.0.html">Mesa 8.0</a> is released.
|
||||
This is the first version of Mesa to support OpenGL 3.0 and GLSL 1.30
|
||||
(with the i965 driver).
|
||||
See the release notes for more information about the release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>November 27, 2011</h2>
|
||||
|
||||
<p>
|
||||
|
@@ -1,153 +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 8.0.1 Release Notes / February 16, 2012</H1>
|
||||
|
||||
<p>
|
||||
Mesa 8.0.1 is a bug fix release which fixes bugs found since the 8.0 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 8.0 implements the OpenGL 3.0 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 3.0.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
4855c2d93bd2ebd43f384bdcc92c9a27 MesaLib-8.0.1.tar.gz
|
||||
24eeebf66971809d8f40775a379b36c9 MesaLib-8.0.1.tar.bz2
|
||||
54e745d14dac5717f7f65b4e2d5c1df2 MesaLib-8.0.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=28924">Bug 28924</a> - [ILK] piglit tex-border-1 fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=40864">Bug 40864</a> - [bisected pineview] oglc pxconv-gettex(basic.allCases) fails on pineview</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=43327">Bug 43327</a> - [bisected SNB] HiZ make many oglc cases regressed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=44333">Bug 44333</a> - [bisected] Color distortion with xbmc mediaplayer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=44927">Bug 44927</a> - [SNB IVB regression] gl-117 abort when click</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45221">Bug 45221</a> - [bisected IVB] glean/fbo regression in stencil-only case</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45877">Bug 45877</a> - main/image.c:1597: _mesa_convert_colors: Assertion `dstType == 0x1406' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45578">Bug 45578</a> - main/image.c:1659: _mesa_convert_colors: Assertion `dstType == 0x1403' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45872">Bug 45872</a> - [bisected PNV] oglc mustpass(basic.stipple) regressed on pineview</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45876">Bug 45876</a> - [PNV]oglc texenv(basic.allCases) regressed on pineview</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45917">Bug 45917</a> - [PNV] Regression in Piglit test general/two-sided-lighting-separate-specular</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45943">Bug 45943</a> - [r300g] r300_emit.c:365:r300_emit_aa_state: Assertion `(aa-d>dest)->cs_buf' failed.</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-8.0..mesa-8.0.1
|
||||
</pre>
|
||||
|
||||
<p>Alex Deucher (2):
|
||||
<ul>
|
||||
<li>r600g: fix tex tile_type offset for cayman</li>
|
||||
<li>r600g: 128 bit formats require tile_type = 1 on cayman</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Anuj Phogat (2):
|
||||
<ul>
|
||||
<li>meta: Add pixel store/pack operations in decompress_texture_image</li>
|
||||
<li>meta: Avoid FBO resizing/reallocating in decompress_texture_image</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Brian Paul (6):
|
||||
<ul>
|
||||
<li>docs: add news item for 8.0 release</li>
|
||||
<li>docs: update info about supported systems, GPUs, APIs</li>
|
||||
<li>docs: add VMware link</li>
|
||||
<li>docs: remove link to the GLSL compiler page</li>
|
||||
<li>mesa: fix proxy texture target initialization</li>
|
||||
<li>swrast: fix span color type selection</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Chad Versace (2):
|
||||
<ul>
|
||||
<li>i965: Rewrite the HiZ op</li>
|
||||
<li>i965: Remove file i965/junk, accidentally added in 7b36c68</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Dave Airlie (1):
|
||||
<ul>
|
||||
<li>st/mesa: only resolve if number of samples is > 1</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Eric Anholt (3):
|
||||
<ul>
|
||||
<li>i965: Fix HiZ change compiler warning.</li>
|
||||
<li>i965: Report the failure message when failing to compile the fragment shader.</li>
|
||||
<li>i965/fs: Enable register spilling on gen7 too.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Ian Romanick (4):
|
||||
<ul>
|
||||
<li>docs: Add 8.0 MD5 checksums</li>
|
||||
<li>glapi: Include GLES2 headers for ES2 extension functions</li>
|
||||
<li>swrast: Only avoid empty _TexEnvPrograms</li>
|
||||
<li>mesa: Bump version number to 8.0.1</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kenneth Graunke (4):
|
||||
<ul>
|
||||
<li>i965: Fix border color on Ironlake.</li>
|
||||
<li>i965/fs: Add a new fs_inst::regs_written function.</li>
|
||||
<li>i965/fs: Take # of components into account in try_rewrite_rhs_to_dst.</li>
|
||||
<li>i965: Emit Ivybridge VS workaround flushes.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Mathias Fröhlich (1):
|
||||
<ul>
|
||||
<li>state_stracker: Fix access to uninitialized memory.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Paul Berry (1):
|
||||
<ul>
|
||||
<li>i915: Fix type of "specoffset" variable.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Simon Farnsworth (1):
|
||||
<ul>
|
||||
<li>r600g: Use a fake reloc to sleep for fences</li>
|
||||
</ul></p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,160 +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 8.0.2 Release Notes / March 21, 2012</H1>
|
||||
|
||||
<p>
|
||||
Mesa 8.0.2 is a bug fix release which fixes bugs found since the 8.0.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 8.0.2 implements the OpenGL 3.0 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 3.0.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
70eb3dc74fbfcd72f6776268ee1db52e MesaLib-8.0.2.tar.gz
|
||||
a368104e5700707048dc3e8691a9a7a1 MesaLib-8.0.2.tar.bz2
|
||||
d5e5cdb85d2afdbcd1c0623d3ed1c54d MesaLib-8.0.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=38720">Bug 38720</a> - [SNB] Trine triggers a GPU hang</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=40059">Bug 40059</a> - [SNB] hang in "Amnesia: The Dark Descent" demo</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45216">Bug 45216</a> - [SNB] GPU hang in OilRush</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=46631">Bug 46631</a> - It's really hard to hit the fast path for the fallback glReadPixels code</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=46679">Bug 46679</a> - glReadPixels on a luminance texture returns the wrong values</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=46311">Bug 46311</a> - Missing support of point size in Mesa core</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=46665">Bug 46665</a> - [PNV] webgl conformance case max texture fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45975">Bug 45975</a> - [Gen4 + ILK] render with pointcoord will fail to render</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=46666">Bug 46666</a> - [PNV] webgl conformance case NPOT case fails with TEXTURE_MIN_FILTER set to LINEAR</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-8.0.1..mesa-8.0.2
|
||||
</pre>
|
||||
|
||||
<p>Brian Paul (7):
|
||||
<ul>
|
||||
<li>svga: add null vs pointer check in update_need_pipeline()</li>
|
||||
<li>util: add mutex lock in u_debug_memory.c code</li>
|
||||
<li>mesa: add _mesa_rebase_rgba_float/uint() functions</li>
|
||||
<li>mesa: use _mesa_rebase_rgba_float/uint() in glReadPixels code</li>
|
||||
<li>mesa: use _mesa_rebase_rgba_float/uint() in glGetTexImage code</li>
|
||||
<li>mesa: fix GL_LUMINANCE handling in glGetTexImage</li>
|
||||
<li>docs: add links to 8.0.1 release notes</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Daniel Vetter (1):
|
||||
<ul>
|
||||
<li>i965: fixup W-tile offset computation to take swizzling into account</li>
|
||||
<ul></p>
|
||||
|
||||
<p>Dylan Noblesmith (1):
|
||||
<ul>
|
||||
<li>mesa: add back glGetnUniform*v() overflow error reporting</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Ian Romanick (1):
|
||||
<ul>
|
||||
<li>docs: Add 8.0.1 release md5sums</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Jakob Bornecrantz (3):
|
||||
<ul>
|
||||
<li>mesa: Include mesa ES mapi generated files</li>
|
||||
<li>mesa: Bump version number to 8.0.2</li>
|
||||
<li>docs: Add 8.0.2 release notes</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Jeremy Huddleston (3):
|
||||
<ul>
|
||||
<li>darwin: config file cleanups</li>
|
||||
<li>darwin: Build create_context.c</li>
|
||||
<li>darwin: Link against libxcb</li>
|
||||
</ul></p>
|
||||
|
||||
<p>José Fonseca (1):
|
||||
<ul>
|
||||
<li>svga: Clamp advertised PIPE_SHADER_CAP_MAX_TEMPS to SVGA3D_TEMPREG_MAX.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Kenneth Graunke (2):
|
||||
<ul>
|
||||
<li>i965: Only set Last Render Target Select on the last FB write.</li>
|
||||
<li>i965: Fix Gen6+ dynamic state upper bound on older kernels.</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Marek Olšák (1):
|
||||
<ul>
|
||||
<li>gallium/rtasm: properly detect SSE and SSE2</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Neil Roberts (1):
|
||||
<ul>
|
||||
<li>mesa: Don't disable fast path for normalized types</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Tom Stellard (1):
|
||||
<ul>
|
||||
<li>r300/compiler: Fix bug when lowering KILP on r300 cards</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Yuanhan Liu (6):
|
||||
<ul>
|
||||
<li>mesa: let GL3 buf obj queries not depend on opengl major version</li>
|
||||
<li>tnl: let _TNL_ATTRIB_POINTSIZE do not depend on ctx->VertexProgram._Enabled</li>
|
||||
<li>i915: fix wrong rendering of gl_PointSize on Pineview</li>
|
||||
<li>i915: move the FALLBACK_DRAW_OFFSET check outside the drawing rect check</li>
|
||||
<li>i965: handle gl_PointCoord for Gen4 and Gen5 platforms</li>
|
||||
<li>i915: fallback for NPOT cubemap texture</li>
|
||||
</ul></p>
|
||||
|
||||
<p>Zack Rusin (3):
|
||||
<ul>
|
||||
<li>svga: fix a crash happening before setting fragment shaders.</li>
|
||||
<li>svga: Fix stencil op mapping</li>
|
||||
<li>svga: fix the rasterizer state resets</li>
|
||||
</ul></p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -10,7 +10,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 8.0 Release Notes / (release date TBD)</H1>
|
||||
<H1>Mesa 8.0 Release Notes / February 9, 2012</H1>
|
||||
|
||||
<p>
|
||||
Mesa 8.0 is a new development release.
|
||||
@@ -30,9 +30,7 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
3516fea6c28ce4a0fa9759e4894729a1 MesaLib-8.0.tar.gz
|
||||
1a5668fe72651a670611164cefc703b2 MesaLib-8.0.tar.bz2
|
||||
66f5a01a85530a91472a3acceb556db8 MesaLib-8.0.zip
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
|
@@ -13,8 +13,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-8.0.2.html">8.0.2 release notes</A>
|
||||
<LI><A HREF="relnotes-8.0.1.html">8.0.1 release notes</A>
|
||||
<LI><A HREF="relnotes-8.0.html">8.0 release notes</A>
|
||||
<LI><A HREF="relnotes-7.11.html">7.11 release notes</A>
|
||||
<LI><A HREF="relnotes-7.10.3.html">7.10.3 release notes</A>
|
||||
|
@@ -26,7 +26,7 @@ You may access the repository either as an
|
||||
|
||||
<p>
|
||||
You may also
|
||||
<a href="http://cgit.freedesktop.org/mesa/mesa/"
|
||||
<a href="http://gitweb.freedesktop.org/?p=mesa/mesa.git"
|
||||
target="_parent">browse the main Mesa git repository</a> and the
|
||||
<a href="http://cgit.freedesktop.org/mesa/demos"
|
||||
target="_parent">Mesa demos and tests git repository</a>.
|
||||
|
@@ -9,78 +9,34 @@
|
||||
<H1>Supported Systems and Drivers</H1>
|
||||
|
||||
<p>
|
||||
Mesa is primarily developed and used on Linux systems.
|
||||
But there's also support for Windows, other flavors of Unix and other
|
||||
systems such as Haiku.
|
||||
We're actively developing and maintaining several hardware and
|
||||
software drivers.
|
||||
Mesa was originally designed for Unix/X11 systems and is still best
|
||||
supported on those systems. All you need is an ANSI C compiler and the
|
||||
X development environment to use Mesa.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The primary API is OpenGL but there's also support for OpenGL ES 1
|
||||
and ES 2, OpenVG and the EGL interface.
|
||||
The DRI hardware drivers for the X.org server and XFree86 provide
|
||||
hardware accelerated rendering for chips from ATI, Intel, and NVIDIA
|
||||
on Linux and FreeBSD.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Hardware drivers include:
|
||||
Drivers for other assorted platforms include:
|
||||
the Apple Macintosh and Windows.
|
||||
</p>
|
||||
<ul>
|
||||
<li>Intel i965, i945, i915.
|
||||
See <a href="http://intellinuxgraphics.org/index.html" target="_parent">
|
||||
Intel's website</a>
|
||||
<li>AMD Radeon series
|
||||
<li>Some NVIDIA GPus.
|
||||
<li>VMware virtual GPU
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Software drivers include:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="llvmpipe.html">llvmpipe</a> - uses LLVM for x86 JIT code
|
||||
generation and is multi-threaded
|
||||
<li>softpipe - a reference Gallium driver
|
||||
<li>swrast - the legacy/original Mesa software rasterizer
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Additional driver information:
|
||||
Details about particular drivers follows:
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<li><a href="http://dri.freedesktop.org/" target="_parent"> DRI hardware
|
||||
drivers</a> for the X Window System
|
||||
<li><a href="xlibdriver.html">Xlib / swrast driver</a> for the X Window System
|
||||
<LI><a href="xlibdriver.html">Xlib software driver</a> for the X Window System
|
||||
and Unix-like operating systems
|
||||
<li><a href="README.WIN32">Microsoft Windows</a>
|
||||
<li><a href="vmware-guest.html">VMware</a> guest OS driver
|
||||
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
|
||||
<LI>DEC VMS <A HREF="README.VMS">(README.VMS)</A>
|
||||
</UL>
|
||||
|
||||
|
||||
<h1>
|
||||
Deprecated Systems and Drivers
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
In the past there were other drivers for older GPUs and operating
|
||||
systems.
|
||||
These have been removed from the Mesa source tree and distribution.
|
||||
If anyone's interested though, the code can be found in the git repo.
|
||||
The list includes:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>3dfx/glide
|
||||
<li>Matrox
|
||||
<li>ATI R128
|
||||
<li>Savage
|
||||
<li>VIA Unichrome
|
||||
<li>SIS
|
||||
<li>3Dlabs gamma
|
||||
<li>DOS
|
||||
<li>fbdev
|
||||
<li>DEC/VMS
|
||||
<ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -32,10 +32,6 @@ These issues have been reported to the SPEC organization in the hope that
|
||||
they'll be fixed in the future.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Some of the Viewperf tests use a lot of memory.
|
||||
At least 2GB of RAM is recommended.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Catia-03 test 2</h2>
|
||||
@@ -71,7 +67,7 @@ Subsequent drawing calls become no-ops and the rendering is incorrect.
|
||||
|
||||
|
||||
|
||||
<h2>sw-02 tests 1, 2, 4, 6</h2>
|
||||
<h2>sw-02 tests 1, 2, 4</h2>
|
||||
|
||||
<p>
|
||||
These tests depend on the
|
||||
@@ -84,24 +80,6 @@ If the Mesa driver doesn't support this extension the rendering will
|
||||
be incorrect and the test will fail.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Also, the color of the line drawings in test 2 seem to appear in a random
|
||||
color. This is probably due to some uninitialized state somewhere.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>sw-02 test 6</h2>
|
||||
|
||||
<p>
|
||||
The lines drawn in this test appear in a random color.
|
||||
That's because texture mapping is enabled when the lines are drawn, but no
|
||||
texture image is defined (glTexImage2D() is called with pixels=NULL).
|
||||
Since GL says the contents of the texture image are undefined in that
|
||||
situation, we get a random color.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>Lightwave-01 test 3</h2>
|
||||
|
||||
@@ -161,38 +139,7 @@ If the fallback texture created in _mesa_get_fallback_texture() is
|
||||
initialized to be full white instead of full black the rendering appears
|
||||
correct.
|
||||
However, we have no plans to implement this work-around in Mesa.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Maya-03 test 2</h2>
|
||||
|
||||
<p>
|
||||
This test makes some unusual calls to glRotate. For example:
|
||||
</p>
|
||||
<pre>
|
||||
glRotate(50, 50, 50, 1);
|
||||
glRotate(100, 100, 100, 1);
|
||||
glRotate(52, 52, 52, 1);
|
||||
</pre>
|
||||
<p>
|
||||
These unusual values lead to invalid modelview matrices.
|
||||
For example, the last glRotate command above produces this matrix with Mesa:
|
||||
<pre>
|
||||
1.08536e+24 2.55321e-23 -0.000160389 0
|
||||
5.96937e-25 1.08536e+24 103408 0
|
||||
103408 -0.000160389 1.74755e+09 0
|
||||
0 0 0 nan
|
||||
</pre>
|
||||
and with NVIDIA's OpenGL:
|
||||
<pre>
|
||||
1.4013e-45 0 -nan 0
|
||||
0 1.4013e-45 1.4013e-45 0
|
||||
1.4013e-45 -nan 1.4013e-45 0
|
||||
0 0 0 1.4013e-45
|
||||
</pre>
|
||||
<p>
|
||||
This causes the object in question to be drawn in a strange orientation
|
||||
and with a semi-random color (between white and black) since GL_FOG is enabled.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -10,8 +10,7 @@
|
||||
<h1>VMware guest GL driver</h1>
|
||||
|
||||
<p>
|
||||
This page describes how to build, install and use the
|
||||
<a href="http://www.vmware.com/" target="_parent">VMware</a> guest GL driver
|
||||
This page describes how to build, install and use the VMware guest GL driver
|
||||
(aka the SVGA or SVGA3D driver) for Linux using the latest source code.
|
||||
This driver gives a Linux virtual machine access to the host's GPU for
|
||||
hardware-accelerated 3D.
|
||||
@@ -55,16 +54,13 @@ The components involved in this include:
|
||||
<pre>
|
||||
sudo apt-get install git-core
|
||||
sudo apt-get install automake libtool libpthread-stubs0-dev
|
||||
sudo apt-get install xserver-xorg-dev x11proto-xinerama-dev libx11-xcb-dev
|
||||
sudo apt-get install libxcb-glx0-dev libxrender-dev
|
||||
sudo apt-get install xserver-xorg-dev x11proto-xinerama-dev
|
||||
sudo apt-get build-dep libgl1-mesa-dri libxcb-glx0-dev
|
||||
</pre>
|
||||
<li>Fedora: For Fedora you also need to install a number of build dependencies.
|
||||
<pre>
|
||||
sudo yum install mesa-libGL-devel xorg-x11-server-devel xorg-x11-util-macros
|
||||
sudo yum install libXrender-devel.i686
|
||||
sudo yum install automake gcc libtool expat-devel kernel-devel git-core
|
||||
sudo yum install makedepend flex bison
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
@@ -164,7 +164,7 @@ drawn with glDrawPixels.
|
||||
|
||||
<p>
|
||||
For more information about gamma correction see:
|
||||
<a href="http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html">
|
||||
<a href="http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html"
|
||||
the Gamma FAQ</a>
|
||||
</p>
|
||||
|
||||
|
@@ -16,8 +16,7 @@ FULL = \
|
||||
swrast.doxy \
|
||||
swrast_setup.doxy \
|
||||
tnl.doxy \
|
||||
tnl_dd.doxy \
|
||||
gbm.doxy
|
||||
tnl_dd.doxy
|
||||
|
||||
full: $(FULL:.doxy=.tag)
|
||||
$(foreach FILE,$(FULL),doxygen $(FILE);)
|
||||
|
@@ -1,48 +0,0 @@
|
||||
# Doxyfile 0.1
|
||||
|
||||
@INCLUDE = common.doxy
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "Generic Buffer Manager (gbm)"
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../src/gbm/main
|
||||
FILE_PATTERNS = *.c *.h
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
HTML_OUTPUT = gbm
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH = ../include/
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES = main.tag=../core \
|
||||
math.tag=../math \
|
||||
tnl_dd.tag=../tnl_dd \
|
||||
swrast_setup.tag=../gbm_setup \
|
||||
tnl.tag=../tnl \
|
||||
vbo.tag=vbo
|
||||
GENERATE_TAGFILE = gbm.tag
|
@@ -14,6 +14,5 @@
|
||||
<a class="qindex" href="../swrast/index.html">swrast</a> |
|
||||
<a class="qindex" href="../swrast_setup/index.html">swrast_setup</a> |
|
||||
<a class="qindex" href="../tnl/index.html">tnl</a> |
|
||||
<a class="qindex" href="../tnl_dd/index.html">tnl_dd</a> |
|
||||
<a class="qindex" href="../gbm/index.html">gbm</a>
|
||||
<a class="qindex" href="../tnl_dd/index.html">tnl_dd</a>
|
||||
</div>
|
||||
|
998
include/CL/cl.h
998
include/CL/cl.h
@@ -1,998 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are 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 Materials.
|
||||
*
|
||||
* THE MATERIALS ARE 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
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11985 $ on $Date: 2010-07-15 11:16:06 -0700 (Thu, 15 Jul 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_H
|
||||
#define __OPENCL_CL_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl_platform.h>
|
||||
#else
|
||||
#include <CL/cl_platform.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef struct _cl_platform_id * cl_platform_id;
|
||||
typedef struct _cl_device_id * cl_device_id;
|
||||
typedef struct _cl_context * cl_context;
|
||||
typedef struct _cl_command_queue * cl_command_queue;
|
||||
typedef struct _cl_mem * cl_mem;
|
||||
typedef struct _cl_program * cl_program;
|
||||
typedef struct _cl_kernel * cl_kernel;
|
||||
typedef struct _cl_event * cl_event;
|
||||
typedef struct _cl_sampler * cl_sampler;
|
||||
|
||||
typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
|
||||
typedef cl_ulong cl_bitfield;
|
||||
typedef cl_bitfield cl_device_type;
|
||||
typedef cl_uint cl_platform_info;
|
||||
typedef cl_uint cl_device_info;
|
||||
typedef cl_bitfield cl_device_fp_config;
|
||||
typedef cl_uint cl_device_mem_cache_type;
|
||||
typedef cl_uint cl_device_local_mem_type;
|
||||
typedef cl_bitfield cl_device_exec_capabilities;
|
||||
typedef cl_bitfield cl_command_queue_properties;
|
||||
|
||||
typedef intptr_t cl_context_properties;
|
||||
typedef cl_uint cl_context_info;
|
||||
typedef cl_uint cl_command_queue_info;
|
||||
typedef cl_uint cl_channel_order;
|
||||
typedef cl_uint cl_channel_type;
|
||||
typedef cl_bitfield cl_mem_flags;
|
||||
typedef cl_uint cl_mem_object_type;
|
||||
typedef cl_uint cl_mem_info;
|
||||
typedef cl_uint cl_image_info;
|
||||
typedef cl_uint cl_buffer_create_type;
|
||||
typedef cl_uint cl_addressing_mode;
|
||||
typedef cl_uint cl_filter_mode;
|
||||
typedef cl_uint cl_sampler_info;
|
||||
typedef cl_bitfield cl_map_flags;
|
||||
typedef cl_uint cl_program_info;
|
||||
typedef cl_uint cl_program_build_info;
|
||||
typedef cl_int cl_build_status;
|
||||
typedef cl_uint cl_kernel_info;
|
||||
typedef cl_uint cl_kernel_work_group_info;
|
||||
typedef cl_uint cl_event_info;
|
||||
typedef cl_uint cl_command_type;
|
||||
typedef cl_uint cl_profiling_info;
|
||||
|
||||
typedef struct _cl_image_format {
|
||||
cl_channel_order image_channel_order;
|
||||
cl_channel_type image_channel_data_type;
|
||||
} cl_image_format;
|
||||
|
||||
|
||||
typedef struct _cl_buffer_region {
|
||||
size_t origin;
|
||||
size_t size;
|
||||
} cl_buffer_region;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_SUCCESS 0
|
||||
#define CL_DEVICE_NOT_FOUND -1
|
||||
#define CL_DEVICE_NOT_AVAILABLE -2
|
||||
#define CL_COMPILER_NOT_AVAILABLE -3
|
||||
#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
|
||||
#define CL_OUT_OF_RESOURCES -5
|
||||
#define CL_OUT_OF_HOST_MEMORY -6
|
||||
#define CL_PROFILING_INFO_NOT_AVAILABLE -7
|
||||
#define CL_MEM_COPY_OVERLAP -8
|
||||
#define CL_IMAGE_FORMAT_MISMATCH -9
|
||||
#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
|
||||
#define CL_BUILD_PROGRAM_FAILURE -11
|
||||
#define CL_MAP_FAILURE -12
|
||||
#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
|
||||
#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
|
||||
|
||||
#define CL_INVALID_VALUE -30
|
||||
#define CL_INVALID_DEVICE_TYPE -31
|
||||
#define CL_INVALID_PLATFORM -32
|
||||
#define CL_INVALID_DEVICE -33
|
||||
#define CL_INVALID_CONTEXT -34
|
||||
#define CL_INVALID_QUEUE_PROPERTIES -35
|
||||
#define CL_INVALID_COMMAND_QUEUE -36
|
||||
#define CL_INVALID_HOST_PTR -37
|
||||
#define CL_INVALID_MEM_OBJECT -38
|
||||
#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
|
||||
#define CL_INVALID_IMAGE_SIZE -40
|
||||
#define CL_INVALID_SAMPLER -41
|
||||
#define CL_INVALID_BINARY -42
|
||||
#define CL_INVALID_BUILD_OPTIONS -43
|
||||
#define CL_INVALID_PROGRAM -44
|
||||
#define CL_INVALID_PROGRAM_EXECUTABLE -45
|
||||
#define CL_INVALID_KERNEL_NAME -46
|
||||
#define CL_INVALID_KERNEL_DEFINITION -47
|
||||
#define CL_INVALID_KERNEL -48
|
||||
#define CL_INVALID_ARG_INDEX -49
|
||||
#define CL_INVALID_ARG_VALUE -50
|
||||
#define CL_INVALID_ARG_SIZE -51
|
||||
#define CL_INVALID_KERNEL_ARGS -52
|
||||
#define CL_INVALID_WORK_DIMENSION -53
|
||||
#define CL_INVALID_WORK_GROUP_SIZE -54
|
||||
#define CL_INVALID_WORK_ITEM_SIZE -55
|
||||
#define CL_INVALID_GLOBAL_OFFSET -56
|
||||
#define CL_INVALID_EVENT_WAIT_LIST -57
|
||||
#define CL_INVALID_EVENT -58
|
||||
#define CL_INVALID_OPERATION -59
|
||||
#define CL_INVALID_GL_OBJECT -60
|
||||
#define CL_INVALID_BUFFER_SIZE -61
|
||||
#define CL_INVALID_MIP_LEVEL -62
|
||||
#define CL_INVALID_GLOBAL_WORK_SIZE -63
|
||||
#define CL_INVALID_PROPERTY -64
|
||||
|
||||
/* OpenCL Version */
|
||||
#define CL_VERSION_1_0 1
|
||||
#define CL_VERSION_1_1 1
|
||||
|
||||
/* cl_bool */
|
||||
#define CL_FALSE 0
|
||||
#define CL_TRUE 1
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_PROFILE 0x0900
|
||||
#define CL_PLATFORM_VERSION 0x0901
|
||||
#define CL_PLATFORM_NAME 0x0902
|
||||
#define CL_PLATFORM_VENDOR 0x0903
|
||||
#define CL_PLATFORM_EXTENSIONS 0x0904
|
||||
|
||||
/* cl_device_type - bitfield */
|
||||
#define CL_DEVICE_TYPE_DEFAULT (1 << 0)
|
||||
#define CL_DEVICE_TYPE_CPU (1 << 1)
|
||||
#define CL_DEVICE_TYPE_GPU (1 << 2)
|
||||
#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
|
||||
#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_TYPE 0x1000
|
||||
#define CL_DEVICE_VENDOR_ID 0x1001
|
||||
#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
|
||||
#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
|
||||
#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
|
||||
#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
|
||||
#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
|
||||
#define CL_DEVICE_ADDRESS_BITS 0x100D
|
||||
#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
|
||||
#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
|
||||
#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
|
||||
#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
|
||||
#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
|
||||
#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
|
||||
#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
|
||||
#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
|
||||
#define CL_DEVICE_IMAGE_SUPPORT 0x1016
|
||||
#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
|
||||
#define CL_DEVICE_MAX_SAMPLERS 0x1018
|
||||
#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
|
||||
#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
|
||||
#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
|
||||
#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
|
||||
#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
|
||||
#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
|
||||
#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
|
||||
#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
|
||||
#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
|
||||
#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
|
||||
#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
|
||||
#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
|
||||
#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
|
||||
#define CL_DEVICE_ENDIAN_LITTLE 0x1026
|
||||
#define CL_DEVICE_AVAILABLE 0x1027
|
||||
#define CL_DEVICE_COMPILER_AVAILABLE 0x1028
|
||||
#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
|
||||
#define CL_DEVICE_QUEUE_PROPERTIES 0x102A
|
||||
#define CL_DEVICE_NAME 0x102B
|
||||
#define CL_DEVICE_VENDOR 0x102C
|
||||
#define CL_DRIVER_VERSION 0x102D
|
||||
#define CL_DEVICE_PROFILE 0x102E
|
||||
#define CL_DEVICE_VERSION 0x102F
|
||||
#define CL_DEVICE_EXTENSIONS 0x1030
|
||||
#define CL_DEVICE_PLATFORM 0x1031
|
||||
/* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */
|
||||
/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
||||
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
|
||||
#define CL_DEVICE_OPENCL_C_VERSION 0x103D
|
||||
|
||||
/* cl_device_fp_config - bitfield */
|
||||
#define CL_FP_DENORM (1 << 0)
|
||||
#define CL_FP_INF_NAN (1 << 1)
|
||||
#define CL_FP_ROUND_TO_NEAREST (1 << 2)
|
||||
#define CL_FP_ROUND_TO_ZERO (1 << 3)
|
||||
#define CL_FP_ROUND_TO_INF (1 << 4)
|
||||
#define CL_FP_FMA (1 << 5)
|
||||
#define CL_FP_SOFT_FLOAT (1 << 6)
|
||||
|
||||
/* cl_device_mem_cache_type */
|
||||
#define CL_NONE 0x0
|
||||
#define CL_READ_ONLY_CACHE 0x1
|
||||
#define CL_READ_WRITE_CACHE 0x2
|
||||
|
||||
/* cl_device_local_mem_type */
|
||||
#define CL_LOCAL 0x1
|
||||
#define CL_GLOBAL 0x2
|
||||
|
||||
/* cl_device_exec_capabilities - bitfield */
|
||||
#define CL_EXEC_KERNEL (1 << 0)
|
||||
#define CL_EXEC_NATIVE_KERNEL (1 << 1)
|
||||
|
||||
/* cl_command_queue_properties - bitfield */
|
||||
#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
|
||||
#define CL_QUEUE_PROFILING_ENABLE (1 << 1)
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_REFERENCE_COUNT 0x1080
|
||||
#define CL_CONTEXT_DEVICES 0x1081
|
||||
#define CL_CONTEXT_PROPERTIES 0x1082
|
||||
#define CL_CONTEXT_NUM_DEVICES 0x1083
|
||||
|
||||
/* cl_context_info + cl_context_properties */
|
||||
#define CL_CONTEXT_PLATFORM 0x1084
|
||||
|
||||
/* cl_command_queue_info */
|
||||
#define CL_QUEUE_CONTEXT 0x1090
|
||||
#define CL_QUEUE_DEVICE 0x1091
|
||||
#define CL_QUEUE_REFERENCE_COUNT 0x1092
|
||||
#define CL_QUEUE_PROPERTIES 0x1093
|
||||
|
||||
/* cl_mem_flags - bitfield */
|
||||
#define CL_MEM_READ_WRITE (1 << 0)
|
||||
#define CL_MEM_WRITE_ONLY (1 << 1)
|
||||
#define CL_MEM_READ_ONLY (1 << 2)
|
||||
#define CL_MEM_USE_HOST_PTR (1 << 3)
|
||||
#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
|
||||
#define CL_MEM_COPY_HOST_PTR (1 << 5)
|
||||
|
||||
/* cl_channel_order */
|
||||
#define CL_R 0x10B0
|
||||
#define CL_A 0x10B1
|
||||
#define CL_RG 0x10B2
|
||||
#define CL_RA 0x10B3
|
||||
#define CL_RGB 0x10B4
|
||||
#define CL_RGBA 0x10B5
|
||||
#define CL_BGRA 0x10B6
|
||||
#define CL_ARGB 0x10B7
|
||||
#define CL_INTENSITY 0x10B8
|
||||
#define CL_LUMINANCE 0x10B9
|
||||
#define CL_Rx 0x10BA
|
||||
#define CL_RGx 0x10BB
|
||||
#define CL_RGBx 0x10BC
|
||||
|
||||
/* cl_channel_type */
|
||||
#define CL_SNORM_INT8 0x10D0
|
||||
#define CL_SNORM_INT16 0x10D1
|
||||
#define CL_UNORM_INT8 0x10D2
|
||||
#define CL_UNORM_INT16 0x10D3
|
||||
#define CL_UNORM_SHORT_565 0x10D4
|
||||
#define CL_UNORM_SHORT_555 0x10D5
|
||||
#define CL_UNORM_INT_101010 0x10D6
|
||||
#define CL_SIGNED_INT8 0x10D7
|
||||
#define CL_SIGNED_INT16 0x10D8
|
||||
#define CL_SIGNED_INT32 0x10D9
|
||||
#define CL_UNSIGNED_INT8 0x10DA
|
||||
#define CL_UNSIGNED_INT16 0x10DB
|
||||
#define CL_UNSIGNED_INT32 0x10DC
|
||||
#define CL_HALF_FLOAT 0x10DD
|
||||
#define CL_FLOAT 0x10DE
|
||||
|
||||
/* cl_mem_object_type */
|
||||
#define CL_MEM_OBJECT_BUFFER 0x10F0
|
||||
#define CL_MEM_OBJECT_IMAGE2D 0x10F1
|
||||
#define CL_MEM_OBJECT_IMAGE3D 0x10F2
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_TYPE 0x1100
|
||||
#define CL_MEM_FLAGS 0x1101
|
||||
#define CL_MEM_SIZE 0x1102
|
||||
#define CL_MEM_HOST_PTR 0x1103
|
||||
#define CL_MEM_MAP_COUNT 0x1104
|
||||
#define CL_MEM_REFERENCE_COUNT 0x1105
|
||||
#define CL_MEM_CONTEXT 0x1106
|
||||
#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
|
||||
#define CL_MEM_OFFSET 0x1108
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_FORMAT 0x1110
|
||||
#define CL_IMAGE_ELEMENT_SIZE 0x1111
|
||||
#define CL_IMAGE_ROW_PITCH 0x1112
|
||||
#define CL_IMAGE_SLICE_PITCH 0x1113
|
||||
#define CL_IMAGE_WIDTH 0x1114
|
||||
#define CL_IMAGE_HEIGHT 0x1115
|
||||
#define CL_IMAGE_DEPTH 0x1116
|
||||
|
||||
/* cl_addressing_mode */
|
||||
#define CL_ADDRESS_NONE 0x1130
|
||||
#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
|
||||
#define CL_ADDRESS_CLAMP 0x1132
|
||||
#define CL_ADDRESS_REPEAT 0x1133
|
||||
#define CL_ADDRESS_MIRRORED_REPEAT 0x1134
|
||||
|
||||
/* cl_filter_mode */
|
||||
#define CL_FILTER_NEAREST 0x1140
|
||||
#define CL_FILTER_LINEAR 0x1141
|
||||
|
||||
/* cl_sampler_info */
|
||||
#define CL_SAMPLER_REFERENCE_COUNT 0x1150
|
||||
#define CL_SAMPLER_CONTEXT 0x1151
|
||||
#define CL_SAMPLER_NORMALIZED_COORDS 0x1152
|
||||
#define CL_SAMPLER_ADDRESSING_MODE 0x1153
|
||||
#define CL_SAMPLER_FILTER_MODE 0x1154
|
||||
|
||||
/* cl_map_flags - bitfield */
|
||||
#define CL_MAP_READ (1 << 0)
|
||||
#define CL_MAP_WRITE (1 << 1)
|
||||
|
||||
/* cl_program_info */
|
||||
#define CL_PROGRAM_REFERENCE_COUNT 0x1160
|
||||
#define CL_PROGRAM_CONTEXT 0x1161
|
||||
#define CL_PROGRAM_NUM_DEVICES 0x1162
|
||||
#define CL_PROGRAM_DEVICES 0x1163
|
||||
#define CL_PROGRAM_SOURCE 0x1164
|
||||
#define CL_PROGRAM_BINARY_SIZES 0x1165
|
||||
#define CL_PROGRAM_BINARIES 0x1166
|
||||
|
||||
/* cl_program_build_info */
|
||||
#define CL_PROGRAM_BUILD_STATUS 0x1181
|
||||
#define CL_PROGRAM_BUILD_OPTIONS 0x1182
|
||||
#define CL_PROGRAM_BUILD_LOG 0x1183
|
||||
|
||||
/* cl_build_status */
|
||||
#define CL_BUILD_SUCCESS 0
|
||||
#define CL_BUILD_NONE -1
|
||||
#define CL_BUILD_ERROR -2
|
||||
#define CL_BUILD_IN_PROGRESS -3
|
||||
|
||||
/* cl_kernel_info */
|
||||
#define CL_KERNEL_FUNCTION_NAME 0x1190
|
||||
#define CL_KERNEL_NUM_ARGS 0x1191
|
||||
#define CL_KERNEL_REFERENCE_COUNT 0x1192
|
||||
#define CL_KERNEL_CONTEXT 0x1193
|
||||
#define CL_KERNEL_PROGRAM 0x1194
|
||||
|
||||
/* cl_kernel_work_group_info */
|
||||
#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
|
||||
#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
|
||||
#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
|
||||
#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
|
||||
#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
|
||||
|
||||
/* cl_event_info */
|
||||
#define CL_EVENT_COMMAND_QUEUE 0x11D0
|
||||
#define CL_EVENT_COMMAND_TYPE 0x11D1
|
||||
#define CL_EVENT_REFERENCE_COUNT 0x11D2
|
||||
#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
|
||||
#define CL_EVENT_CONTEXT 0x11D4
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_NDRANGE_KERNEL 0x11F0
|
||||
#define CL_COMMAND_TASK 0x11F1
|
||||
#define CL_COMMAND_NATIVE_KERNEL 0x11F2
|
||||
#define CL_COMMAND_READ_BUFFER 0x11F3
|
||||
#define CL_COMMAND_WRITE_BUFFER 0x11F4
|
||||
#define CL_COMMAND_COPY_BUFFER 0x11F5
|
||||
#define CL_COMMAND_READ_IMAGE 0x11F6
|
||||
#define CL_COMMAND_WRITE_IMAGE 0x11F7
|
||||
#define CL_COMMAND_COPY_IMAGE 0x11F8
|
||||
#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
|
||||
#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
|
||||
#define CL_COMMAND_MAP_BUFFER 0x11FB
|
||||
#define CL_COMMAND_MAP_IMAGE 0x11FC
|
||||
#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
|
||||
#define CL_COMMAND_MARKER 0x11FE
|
||||
#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
|
||||
#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
|
||||
#define CL_COMMAND_READ_BUFFER_RECT 0x1201
|
||||
#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
|
||||
#define CL_COMMAND_COPY_BUFFER_RECT 0x1203
|
||||
#define CL_COMMAND_USER 0x1204
|
||||
|
||||
/* command execution status */
|
||||
#define CL_COMPLETE 0x0
|
||||
#define CL_RUNNING 0x1
|
||||
#define CL_SUBMITTED 0x2
|
||||
#define CL_QUEUED 0x3
|
||||
|
||||
/* cl_buffer_create_type */
|
||||
#define CL_BUFFER_CREATE_TYPE_REGION 0x1220
|
||||
|
||||
/* cl_profiling_info */
|
||||
#define CL_PROFILING_COMMAND_QUEUED 0x1280
|
||||
#define CL_PROFILING_COMMAND_SUBMIT 0x1281
|
||||
#define CL_PROFILING_COMMAND_START 0x1282
|
||||
#define CL_PROFILING_COMMAND_END 0x1283
|
||||
|
||||
/********************************************************************************************************/
|
||||
|
||||
/* Platform API */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetPlatformIDs(cl_uint /* num_entries */,
|
||||
cl_platform_id * /* platforms */,
|
||||
cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetPlatformInfo(cl_platform_id /* platform */,
|
||||
cl_platform_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Device APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDs(cl_platform_id /* platform */,
|
||||
cl_device_type /* device_type */,
|
||||
cl_uint /* num_entries */,
|
||||
cl_device_id * /* devices */,
|
||||
cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceInfo(cl_device_id /* device */,
|
||||
cl_device_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Context APIs */
|
||||
extern CL_API_ENTRY cl_context CL_API_CALL
|
||||
clCreateContext(const cl_context_properties * /* properties */,
|
||||
cl_uint /* num_devices */,
|
||||
const cl_device_id * /* devices */,
|
||||
void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
|
||||
void * /* user_data */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_context CL_API_CALL
|
||||
clCreateContextFromType(const cl_context_properties * /* properties */,
|
||||
cl_device_type /* device_type */,
|
||||
void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *),
|
||||
void * /* user_data */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetContextInfo(cl_context /* context */,
|
||||
cl_context_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Command Queue APIs */
|
||||
extern CL_API_ENTRY cl_command_queue CL_API_CALL
|
||||
clCreateCommandQueue(cl_context /* context */,
|
||||
cl_device_id /* device */,
|
||||
cl_command_queue_properties /* properties */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetCommandQueueInfo(cl_command_queue /* command_queue */,
|
||||
cl_command_queue_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#warning CL_USE_DEPRECATED_OPENCL_1_0_APIS is defined. These APIs are unsupported and untested in OpenCL 1.1!
|
||||
/*
|
||||
* WARNING:
|
||||
* This API introduces mutable state into the OpenCL implementation. It has been REMOVED
|
||||
* to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the
|
||||
* OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
|
||||
* It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
|
||||
*
|
||||
* Software developers previously relying on this API are instructed to set the command queue
|
||||
* properties when creating the queue, instead.
|
||||
*/
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetCommandQueueProperty(cl_command_queue /* command_queue */,
|
||||
cl_command_queue_properties /* properties */,
|
||||
cl_bool /* enable */,
|
||||
cl_command_queue_properties * /* old_properties */) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
|
||||
#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
|
||||
|
||||
/* Memory Object APIs */
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateBuffer(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
size_t /* size */,
|
||||
void * /* host_ptr */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateSubBuffer(cl_mem /* buffer */,
|
||||
cl_mem_flags /* flags */,
|
||||
cl_buffer_create_type /* buffer_create_type */,
|
||||
const void * /* buffer_create_info */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateImage2D(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
const cl_image_format * /* image_format */,
|
||||
size_t /* image_width */,
|
||||
size_t /* image_height */,
|
||||
size_t /* image_row_pitch */,
|
||||
void * /* host_ptr */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateImage3D(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
const cl_image_format * /* image_format */,
|
||||
size_t /* image_width */,
|
||||
size_t /* image_height */,
|
||||
size_t /* image_depth */,
|
||||
size_t /* image_row_pitch */,
|
||||
size_t /* image_slice_pitch */,
|
||||
void * /* host_ptr */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetSupportedImageFormats(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
cl_mem_object_type /* image_type */,
|
||||
cl_uint /* num_entries */,
|
||||
cl_image_format * /* image_formats */,
|
||||
cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetMemObjectInfo(cl_mem /* memobj */,
|
||||
cl_mem_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetImageInfo(cl_mem /* image */,
|
||||
cl_image_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetMemObjectDestructorCallback( cl_mem /* memobj */,
|
||||
void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
|
||||
void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
/* Sampler APIs */
|
||||
extern CL_API_ENTRY cl_sampler CL_API_CALL
|
||||
clCreateSampler(cl_context /* context */,
|
||||
cl_bool /* normalized_coords */,
|
||||
cl_addressing_mode /* addressing_mode */,
|
||||
cl_filter_mode /* filter_mode */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetSamplerInfo(cl_sampler /* sampler */,
|
||||
cl_sampler_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Program Object APIs */
|
||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||
clCreateProgramWithSource(cl_context /* context */,
|
||||
cl_uint /* count */,
|
||||
const char ** /* strings */,
|
||||
const size_t * /* lengths */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||
clCreateProgramWithBinary(cl_context /* context */,
|
||||
cl_uint /* num_devices */,
|
||||
const cl_device_id * /* device_list */,
|
||||
const size_t * /* lengths */,
|
||||
const unsigned char ** /* binaries */,
|
||||
cl_int * /* binary_status */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clBuildProgram(cl_program /* program */,
|
||||
cl_uint /* num_devices */,
|
||||
const cl_device_id * /* device_list */,
|
||||
const char * /* options */,
|
||||
void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
|
||||
void * /* user_data */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetProgramInfo(cl_program /* program */,
|
||||
cl_program_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetProgramBuildInfo(cl_program /* program */,
|
||||
cl_device_id /* device */,
|
||||
cl_program_build_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Kernel Object APIs */
|
||||
extern CL_API_ENTRY cl_kernel CL_API_CALL
|
||||
clCreateKernel(cl_program /* program */,
|
||||
const char * /* kernel_name */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clCreateKernelsInProgram(cl_program /* program */,
|
||||
cl_uint /* num_kernels */,
|
||||
cl_kernel * /* kernels */,
|
||||
cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelArg(cl_kernel /* kernel */,
|
||||
cl_uint /* arg_index */,
|
||||
size_t /* arg_size */,
|
||||
const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelInfo(cl_kernel /* kernel */,
|
||||
cl_kernel_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
|
||||
cl_device_id /* device */,
|
||||
cl_kernel_work_group_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Event Object APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clWaitForEvents(cl_uint /* num_events */,
|
||||
const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetEventInfo(cl_event /* event */,
|
||||
cl_event_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateUserEvent(cl_context /* context */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetUserEventStatus(cl_event /* event */,
|
||||
cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetEventCallback( cl_event /* event */,
|
||||
cl_int /* command_exec_callback_type */,
|
||||
void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
|
||||
void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
/* Profiling APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetEventProfilingInfo(cl_event /* event */,
|
||||
cl_profiling_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Flush and Finish APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Enqueued Commands APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReadBuffer(cl_command_queue /* command_queue */,
|
||||
cl_mem /* buffer */,
|
||||
cl_bool /* blocking_read */,
|
||||
size_t /* offset */,
|
||||
size_t /* cb */,
|
||||
void * /* ptr */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReadBufferRect(cl_command_queue /* command_queue */,
|
||||
cl_mem /* buffer */,
|
||||
cl_bool /* blocking_read */,
|
||||
const size_t * /* buffer_origin */,
|
||||
const size_t * /* host_origin */,
|
||||
const size_t * /* region */,
|
||||
size_t /* buffer_row_pitch */,
|
||||
size_t /* buffer_slice_pitch */,
|
||||
size_t /* host_row_pitch */,
|
||||
size_t /* host_slice_pitch */,
|
||||
void * /* ptr */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueWriteBuffer(cl_command_queue /* command_queue */,
|
||||
cl_mem /* buffer */,
|
||||
cl_bool /* blocking_write */,
|
||||
size_t /* offset */,
|
||||
size_t /* cb */,
|
||||
const void * /* ptr */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueWriteBufferRect(cl_command_queue /* command_queue */,
|
||||
cl_mem /* buffer */,
|
||||
cl_bool /* blocking_write */,
|
||||
const size_t * /* buffer_origin */,
|
||||
const size_t * /* host_origin */,
|
||||
const size_t * /* region */,
|
||||
size_t /* buffer_row_pitch */,
|
||||
size_t /* buffer_slice_pitch */,
|
||||
size_t /* host_row_pitch */,
|
||||
size_t /* host_slice_pitch */,
|
||||
const void * /* ptr */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueCopyBuffer(cl_command_queue /* command_queue */,
|
||||
cl_mem /* src_buffer */,
|
||||
cl_mem /* dst_buffer */,
|
||||
size_t /* src_offset */,
|
||||
size_t /* dst_offset */,
|
||||
size_t /* cb */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueCopyBufferRect(cl_command_queue /* command_queue */,
|
||||
cl_mem /* src_buffer */,
|
||||
cl_mem /* dst_buffer */,
|
||||
const size_t * /* src_origin */,
|
||||
const size_t * /* dst_origin */,
|
||||
const size_t * /* region */,
|
||||
size_t /* src_row_pitch */,
|
||||
size_t /* src_slice_pitch */,
|
||||
size_t /* dst_row_pitch */,
|
||||
size_t /* dst_slice_pitch */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReadImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* image */,
|
||||
cl_bool /* blocking_read */,
|
||||
const size_t * /* origin[3] */,
|
||||
const size_t * /* region[3] */,
|
||||
size_t /* row_pitch */,
|
||||
size_t /* slice_pitch */,
|
||||
void * /* ptr */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueWriteImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* image */,
|
||||
cl_bool /* blocking_write */,
|
||||
const size_t * /* origin[3] */,
|
||||
const size_t * /* region[3] */,
|
||||
size_t /* input_row_pitch */,
|
||||
size_t /* input_slice_pitch */,
|
||||
const void * /* ptr */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueCopyImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* src_image */,
|
||||
cl_mem /* dst_image */,
|
||||
const size_t * /* src_origin[3] */,
|
||||
const size_t * /* dst_origin[3] */,
|
||||
const size_t * /* region[3] */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
|
||||
cl_mem /* src_image */,
|
||||
cl_mem /* dst_buffer */,
|
||||
const size_t * /* src_origin[3] */,
|
||||
const size_t * /* region[3] */,
|
||||
size_t /* dst_offset */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* src_buffer */,
|
||||
cl_mem /* dst_image */,
|
||||
size_t /* src_offset */,
|
||||
const size_t * /* dst_origin[3] */,
|
||||
const size_t * /* region[3] */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY void * CL_API_CALL
|
||||
clEnqueueMapBuffer(cl_command_queue /* command_queue */,
|
||||
cl_mem /* buffer */,
|
||||
cl_bool /* blocking_map */,
|
||||
cl_map_flags /* map_flags */,
|
||||
size_t /* offset */,
|
||||
size_t /* cb */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY void * CL_API_CALL
|
||||
clEnqueueMapImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* image */,
|
||||
cl_bool /* blocking_map */,
|
||||
cl_map_flags /* map_flags */,
|
||||
const size_t * /* origin[3] */,
|
||||
const size_t * /* region[3] */,
|
||||
size_t * /* image_row_pitch */,
|
||||
size_t * /* image_slice_pitch */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
|
||||
cl_mem /* memobj */,
|
||||
void * /* mapped_ptr */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
|
||||
cl_kernel /* kernel */,
|
||||
cl_uint /* work_dim */,
|
||||
const size_t * /* global_work_offset */,
|
||||
const size_t * /* global_work_size */,
|
||||
const size_t * /* local_work_size */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueTask(cl_command_queue /* command_queue */,
|
||||
cl_kernel /* kernel */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueNativeKernel(cl_command_queue /* command_queue */,
|
||||
void (*user_func)(void *),
|
||||
void * /* args */,
|
||||
size_t /* cb_args */,
|
||||
cl_uint /* num_mem_objects */,
|
||||
const cl_mem * /* mem_list */,
|
||||
const void ** /* args_mem_loc */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMarker(cl_command_queue /* command_queue */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_events */,
|
||||
const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Extension function access
|
||||
*
|
||||
* Returns the extension function address for the given function name,
|
||||
* or NULL if a valid function can not be found. The client must
|
||||
* check to make sure the address is not NULL, before using or
|
||||
* calling the returned function address.
|
||||
*/
|
||||
extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_H */
|
||||
|
4011
include/CL/cl.hpp
4011
include/CL/cl.hpp
File diff suppressed because it is too large
Load Diff
@@ -1,213 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are 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 Materials.
|
||||
*
|
||||
* THE MATERIALS ARE 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
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
|
||||
|
||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||
/* (OpenGL, D3D) dependencies. */
|
||||
|
||||
#ifndef __CL_EXT_H
|
||||
#define __CL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
/* cl_khr_fp64 extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||
|
||||
/* cl_khr_fp16 extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||
|
||||
/* Memory object destruction
|
||||
*
|
||||
* Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
|
||||
*
|
||||
* Registers a user callback function that will be called when the memory object is deleted and its resources
|
||||
* freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
|
||||
* stack associated with memobj. The registered user callback functions are called in the reverse order in
|
||||
* which they were registered. The user callback functions are called and then the memory object is deleted
|
||||
* and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
|
||||
* notified when the memory referenced by host_ptr, specified when the memory object is created and used as
|
||||
* the storage bits for the memory object, can be reused or freed.
|
||||
*
|
||||
* The application may not call CL api's with the cl_mem object passed to the pfn_notify.
|
||||
*
|
||||
* Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*/
|
||||
#define cl_APPLE_SetMemObjectDestructor 1
|
||||
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */,
|
||||
void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
|
||||
void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Context Logging Functions
|
||||
*
|
||||
* The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
|
||||
* Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*
|
||||
* clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger
|
||||
*/
|
||||
#define cl_APPLE_ContextLoggingFunctions 1
|
||||
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */,
|
||||
const void * /* private_info */,
|
||||
size_t /* cb */,
|
||||
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
|
||||
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */,
|
||||
const void * /* private_info */,
|
||||
size_t /* cb */,
|
||||
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
|
||||
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */,
|
||||
const void * /* private_info */,
|
||||
size_t /* cb */,
|
||||
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/************************
|
||||
* cl_khr_icd extension *
|
||||
************************/
|
||||
#define cl_khr_icd 1
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_PLATFORM_NOT_FOUND_KHR -1001
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clIcdGetPlatformIDsKHR(cl_uint /* num_entries */,
|
||||
cl_platform_id * /* platforms */,
|
||||
cl_uint * /* num_platforms */);
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(
|
||||
cl_uint /* num_entries */,
|
||||
cl_platform_id * /* platforms */,
|
||||
cl_uint * /* num_platforms */);
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_nv_device_attribute_query extension *
|
||||
******************************************/
|
||||
/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
|
||||
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
|
||||
#define CL_DEVICE_WARP_SIZE_NV 0x4003
|
||||
#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
|
||||
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
|
||||
#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_amd_device_attribute_query *
|
||||
*********************************/
|
||||
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
|
||||
|
||||
|
||||
#ifdef CL_VERSION_1_1
|
||||
/***********************************
|
||||
* cl_ext_device_fission extension *
|
||||
***********************************/
|
||||
#define cl_ext_device_fission 1
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef cl_ulong cl_device_partition_property_ext;
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clCreateSubDevicesEXT( cl_device_id /*in_device*/,
|
||||
const cl_device_partition_property_ext * /* properties */,
|
||||
cl_uint /*num_entries*/,
|
||||
cl_device_id * /*out_devices*/,
|
||||
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/,
|
||||
const cl_device_partition_property_ext * /* properties */,
|
||||
cl_uint /*num_entries*/,
|
||||
cl_device_id * /*out_devices*/,
|
||||
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
/* cl_device_partition_property_ext */
|
||||
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
||||
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||
|
||||
/* clDeviceGetInfo selectors */
|
||||
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||
|
||||
/* error codes */
|
||||
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||
|
||||
/* CL_AFFINITY_DOMAINs */
|
||||
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||
|
||||
/* cl_device_partition_property_ext list terminators */
|
||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
||||
|
||||
|
||||
|
||||
#endif /* CL_VERSION_1_1 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __CL_EXT_H */
|
@@ -1,155 +0,0 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are 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 Materials.
|
||||
*
|
||||
* THE MATERIALS ARE 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
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
/*
|
||||
* cl_gl.h contains Khronos-approved (KHR) OpenCL extensions which have
|
||||
* OpenGL dependencies. The application is responsible for #including
|
||||
* OpenGL or OpenGL ES headers before #including cl_gl.h.
|
||||
*/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_H
|
||||
#define __OPENCL_CL_GL_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#include <OpenGL/CGLDevice.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef cl_uint cl_gl_object_type;
|
||||
typedef cl_uint cl_gl_texture_info;
|
||||
typedef cl_uint cl_gl_platform_info;
|
||||
typedef struct __GLsync *cl_GLsync;
|
||||
|
||||
/* cl_gl_object_type */
|
||||
#define CL_GL_OBJECT_BUFFER 0x2000
|
||||
#define CL_GL_OBJECT_TEXTURE2D 0x2001
|
||||
#define CL_GL_OBJECT_TEXTURE3D 0x2002
|
||||
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
|
||||
|
||||
/* cl_gl_texture_info */
|
||||
#define CL_GL_TEXTURE_TARGET 0x2004
|
||||
#define CL_GL_MIPMAP_LEVEL 0x2005
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLBuffer(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
cl_GLuint /* bufobj */,
|
||||
int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture2D(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
cl_GLenum /* target */,
|
||||
cl_GLint /* miplevel */,
|
||||
cl_GLuint /* texture */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture3D(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
cl_GLenum /* target */,
|
||||
cl_GLint /* miplevel */,
|
||||
cl_GLuint /* texture */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLRenderbuffer(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
cl_GLuint /* renderbuffer */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLObjectInfo(cl_mem /* memobj */,
|
||||
cl_gl_object_type * /* gl_object_type */,
|
||||
cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLTextureInfo(cl_mem /* memobj */,
|
||||
cl_gl_texture_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_objects */,
|
||||
const cl_mem * /* mem_objects */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_objects */,
|
||||
const cl_mem * /* mem_objects */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* cl_khr_gl_sharing extension */
|
||||
|
||||
#define cl_khr_gl_sharing 1
|
||||
|
||||
typedef cl_uint cl_gl_context_info;
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
|
||||
|
||||
/* cl_gl_context_info */
|
||||
#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
|
||||
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
|
||||
|
||||
/* Additional cl_context_properties */
|
||||
#define CL_GL_CONTEXT_KHR 0x2008
|
||||
#define CL_EGL_DISPLAY_KHR 0x2009
|
||||
#define CL_GLX_DISPLAY_KHR 0x200A
|
||||
#define CL_WGL_HDC_KHR 0x200B
|
||||
#define CL_CGL_SHAREGROUP_KHR 0x200C
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLContextInfoKHR(const cl_context_properties * /* properties */,
|
||||
cl_gl_context_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
|
||||
const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_H */
|
@@ -1,69 +0,0 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are 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 Materials.
|
||||
*
|
||||
* THE MATERIALS ARE 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
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */
|
||||
/* OpenGL dependencies. */
|
||||
|
||||
#ifndef __OPENCL_CL_GL_EXT_H
|
||||
#define __OPENCL_CL_GL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl_gl.h>
|
||||
#else
|
||||
#include <CL/cl_gl.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For each extension, follow this template
|
||||
* /* cl_VEN_extname extension */
|
||||
/* #define cl_VEN_extname 1
|
||||
* ... define new types, if any
|
||||
* ... define new tokens, if any
|
||||
* ... define new APIs, if any
|
||||
*
|
||||
* If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header
|
||||
* This allows us to avoid having to decide whether to include GL headers or GLES here.
|
||||
*/
|
||||
|
||||
/*
|
||||
* cl_khr_gl_event extension
|
||||
* See section 9.9 in the OpenCL 1.1 spec for more information
|
||||
*/
|
||||
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromGLsyncKHR(cl_context /* context */,
|
||||
cl_GLsync /* cl_GLsync */,
|
||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_EXT_H */
|
File diff suppressed because it is too large
Load Diff
@@ -1,54 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are 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 Materials.
|
||||
*
|
||||
* THE MATERIALS ARE 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
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_H
|
||||
#define __OPENCL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <OpenCL/cl.h>
|
||||
#include <OpenCL/cl_gl.h>
|
||||
#include <OpenCL/cl_gl_ext.h>
|
||||
#include <OpenCL/cl_ext.h>
|
||||
|
||||
#else
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_gl.h>
|
||||
#include <CL/cl_gl_ext.h>
|
||||
#include <CL/cl_ext.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_H */
|
||||
|
@@ -7573,12 +7573,12 @@ typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
|
||||
GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
|
||||
GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, GLvoid *userParam);
|
||||
GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam);
|
||||
GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
|
||||
typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
|
||||
typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, GLvoid *userParam);
|
||||
typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam);
|
||||
typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
|
||||
#endif
|
||||
|
||||
|
@@ -894,7 +894,7 @@ struct __DRIdri2ExtensionRec {
|
||||
* extensions.
|
||||
*/
|
||||
#define __DRI_IMAGE "DRI_IMAGE"
|
||||
#define __DRI_IMAGE_VERSION 4
|
||||
#define __DRI_IMAGE_VERSION 1
|
||||
|
||||
/**
|
||||
* These formats correspond to the similarly named MESA_FORMAT_*
|
||||
@@ -906,12 +906,10 @@ struct __DRIdri2ExtensionRec {
|
||||
#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002
|
||||
#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003
|
||||
#define __DRI_IMAGE_FORMAT_ABGR8888 0x1004
|
||||
#define __DRI_IMAGE_FORMAT_XBGR8888 0x1005
|
||||
|
||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||
#define __DRI_IMAGE_USE_CURSOR 0x0004
|
||||
#define __DRI_IMAGE_USE_WRITE 0x0008
|
||||
|
||||
/**
|
||||
* queryImage attributes
|
||||
@@ -920,7 +918,6 @@ struct __DRIdri2ExtensionRec {
|
||||
#define __DRI_IMAGE_ATTRIB_STRIDE 0x2000
|
||||
#define __DRI_IMAGE_ATTRIB_HANDLE 0x2001
|
||||
#define __DRI_IMAGE_ATTRIB_NAME 0x2002
|
||||
#define __DRI_IMAGE_ATTRIB_FORMAT 0x2003 /* available in versions 3+ */
|
||||
|
||||
typedef struct __DRIimageRec __DRIimage;
|
||||
typedef struct __DRIimageExtensionRec __DRIimageExtension;
|
||||
@@ -949,20 +946,6 @@ struct __DRIimageExtensionRec {
|
||||
* The new __DRIimage will share the content with the old one, see dup(2).
|
||||
*/
|
||||
__DRIimage *(*dupImage)(__DRIimage *image, void *loaderPrivate);
|
||||
|
||||
/**
|
||||
* Validate that a __DRIimage can be used a certain way.
|
||||
*
|
||||
* \since 2
|
||||
*/
|
||||
GLboolean (*validateUsage)(__DRIimage *image, unsigned int use);
|
||||
|
||||
/**
|
||||
* Write data into image.
|
||||
*
|
||||
* \since 4
|
||||
*/
|
||||
int (*write)(__DRIimage *image, const void *buf, size_t count);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -25,9 +25,3 @@ CHIPSET(0x0162, IVYBRIDGE_GT2, ivb_gt2)
|
||||
CHIPSET(0x0156, IVYBRIDGE_M_GT1, ivb_gt1)
|
||||
CHIPSET(0x0166, IVYBRIDGE_M_GT2, ivb_gt2)
|
||||
CHIPSET(0x015a, IVYBRIDGE_S_GT1, ivb_gt1)
|
||||
CHIPSET(0x016a, IVYBRIDGE_S_GT2, ivb_gt2)
|
||||
CHIPSET(0x0402, HASWELL_GT1, hsw_gt1)
|
||||
CHIPSET(0x0412, HASWELL_GT2, hsw_gt2)
|
||||
CHIPSET(0x0406, HASWELL_M_GT1, hsw_gt1)
|
||||
CHIPSET(0x0416, HASWELL_M_GT2, hsw_gt2)
|
||||
CHIPSET(0x0A16, HASWELL_M_ULT_GT2, hsw_gt2)
|
||||
|
@@ -45,12 +45,6 @@ static const int r600_chip_ids[] = {
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const int radeonsi_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/radeonsi_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const int vmwgfx_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/vmwgfx_pci_ids.h"
|
||||
@@ -71,7 +65,6 @@ static const struct {
|
||||
#endif
|
||||
{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
|
||||
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
|
||||
{ 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) },
|
||||
{ 0x10de, "nouveau", NULL, -1 },
|
||||
{ 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },
|
||||
{ 0x0000, NULL, NULL, 0 },
|
||||
|
@@ -279,11 +279,3 @@ CHIPSET(0x6772, CAICOS_6772, CAICOS)
|
||||
CHIPSET(0x6778, CAICOS_6778, CAICOS)
|
||||
CHIPSET(0x6779, CAICOS_6779, CAICOS)
|
||||
CHIPSET(0x677B, CAICOS_677B, CAICOS)
|
||||
|
||||
CHIPSET(0x9900, ARUBA_9900, ARUBA)
|
||||
CHIPSET(0x9901, ARUBA_9901, ARUBA)
|
||||
CHIPSET(0x9903, ARUBA_9903, ARUBA)
|
||||
CHIPSET(0x9904, ARUBA_9904, ARUBA)
|
||||
CHIPSET(0x990F, ARUBA_990F, ARUBA)
|
||||
CHIPSET(0x9990, ARUBA_9990, ARUBA)
|
||||
CHIPSET(0x9991, ARUBA_9991, ARUBA)
|
||||
|
@@ -1,40 +0,0 @@
|
||||
CHIPSET(0x6780, TAHITI_6780, TAHITI)
|
||||
CHIPSET(0x6784, TAHITI_6784, TAHITI)
|
||||
CHIPSET(0x6788, TAHITI_678A, TAHITI)
|
||||
CHIPSET(0x678A, TAHITI_678A, TAHITI)
|
||||
CHIPSET(0x6790, TAHITI_6790, TAHITI)
|
||||
CHIPSET(0x6798, TAHITI_6798, TAHITI)
|
||||
CHIPSET(0x6799, TAHITI_6799, TAHITI)
|
||||
CHIPSET(0x679A, TAHITI_679E, TAHITI)
|
||||
CHIPSET(0x679E, TAHITI_679E, TAHITI)
|
||||
CHIPSET(0x679F, TAHITI_679F, TAHITI)
|
||||
|
||||
CHIPSET(0x6800, PITCAIRN_6800, PITCAIRN)
|
||||
CHIPSET(0x6801, PITCAIRN_6801, PITCAIRN)
|
||||
CHIPSET(0x6802, PITCAIRN_6802, PITCAIRN)
|
||||
CHIPSET(0x6808, PITCAIRN_6808, PITCAIRN)
|
||||
CHIPSET(0x6809, PITCAIRN_6809, PITCAIRN)
|
||||
CHIPSET(0x6810, PITCAIRN_6810, PITCAIRN)
|
||||
CHIPSET(0x6818, PITCAIRN_6818, PITCAIRN)
|
||||
CHIPSET(0x6819, PITCAIRN_6819, PITCAIRN)
|
||||
CHIPSET(0x684C, PITCAIRN_684C, PITCAIRN)
|
||||
|
||||
CHIPSET(0x6820, VERDE_6820, VERDE)
|
||||
CHIPSET(0x6821, VERDE_6821, VERDE)
|
||||
CHIPSET(0x6823, VERDE_6824, VERDE)
|
||||
CHIPSET(0x6824, VERDE_6824, VERDE)
|
||||
CHIPSET(0x6825, VERDE_6825, VERDE)
|
||||
CHIPSET(0x6826, VERDE_6825, VERDE)
|
||||
CHIPSET(0x6827, VERDE_6827, VERDE)
|
||||
CHIPSET(0x6828, VERDE_6828, VERDE)
|
||||
CHIPSET(0x6829, VERDE_6829, VERDE)
|
||||
CHIPSET(0x682D, VERDE_682D, VERDE)
|
||||
CHIPSET(0x682F, VERDE_682F, VERDE)
|
||||
CHIPSET(0x6830, VERDE_6830, VERDE)
|
||||
CHIPSET(0x6831, VERDE_6831, VERDE)
|
||||
CHIPSET(0x6837, VERDE_6831, VERDE)
|
||||
CHIPSET(0x6838, VERDE_6838, VERDE)
|
||||
CHIPSET(0x6839, VERDE_6839, VERDE)
|
||||
CHIPSET(0x683B, VERDE_683B, VERDE)
|
||||
CHIPSET(0x683D, VERDE_683D, VERDE)
|
||||
CHIPSET(0x683F, VERDE_683F, VERDE)
|
@@ -174,9 +174,6 @@ def _pkg_check_modules(env, name, modules):
|
||||
if subprocess.call(["pkg-config", "--exists", ' '.join(modules)]) != 0:
|
||||
return
|
||||
|
||||
# Strip version expressions from modules
|
||||
modules = [module.split(' ', 1)[0] for module in modules]
|
||||
|
||||
# Other flags may affect the compilation of unrelated targets, so store
|
||||
# them with a prefix, (e.g., XXX_CFLAGS, XXX_LIBS, etc)
|
||||
try:
|
||||
@@ -192,7 +189,7 @@ def _pkg_check_modules(env, name, modules):
|
||||
|
||||
def pkg_check_modules(env, name, modules):
|
||||
|
||||
sys.stdout.write('Checking for %s (%s)...' % (name, ' '.join(modules)))
|
||||
sys.stdout.write('Checking for %s...' % name)
|
||||
_pkg_check_modules(env, name, modules)
|
||||
result = env['HAVE_' + name]
|
||||
sys.stdout.write(' %s\n' % ['no', 'yes'][int(bool(result))])
|
||||
|
@@ -289,8 +289,6 @@ def generate(env):
|
||||
cppdefines += ['_DEBUG']
|
||||
if platform == 'windows':
|
||||
cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
|
||||
if platform == 'haiku':
|
||||
cppdefines += ['BEOS_THREADS']
|
||||
if env['embedded']:
|
||||
cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED']
|
||||
env.Append(CPPDEFINES = cppdefines)
|
||||
@@ -350,7 +348,7 @@ def generate(env):
|
||||
ccflags += ['-m64']
|
||||
if platform == 'darwin':
|
||||
ccflags += ['-fno-common']
|
||||
if env['platform'] not in ('windows', 'haiku'):
|
||||
if env['platform'] != 'windows':
|
||||
ccflags += ['-fvisibility=hidden']
|
||||
# See also:
|
||||
# - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
@@ -364,6 +362,10 @@ def generate(env):
|
||||
'-Wmissing-prototypes',
|
||||
'-std=gnu99',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.0'):
|
||||
ccflags += [
|
||||
'-Wmissing-field-initializers',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
|
||||
ccflags += [
|
||||
'-Wpointer-arith',
|
||||
@@ -507,12 +509,12 @@ def generate(env):
|
||||
env.PkgCheckModules('X11', ['x11', 'xext', 'xdamage', 'xfixes'])
|
||||
env.PkgCheckModules('XCB', ['x11-xcb', 'xcb-glx'])
|
||||
env.PkgCheckModules('XF86VIDMODE', ['xxf86vm'])
|
||||
env.PkgCheckModules('DRM', ['libdrm >= 2.4.24'])
|
||||
env.PkgCheckModules('DRM_INTEL', ['libdrm_intel >= 2.4.30'])
|
||||
env.PkgCheckModules('DRM_RADEON', ['libdrm_radeon >= 2.4.31'])
|
||||
env.PkgCheckModules('XORG', ['xorg-server >= 1.6.0'])
|
||||
env.PkgCheckModules('KMS', ['libkms >= 2.4.24'])
|
||||
env.PkgCheckModules('UDEV', ['libudev > 150'])
|
||||
env.PkgCheckModules('DRM', ['libdrm'])
|
||||
env.PkgCheckModules('DRM_INTEL', ['libdrm_intel'])
|
||||
env.PkgCheckModules('DRM_RADEON', ['libdrm_radeon'])
|
||||
env.PkgCheckModules('XORG', ['xorg-server'])
|
||||
env.PkgCheckModules('KMS', ['libkms'])
|
||||
env.PkgCheckModules('UDEV', ['libudev'])
|
||||
|
||||
env['dri'] = env['x11'] and env['drm']
|
||||
|
||||
|
@@ -92,19 +92,7 @@ def generate(env):
|
||||
'HAVE_STDINT_H',
|
||||
])
|
||||
env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
|
||||
if llvm_version >= distutils.version.LooseVersion('3.0'):
|
||||
# 3.0
|
||||
env.Prepend(LIBS = [
|
||||
'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
|
||||
'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG',
|
||||
'LLVMAsmPrinter', 'LLVMMCParser', 'LLVMX86AsmPrinter',
|
||||
'LLVMX86Utils', 'LLVMX86Info', 'LLVMJIT',
|
||||
'LLVMExecutionEngine', 'LLVMCodeGen', 'LLVMScalarOpts',
|
||||
'LLVMInstCombine', 'LLVMTransformUtils', 'LLVMipa',
|
||||
'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
|
||||
'LLVMSupport'
|
||||
])
|
||||
elif llvm_version >= distutils.version.LooseVersion('2.9'):
|
||||
if llvm_version >= distutils.version.LooseVersion('2.9'):
|
||||
# 2.9
|
||||
env.Prepend(LIBS = [
|
||||
'LLVMObject', 'LLVMMCJIT', 'LLVMMCDisassembler',
|
||||
@@ -178,7 +166,7 @@ def generate(env):
|
||||
pass
|
||||
env.MergeFlags(cppflags)
|
||||
|
||||
env.ParseConfig('llvm-config --libs engine bitwriter')
|
||||
env.ParseConfig('llvm-config --libs')
|
||||
env.ParseConfig('llvm-config --ldflags')
|
||||
except OSError:
|
||||
print 'scons: llvm-config version %s failed' % llvm_version
|
||||
|
@@ -3,7 +3,7 @@
|
||||
The syntax of a source list file is a very small subset of GNU Make. These
|
||||
features are supported
|
||||
|
||||
operators: =, +=, :=
|
||||
operators: +=, :=
|
||||
line continuation
|
||||
non-nested variable expansion
|
||||
comment
|
||||
@@ -62,18 +62,17 @@ class SourceListParser(object):
|
||||
if op_pos < 0:
|
||||
self._error('not a variable definition')
|
||||
|
||||
if op_pos > 0:
|
||||
if line[op_pos - 1] in [':', '+']:
|
||||
op_pos -= 1
|
||||
if op_pos > 0 and line[op_pos - 1] in [':', '+']:
|
||||
op_pos -= 1
|
||||
else:
|
||||
self._error('only =, :=, and += are supported')
|
||||
self._error('only := and += are supported')
|
||||
|
||||
# set op, sym, and val
|
||||
op = line[op_pos:op_end]
|
||||
sym = line[:op_pos].strip()
|
||||
val = self._expand_value(line[op_end:].lstrip())
|
||||
|
||||
if op in ('=', ':='):
|
||||
if op == ':=':
|
||||
self.symbol_table[sym] = val
|
||||
elif op == '+=':
|
||||
self.symbol_table[sym] += ' ' + val
|
||||
|
@@ -22,11 +22,10 @@ SConscript('mesa/SConscript')
|
||||
SConscript('mapi/vgapi/SConscript')
|
||||
|
||||
if not env['embedded']:
|
||||
if env['platform'] not in ['windows', 'darwin', 'haiku']:
|
||||
if env['platform'] not in ['windows', 'darwin']:
|
||||
SConscript('glx/SConscript')
|
||||
if env['platform'] not in ['darwin', 'haiku', 'sunos']:
|
||||
SConscript('egl/main/SConscript')
|
||||
if env['platform'] not in ['darwin']:
|
||||
SConscript('egl/main/SConscript')
|
||||
SConscript('glu/sgi/SConscript')
|
||||
|
||||
if env['gles']:
|
||||
|
1
src/egl/drivers/.gitignore
vendored
1
src/egl/drivers/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
Makefile
|
31
src/egl/drivers/Makefile
Normal file
31
src/egl/drivers/Makefile
Normal file
@@ -0,0 +1,31 @@
|
||||
# src/egl/drivers/Makefile
|
||||
|
||||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
SUBDIRS = $(EGL_DRIVERS_DIRS)
|
||||
|
||||
|
||||
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
|
@@ -1,30 +0,0 @@
|
||||
# Copyright © 2012 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.
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
if HAVE_EGL_DRIVER_GLX
|
||||
SUBDIRS += glx
|
||||
endif
|
||||
|
||||
if HAVE_EGL_DRIVER_DRI2
|
||||
SUBDIRS += dri2
|
||||
endif
|
66
src/egl/drivers/Makefile.template
Normal file
66
src/egl/drivers/Makefile.template
Normal file
@@ -0,0 +1,66 @@
|
||||
# src/egl/drivers/Makefile.template
|
||||
#
|
||||
# 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
|
||||
# EGL_CFLAGS, additional CFLAGS
|
||||
# EGL_LIBS, additional LIBS
|
||||
#
|
||||
# before including this template.
|
||||
#
|
||||
|
||||
|
||||
EGL_DRIVER_PATH = $(TOP)/$(LIB_DIR)/egl/$(EGL_DRIVER).so
|
||||
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)
|
||||
|
||||
$(EGL_DRIVER_PATH): $(EGL_DRIVER).so
|
||||
@$(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 \
|
||||
-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) -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_OBJECTS)
|
||||
rm -f depend depend.bak
|
||||
|
||||
depend: $(EGL_SOURCES)
|
||||
@ echo "running $(MKDEP)"
|
||||
@ rm -f depend
|
||||
@ touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(EGL_INCLUDES) $(EGL_SOURCES) \
|
||||
>/dev/null 2>/dev/null
|
||||
|
||||
sinclude depend
|
||||
# DO NOT DELETE
|
@@ -32,6 +32,7 @@ LOCAL_SRC_FILES := \
|
||||
platform_android.c
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
-D_EGL_MAIN=_eglBuiltInDriverDRI2 \
|
||||
-DDEFAULT_DRIVER_DIR=\"/system/lib/dri\" \
|
||||
-DHAVE_SHARED_GLAPI \
|
||||
-DHAVE_ANDROID_PLATFORM
|
||||
|
48
src/egl/drivers/dri2/Makefile
Normal file
48
src/egl/drivers/dri2/Makefile
Normal file
@@ -0,0 +1,48 @@
|
||||
# src/egl/drivers/dri2/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EGL_DRIVER = egl_dri2
|
||||
EGL_SOURCES = egl_dri2.c common.c
|
||||
|
||||
EGL_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/egl/main \
|
||||
-I$(TOP)/src/mapi \
|
||||
-I$(TOP)/src/gbm/main \
|
||||
-I$(TOP)/src/gbm/backends/dri \
|
||||
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
|
||||
$(LIBUDEV_CFLAGS) \
|
||||
$(LIBDRM_CFLAGS)
|
||||
|
||||
EGL_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 x11, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_x11.c
|
||||
EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS)
|
||||
EGL_LIBS += $(XCB_DRI2_LIBS)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_drm.c
|
||||
EGL_INCLUDES += -DHAVE_DRM_PLATFORM
|
||||
endif
|
||||
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_wayland.c
|
||||
EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
|
||||
-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
|
||||
|
||||
include ../Makefile.template
|
@@ -1,63 +0,0 @@
|
||||
# Copyright © 2012 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.
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/egl/main \
|
||||
-I$(top_srcdir)/src/gbm/main \
|
||||
-I$(top_srcdir)/src/gbm/backends/dri \
|
||||
-I$(top_srcdir)/src/egl/wayland/wayland-egl \
|
||||
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
|
||||
-I$(top_builddir)/src/egl/wayland/wayland-drm \
|
||||
$(DEFINES) \
|
||||
$(LIBDRM_CFLAGS) \
|
||||
$(LIBUDEV_CFLAGS) \
|
||||
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
|
||||
|
||||
noinst_LTLIBRARIES = libegl_dri2.la
|
||||
|
||||
libegl_dri2_la_SOURCES = \
|
||||
egl_dri2.c \
|
||||
common.c
|
||||
|
||||
libegl_dri2_la_LIBADD = \
|
||||
$(EGL_LIB_DEPS)
|
||||
|
||||
if HAVE_SHARED_GLAPI
|
||||
AM_CFLAGS += -DHAVE_SHARED_GLAPI
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_X11
|
||||
libegl_dri2_la_SOURCES += platform_x11.c
|
||||
AM_CFLAGS += -DHAVE_X11_PLATFORM
|
||||
AM_CFLAGS += $(XCB_DRI2_CFLAGS)
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_WAYLAND
|
||||
libegl_dri2_la_SOURCES += platform_wayland.c
|
||||
AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM
|
||||
AM_CFLAGS += $(WAYLAND_CFLAGS)
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_DRM
|
||||
libegl_dri2_la_SOURCES += platform_drm.c
|
||||
AM_CFLAGS += -DHAVE_DRM_PLATFORM
|
||||
endif
|
@@ -1408,7 +1408,7 @@ dri2_load(_EGLDriver *drv)
|
||||
* Create a new _EGLDriver object and init its dispatch table.
|
||||
*/
|
||||
_EGLDriver *
|
||||
_eglBuiltInDriverDRI2(const char *args)
|
||||
_EGL_MAIN(const char *args)
|
||||
{
|
||||
struct dri2_egl_driver *dri2_drv;
|
||||
|
||||
|
@@ -177,17 +177,6 @@ struct dri2_egl_surface
|
||||
int format;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
struct gbm_dri_surface *gbm_surf;
|
||||
struct {
|
||||
struct gbm_bo *bo;
|
||||
int locked;
|
||||
} color_buffers[3], *back, *current;
|
||||
#ifndef HAVE_WAYLAND_PLATFORM
|
||||
__DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
struct ANativeWindow *window;
|
||||
struct ANativeWindowBuffer *buffer;
|
||||
|
@@ -311,8 +311,6 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp,
|
||||
format = __DRI_IMAGE_FORMAT_ABGR8888;
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_RGBX_8888:
|
||||
format = __DRI_IMAGE_FORMAT_XBGR8888;
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_RGB_888:
|
||||
case HAL_PIXEL_FORMAT_RGBA_5551:
|
||||
case HAL_PIXEL_FORMAT_RGBA_4444:
|
||||
|
@@ -37,306 +37,6 @@
|
||||
|
||||
#include "egl_dri2.h"
|
||||
|
||||
static struct gbm_bo *
|
||||
lock_front_buffer(struct gbm_surface *_surf)
|
||||
{
|
||||
struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf;
|
||||
struct dri2_egl_surface *dri2_surf = surf->dri_private;
|
||||
struct gbm_bo *bo;
|
||||
|
||||
if (dri2_surf->current == NULL) {
|
||||
_eglError(EGL_BAD_SURFACE, "no front buffer");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bo = dri2_surf->current->bo;
|
||||
dri2_surf->current->locked = 1;
|
||||
dri2_surf->current = NULL;
|
||||
|
||||
return bo;
|
||||
}
|
||||
|
||||
static void
|
||||
release_buffer(struct gbm_surface *_surf, struct gbm_bo *bo)
|
||||
{
|
||||
struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf;
|
||||
struct dri2_egl_surface *dri2_surf = surf->dri_private;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
|
||||
if (dri2_surf->color_buffers[i].bo == bo) {
|
||||
dri2_surf->color_buffers[i].locked = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
has_free_buffers(struct gbm_surface *_surf)
|
||||
{
|
||||
struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf;
|
||||
struct dri2_egl_surface *dri2_surf = surf->dri_private;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++)
|
||||
if (!dri2_surf->color_buffers[i].locked)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
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 gbm_dri_surface *surf;
|
||||
|
||||
(void) drv;
|
||||
|
||||
dri2_surf = malloc(sizeof *dri2_surf);
|
||||
if (!dri2_surf) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_create_surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(dri2_surf, 0, sizeof *dri2_surf);
|
||||
if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
|
||||
goto cleanup_surf;
|
||||
|
||||
switch (type) {
|
||||
case EGL_WINDOW_BIT:
|
||||
surf = gbm_dri_surface((struct gbm_surface *) window);
|
||||
dri2_surf->gbm_surf = surf;
|
||||
dri2_surf->base.Width = surf->base.width;
|
||||
dri2_surf->base.Height = surf->base.height;
|
||||
surf->dri_private = dri2_surf;
|
||||
break;
|
||||
default:
|
||||
goto cleanup_surf;
|
||||
}
|
||||
|
||||
dri2_surf->dri_drawable =
|
||||
(*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
|
||||
dri2_conf->dri_double_config,
|
||||
dri2_surf->gbm_surf);
|
||||
|
||||
if (dri2_surf->dri_drawable == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
|
||||
goto cleanup_surf;
|
||||
}
|
||||
|
||||
return &dri2_surf->base;
|
||||
|
||||
cleanup_surf:
|
||||
free(dri2_surf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
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 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;
|
||||
|
||||
if (!_eglPutSurface(surf))
|
||||
return EGL_TRUE;
|
||||
|
||||
(*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
|
||||
if (dri2_surf->color_buffers[i].bo)
|
||||
gbm_bo_destroy(dri2_surf->color_buffers[i].bo);
|
||||
}
|
||||
|
||||
for (i = 0; i < __DRI_BUFFER_COUNT; i++) {
|
||||
if (dri2_surf->dri_buffers[i])
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->dri_buffers[i]);
|
||||
}
|
||||
|
||||
free(surf);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
get_back_bo(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
struct gbm_dri_bo *bo;
|
||||
struct gbm_dri_surface *surf = dri2_surf->gbm_surf;
|
||||
int i, name, pitch;
|
||||
|
||||
if (dri2_surf->back == NULL) {
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
|
||||
if (!dri2_surf->color_buffers[i].locked) {
|
||||
dri2_surf->back = &dri2_surf->color_buffers[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dri2_surf->back == NULL)
|
||||
return -1;
|
||||
if (dri2_surf->back->bo == NULL)
|
||||
dri2_surf->back->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base.base,
|
||||
surf->base.width, surf->base.height,
|
||||
surf->base.format, surf->base.flags);
|
||||
if (dri2_surf->back->bo == NULL)
|
||||
return -1;
|
||||
|
||||
bo = (struct gbm_dri_bo *) dri2_surf->back->bo;
|
||||
|
||||
dri2_dpy->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_NAME, &name);
|
||||
dri2_dpy->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch);
|
||||
|
||||
buffer->attachment = __DRI_BUFFER_BACK_LEFT;
|
||||
buffer->name = name;
|
||||
buffer->pitch = pitch;
|
||||
buffer->cpp = 4;
|
||||
buffer->flags = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
get_aux_bo(struct dri2_egl_surface *dri2_surf,
|
||||
unsigned int attachment, unsigned int format, __DRIbuffer *buffer)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
__DRIbuffer *b = dri2_surf->dri_buffers[attachment];
|
||||
|
||||
if (b == NULL) {
|
||||
b = dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
|
||||
attachment, format,
|
||||
dri2_surf->base.Width,
|
||||
dri2_surf->base.Height);
|
||||
dri2_surf->dri_buffers[attachment] = b;
|
||||
}
|
||||
if (b == NULL)
|
||||
return -1;
|
||||
|
||||
memcpy(buffer, b, sizeof *buffer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
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;
|
||||
int i, j;
|
||||
|
||||
dri2_surf->buffer_count = 0;
|
||||
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
|
||||
assert(attachments[i] < __DRI_BUFFER_COUNT);
|
||||
assert(dri2_surf->buffer_count < 5);
|
||||
|
||||
switch (attachments[i]) {
|
||||
case __DRI_BUFFER_BACK_LEFT:
|
||||
if (get_back_bo(dri2_surf, &dri2_surf->buffers[j]) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "failed to allocate color buffer");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1],
|
||||
&dri2_surf->buffers[j]) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "failed to allocate aux buffer");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*out_count = j;
|
||||
if (j == 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;
|
||||
(void) loaderPrivate;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
|
||||
if (dri2_surf->current)
|
||||
_eglError(EGL_BAD_SURFACE, "dri2_swap_buffers");
|
||||
dri2_surf->current = dri2_surf->back;
|
||||
dri2_surf->back = NULL;
|
||||
}
|
||||
|
||||
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
|
||||
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static _EGLImage *
|
||||
dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
@@ -441,29 +141,17 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
dri2_dpy->core = dri2_dpy->gbm_dri->core;
|
||||
dri2_dpy->dri2 = dri2_dpy->gbm_dri->dri2;
|
||||
dri2_dpy->image = dri2_dpy->gbm_dri->image;
|
||||
dri2_dpy->flush = dri2_dpy->gbm_dri->flush;
|
||||
dri2_dpy->driver_configs = dri2_dpy->gbm_dri->driver_configs;
|
||||
|
||||
dri2_dpy->gbm_dri->lookup_image = dri2_lookup_egl_image;
|
||||
dri2_dpy->gbm_dri->lookup_user_data = disp;
|
||||
|
||||
dri2_dpy->gbm_dri->get_buffers = dri2_get_buffers;
|
||||
dri2_dpy->gbm_dri->flush_front_buffer = dri2_flush_front_buffer;
|
||||
dri2_dpy->gbm_dri->get_buffers_with_format = dri2_get_buffers_with_format;
|
||||
|
||||
dri2_dpy->gbm_dri->base.base.surface_lock_front_buffer = lock_front_buffer;
|
||||
dri2_dpy->gbm_dri->base.base.surface_release_buffer = release_buffer;
|
||||
dri2_dpy->gbm_dri->base.base.surface_has_free_buffers = has_free_buffers;
|
||||
|
||||
dri2_setup_screen(disp);
|
||||
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++)
|
||||
dri2_add_config(disp, dri2_dpy->driver_configs[i],
|
||||
i + 1, 0, EGL_WINDOW_BIT, NULL, NULL);
|
||||
i + 1, 0, 0, NULL, NULL);
|
||||
|
||||
drv->API.CreateWindowSurface = dri2_create_window_surface;
|
||||
drv->API.DestroySurface = dri2_destroy_surface;
|
||||
drv->API.SwapBuffers = dri2_swap_buffers;
|
||||
drv->API.CreateImageKHR = dri2_drm_create_image_khr;
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
|
@@ -598,6 +598,8 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
wayland_create_buffer(dri2_surf,
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]);
|
||||
|
||||
wl_buffer_damage(dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT], 0, 0,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
wl_surface_attach(dri2_surf->wl_win->surface,
|
||||
dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],
|
||||
dri2_surf->dx, dri2_surf->dy);
|
||||
@@ -729,7 +731,7 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
free(dri2_dpy->device_name);
|
||||
wl_drm_destroy(dri2_dpy->wl_drm);
|
||||
if (dri2_dpy->own_device)
|
||||
wl_display_disconnect(dri2_dpy->wl_dpy);
|
||||
wl_display_destroy(dri2_dpy->wl_dpy);
|
||||
free(dri2_dpy);
|
||||
disp->DriverData = NULL;
|
||||
|
||||
@@ -746,16 +748,7 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
||||
if (!dri2_dpy->device_name)
|
||||
return;
|
||||
|
||||
#ifdef O_CLOEXEC
|
||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR | O_CLOEXEC);
|
||||
if (dri2_dpy->fd == -1 && errno == EINVAL)
|
||||
#endif
|
||||
{
|
||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
|
||||
if (dri2_dpy->fd != -1)
|
||||
fcntl(dri2_dpy->fd, F_SETFD, fcntl(dri2_dpy->fd, F_GETFD) |
|
||||
FD_CLOEXEC);
|
||||
}
|
||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
|
||||
if (dri2_dpy->fd == -1) {
|
||||
_eglLog(_EGL_WARNING, "wayland-egl: could not open %s (%s)",
|
||||
dri2_dpy->device_name, strerror(errno));
|
||||
|
@@ -1083,16 +1083,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
if (!dri2_load_driver(disp))
|
||||
goto cleanup_conn;
|
||||
|
||||
#ifdef O_CLOEXEC
|
||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR | O_CLOEXEC);
|
||||
if (dri2_dpy->fd == -1 && errno == EINVAL)
|
||||
#endif
|
||||
{
|
||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
|
||||
if (dri2_dpy->fd != -1)
|
||||
fcntl(dri2_dpy->fd, F_SETFD, fcntl(dri2_dpy->fd, F_GETFD) |
|
||||
FD_CLOEXEC);
|
||||
}
|
||||
if (dri2_dpy->fd == -1) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"DRI2: could not open %s (%s)", dri2_dpy->device_name,
|
||||
|
19
src/egl/drivers/glx/Makefile
Normal file
19
src/egl/drivers/glx/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
# src/egl/drivers/glx/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EGL_DRIVER = egl_glx
|
||||
EGL_SOURCES = egl_glx.c
|
||||
|
||||
EGL_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/egl/main
|
||||
|
||||
EGL_CFLAGS = $(X11_CFLAGS)
|
||||
EGL_LIBS = $(X11_LIBS) $(DLOPEN_LIBS)
|
||||
|
||||
EGL_CFLAGS += -D_EGL_MAIN=_eglBuiltInDriverGLX
|
||||
EGL_BUILTIN = true
|
||||
|
||||
include ../Makefile.template
|
@@ -1,33 +0,0 @@
|
||||
# Copyright © 2012 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.
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/egl/main \
|
||||
$(X11_CFLAGS) \
|
||||
$(DEFINES)
|
||||
|
||||
noinst_LTLIBRARIES = libegl_glx.la
|
||||
|
||||
libegl_glx_la_SOURCES = egl_glx.c
|
||||
|
||||
libegl_glx_la_LIBADD = \
|
||||
$(EGL_LIB_DEPS)
|
@@ -1147,7 +1147,7 @@ fail:
|
||||
* Create a new _EGLDriver object and init its dispatch table.
|
||||
*/
|
||||
_EGLDriver *
|
||||
_eglBuiltInDriverGLX(const char *args)
|
||||
_EGL_MAIN(const char *args)
|
||||
{
|
||||
struct GLX_egl_driver *GLX_drv = CALLOC_STRUCT(GLX_egl_driver);
|
||||
|
||||
|
1
src/egl/main/.gitignore
vendored
1
src/egl/main/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
Makefile
|
@@ -107,8 +107,8 @@ gallium_DRIVERS += \
|
||||
LOCAL_SHARED_LIBRARIES += libdrm_nouveau
|
||||
endif
|
||||
|
||||
# r300g/r600g/radeonsi
|
||||
ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||
# r300g/r600g
|
||||
ifneq ($(filter r300g r600g, $(MESA_GPU_DRIVERS)),)
|
||||
gallium_DRIVERS += libmesa_winsys_radeon
|
||||
ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
|
||||
gallium_DRIVERS += libmesa_pipe_r300
|
||||
@@ -116,9 +116,6 @@ endif
|
||||
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
|
||||
gallium_DRIVERS += libmesa_pipe_r600
|
||||
endif
|
||||
ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||
gallium_DRIVERS += libmesa_pipe_radeonsi
|
||||
endif
|
||||
endif
|
||||
|
||||
# vmwgfx
|
||||
|
183
src/egl/main/Makefile
Normal file
183
src/egl/main/Makefile
Normal file
@@ -0,0 +1,183 @@
|
||||
# src/egl/main/Makefile
|
||||
|
||||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
EGL_MAJOR = 1
|
||||
EGL_MINOR = 0
|
||||
|
||||
INCLUDE_DIRS = -I$(TOP)/include
|
||||
|
||||
HEADERS = \
|
||||
eglcompiler.h \
|
||||
eglconfig.h \
|
||||
eglcontext.h \
|
||||
eglcurrent.h \
|
||||
egldefines.h \
|
||||
egldisplay.h \
|
||||
egldriver.h \
|
||||
eglglobals.h \
|
||||
eglimage.h \
|
||||
egllog.h \
|
||||
eglmisc.h \
|
||||
eglmode.h \
|
||||
eglmutex.h \
|
||||
eglscreen.h \
|
||||
eglstring.h \
|
||||
eglsurface.h \
|
||||
eglsync.h
|
||||
|
||||
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
|
||||
|
||||
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 x11, $(EGL_PLATFORMS)),)
|
||||
EGL_LIB_DEPS += $(XCB_DRI2_LIBS)
|
||||
endif
|
||||
EGL_LIB_DEPS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
|
||||
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
|
||||
|
||||
# libs/cflags for display type autodetection
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
LOCAL_LIBS += $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
|
||||
EGL_LIB_DEPS += $(WAYLAND_LIBS)
|
||||
INCLUDE_DIRS += $(WAYLAND_CFLAGS)
|
||||
endif
|
||||
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||
EGL_LIB_DEPS += -lgbm
|
||||
INCLUDE_DIRS += -I$(TOP)/src/gbm/main
|
||||
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
|
||||
ifeq ($(firstword $(EGL_PLATFORMS)),fbdev)
|
||||
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_FBDEV
|
||||
endif
|
||||
ifeq ($(firstword $(EGL_PLATFORMS)),null)
|
||||
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_NULL
|
||||
endif
|
||||
|
||||
ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_X11_PLATFORM
|
||||
endif
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_WAYLAND_PLATFORM
|
||||
endif
|
||||
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_DRM_PLATFORM
|
||||
endif
|
||||
ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_FBDEV_PLATFORM
|
||||
endif
|
||||
ifneq ($(findstring null, $(EGL_PLATFORMS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_NULL_PLATFORM
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += \
|
||||
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
|
||||
-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\"
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
|
||||
default: depend library
|
||||
|
||||
|
||||
# EGL Library
|
||||
library: $(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME)
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
|
||||
$(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)
|
||||
|
||||
install-headers:
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/KHR
|
||||
$(INSTALL) -m 644 $(TOP)/include/KHR/*.h \
|
||||
$(DESTDIR)$(INSTALL_INC_DIR)/KHR
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/EGL
|
||||
$(INSTALL) -m 644 $(TOP)/include/EGL/*.h \
|
||||
$(DESTDIR)$(INSTALL_INC_DIR)/EGL
|
||||
|
||||
PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
|
||||
|
||||
gl_pcedit = sed \
|
||||
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
||||
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
|
||||
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
|
||||
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
|
||||
-e 's,@EGL_PC_REQ_PRIV@,$(EGL_PC_REQ_PRIV),' \
|
||||
-e 's,@EGL_PC_LIB_PRIV@,$(EGL_PC_LIB_PRIV),' \
|
||||
-e 's,@EGL_PC_CFLAGS@,$(EGL_PC_CFLAGS),' \
|
||||
-e 's,@EGL_LIB@,$(EGL_LIB),'
|
||||
|
||||
egl.pc: egl.pc.in
|
||||
$(gl_pcedit) $< > $@
|
||||
|
||||
install: default install-headers egl.pc
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(EGL_LIB_GLOB) \
|
||||
$(DESTDIR)$(INSTALL_LIB_DIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
|
||||
$(INSTALL) -m 644 egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
|
||||
|
||||
clean:
|
||||
-rm -f *.o
|
||||
-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,138 +0,0 @@
|
||||
# Copyright © 2012 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.
|
||||
|
||||
GLAPI_LIB = ../mapi/glapi/libglapi.a
|
||||
|
||||
if HAVE_XF86VIDMODE
|
||||
EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
|
||||
endif
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/gbm/main \
|
||||
$(DEFINES) \
|
||||
$(EGL_CFLAGS) \
|
||||
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
|
||||
-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
|
||||
-D_EGL_OS_UNIX=1
|
||||
|
||||
lib_LTLIBRARIES = libEGL.la
|
||||
|
||||
libEGL_la_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 \
|
||||
eglcompiler.h \
|
||||
eglconfig.h \
|
||||
eglcontext.h \
|
||||
eglcurrent.h \
|
||||
egldefines.h \
|
||||
egldisplay.h \
|
||||
egldriver.h \
|
||||
eglglobals.h \
|
||||
eglimage.h \
|
||||
egllog.h \
|
||||
eglmisc.h \
|
||||
eglmode.h \
|
||||
eglmutex.h \
|
||||
eglscreen.h \
|
||||
eglstring.h \
|
||||
eglsurface.h \
|
||||
eglsync.h
|
||||
|
||||
libEGL_la_LIBADD = \
|
||||
$(EGL_LIB_DEPS)
|
||||
libEGL_la_LDFLAGS = -version-number 1:0 -no-undefined
|
||||
|
||||
if HAVE_EGL_PLATFORM_X11
|
||||
AM_CFLAGS += -DHAVE_X11_PLATFORM
|
||||
AM_CFLAGS += $(XCB_DRI2_CFLAGS)
|
||||
libEGL_la_LIBADD += $(XCB_DRI2_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_WAYLAND
|
||||
AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM
|
||||
AM_CFLAGS += $(WAYLAND_CFLAGS)
|
||||
libEGL_la_LIBADD += $(WAYLAND_LIBS)
|
||||
libEGL_la_LIBADD += $(LIBDRM_LIBS)
|
||||
libEGL_la_LIBADD += ../wayland/wayland-drm/libwayland-drm.la
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_DRM
|
||||
AM_CFLAGS += -DHAVE_DRM_PLATFORM
|
||||
libEGL_la_LIBADD += ../../gbm/libgbm.la
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_FBDEV
|
||||
AM_CFLAGS += -DHAVE_FBDEV_PLATFORM
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_NULL
|
||||
AM_CFLAGS += -DHAVE_NULL_PLATFORM
|
||||
endif
|
||||
|
||||
if HAVE_EGL_DRIVER_GLX
|
||||
AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
|
||||
libEGL_la_LIBADD += ../drivers/glx/libegl_glx.la
|
||||
libEGL_la_LIBADD += $(X11_LIBS) $(DLOPEN_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_EGL_DRIVER_DRI2
|
||||
AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
|
||||
AM_CFLAGS += -DHAVE_XCB_DRI2
|
||||
libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la
|
||||
libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS)
|
||||
endif
|
||||
|
||||
# Provide compatibility with scripts for the old Mesa build system for
|
||||
# a while by putting a link to the driver into /lib of the build tree.
|
||||
all-local: libEGL.la
|
||||
$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
|
||||
ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1
|
||||
ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
pkgconfig_DATA = egl.pc
|
||||
|
||||
khrdir = $(includedir)/KHR
|
||||
khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
|
||||
|
||||
egldir = $(includedir)/EGL
|
||||
egl_HEADERS = \
|
||||
$(top_srcdir)/include/EGL/eglext.h \
|
||||
$(top_srcdir)/include/EGL/egl.h \
|
||||
$(top_srcdir)/include/EGL/eglmesaext.h \
|
||||
$(top_srcdir)/include/EGL/eglplatform.h
|
@@ -1,12 +1,12 @@
|
||||
prefix=@prefix@
|
||||
prefix=@INSTALL_DIR@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
libdir=@INSTALL_LIB_DIR@
|
||||
includedir=@INSTALL_INC_DIR@
|
||||
|
||||
Name: egl
|
||||
Description: Mesa EGL library
|
||||
Requires.private: @GL_PC_REQ_PRIV@
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lEGL
|
||||
Libs.private: @GL_PC_LIB_PRIV@
|
||||
Cflags: -I${includedir} @GL_PC_CFLAGS@
|
||||
Requires.private: @EGL_PC_REQ_PRIV@
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -l@EGL_LIB@
|
||||
Libs.private: @EGL_PC_LIB_PRIV@
|
||||
Cflags: -I${includedir} @EGL_PC_CFLAGS@
|
||||
|
@@ -45,7 +45,7 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
|
||||
|
||||
(void) dpy;
|
||||
|
||||
memset(attrs, 0, sizeof(*attrs));
|
||||
memset(attrs, 0, sizeof(attrs));
|
||||
attrs->ImagePreserved = EGL_FALSE;
|
||||
attrs->GLTextureLevel = 0;
|
||||
attrs->GLTextureZOffset = 0;
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "egllog.h"
|
||||
#include "eglstring.h"
|
||||
|
@@ -38,7 +38,6 @@
|
||||
#define _eglstrcasecmp _stricmp
|
||||
#define _eglsnprintf _snprintf
|
||||
#else
|
||||
#include <strings.h> // for strcasecmp
|
||||
#define _eglstrcasecmp strcasecmp
|
||||
#define _eglsnprintf snprintf
|
||||
#endif
|
||||
|
30
src/egl/wayland/Makefile
Normal file
30
src/egl/wayland/Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
# 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
|
@@ -1 +0,0 @@
|
||||
SUBDIRS = wayland-drm wayland-egl
|
@@ -1,4 +1,3 @@
|
||||
Makefile
|
||||
wayland-drm-client-protocol.h
|
||||
wayland-drm-server-protocol.h
|
||||
wayland-drm-protocol.c
|
47
src/egl/wayland/wayland-drm/Makefile
Normal file
47
src/egl/wayland/wayland-drm/Makefile
Normal file
@@ -0,0 +1,47 @@
|
||||
# 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)
|
||||
rm -f depend depend.bak
|
||||
|
||||
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,15 +0,0 @@
|
||||
AM_CFLAGS = -I$(top_srcdir)/src/egl/main \
|
||||
-I$(top_srcdir)/include \
|
||||
$(DEFINES) \
|
||||
$(WAYLAND_CFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = libwayland-drm.la
|
||||
libwayland_drm_la_SOURCES = wayland-drm.c wayland-drm-protocol.c
|
||||
noinst_HEADERS = wayland-drm.h
|
||||
|
||||
BUILT_SOURCES = wayland-drm-protocol.c \
|
||||
wayland-drm-client-protocol.h \
|
||||
wayland-drm-server-protocol.h
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
@wayland_scanner_rules@
|
@@ -36,17 +36,6 @@
|
||||
#include "wayland-drm.h"
|
||||
#include "wayland-drm-server-protocol.h"
|
||||
|
||||
/* Git master of Wayland is moving towards a stable version of the
|
||||
* protocol, but breaking from 0.85 in the process. For the time
|
||||
* being, it's convenient to be able to build Mesa against both master
|
||||
* and 0.85.x of Wayland. To make this work we'll do a compile-time
|
||||
* version check and work around the difference in API and protocol */
|
||||
#if defined (WAYLAND_VERSION_MAJOR) && \
|
||||
WAYLAND_VERSION_MAJOR == 0 && \
|
||||
WAYLAND_VERSION_MINOR == 85
|
||||
#define HAS_WAYLAND_0_85
|
||||
#endif
|
||||
|
||||
struct wl_drm {
|
||||
struct wl_display *display;
|
||||
|
||||
@@ -64,6 +53,12 @@ struct wl_drm_buffer {
|
||||
void *driver_buffer;
|
||||
};
|
||||
|
||||
static void
|
||||
buffer_damage(struct wl_client *client, struct wl_resource *buffer,
|
||||
int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_buffer(struct wl_resource *resource)
|
||||
{
|
||||
@@ -78,25 +73,11 @@ destroy_buffer(struct wl_resource *resource)
|
||||
static void
|
||||
buffer_destroy(struct wl_client *client, struct wl_resource *resource)
|
||||
{
|
||||
#ifdef HAS_WAYLAND_0_85
|
||||
wl_resource_destroy(resource, 0);
|
||||
#else
|
||||
wl_resource_destroy(resource);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAS_WAYLAND_0_85
|
||||
static void
|
||||
buffer_damage(struct wl_client *client, struct wl_resource *buffer,
|
||||
int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
const static struct wl_buffer_interface drm_buffer_interface = {
|
||||
#ifdef HAS_WAYLAND_0_85
|
||||
buffer_damage,
|
||||
#endif
|
||||
buffer_destroy
|
||||
};
|
||||
|
||||
|
71
src/egl/wayland/wayland-egl/Makefile
Normal file
71
src/egl/wayland/wayland-egl/Makefile
Normal file
@@ -0,0 +1,71 @@
|
||||
# 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,10 +0,0 @@
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = wayland-egl.pc
|
||||
|
||||
AM_CFLAGS = $(DEFINES) \
|
||||
$(WAYLAND_CFLAGS)
|
||||
|
||||
lib_LTLIBRARIES = libwayland-egl.la
|
||||
noinst_HEADERS = wayland-egl-priv.h
|
||||
libwayland_egl_la_SOURCES = wayland-egl.c
|
||||
libwayland_egl_la_LDFLAGS = -version-info 1
|
@@ -1,10 +1,12 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
prefix=@INSTALL_DIR@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@INSTALL_LIB_DIR@
|
||||
includedir=@INSTALL_INC_DIR@
|
||||
|
||||
Name: wayland-egl
|
||||
Description: Mesa wayland-egl library
|
||||
Requires.private: @WAYLAND_EGL_PC_REQ_PRIV@
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lwayland-egl
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -l@WAYLAND_EGL_LIB@
|
||||
Libs.private: @WAYLAND_EGL_PC_LIB_PRIV@
|
||||
Cflags: -I${includedir} @WAYLAND_EGL_PC_CFLAGS@
|
||||
|
@@ -49,8 +49,8 @@ SUBDIRS += \
|
||||
drivers/nvc0
|
||||
endif
|
||||
|
||||
# r300g/r600g/radeonsi
|
||||
ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||
# r300g/r600g
|
||||
ifneq ($(filter r300g r600g, $(MESA_GPU_DRIVERS)),)
|
||||
SUBDIRS += winsys/radeon/drm
|
||||
ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
|
||||
SUBDIRS += drivers/r300
|
||||
@@ -58,9 +58,6 @@ endif
|
||||
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
|
||||
SUBDIRS += drivers/r600
|
||||
endif
|
||||
ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||
SUBDIRS += drivers/radeonsi
|
||||
endif
|
||||
endif
|
||||
|
||||
# vmwgfx
|
||||
|
@@ -10,7 +10,6 @@ SConscript('auxiliary/SConscript')
|
||||
# Drivers
|
||||
#
|
||||
|
||||
# These are common and work across all platforms
|
||||
SConscript([
|
||||
'drivers/galahad/SConscript',
|
||||
'drivers/identity/SConscript',
|
||||
@@ -25,19 +24,15 @@ if not env['msvc']:
|
||||
# These drivers do not build on MSVC compilers
|
||||
SConscript([
|
||||
'drivers/i915/SConscript',
|
||||
'drivers/r300/SConscript',
|
||||
])
|
||||
|
||||
if env['drm']:
|
||||
# These drivers depend on drm headers
|
||||
if env['drm_radeon']:
|
||||
SConscript([
|
||||
'drivers/r300/SConscript',
|
||||
'drivers/r600/SConscript',
|
||||
])
|
||||
if env['llvm']:
|
||||
SConscript([
|
||||
'drivers/radeonsi/SConscript',
|
||||
])
|
||||
# XXX: nouveau drivers have a tight dependency on libdrm, so to enable
|
||||
# we need some version logic before we enable them. Also, ATM there is
|
||||
# no nouveau target in scons
|
||||
@@ -58,7 +53,7 @@ SConscript('winsys/sw/null/SConscript')
|
||||
|
||||
if not env['embedded']:
|
||||
SConscript('state_trackers/vega/SConscript')
|
||||
if env['platform'] not in ['darwin', 'haiku', 'sunos']:
|
||||
if env['platform'] not in ['darwin']:
|
||||
SConscript('state_trackers/egl/SConscript')
|
||||
|
||||
if env['x11']:
|
||||
@@ -77,43 +72,7 @@ if not env['embedded']:
|
||||
# Winsys
|
||||
#
|
||||
|
||||
SConscript([
|
||||
'winsys/sw/wrapper/SConscript',
|
||||
])
|
||||
|
||||
if env['x11']:
|
||||
SConscript([
|
||||
'winsys/sw/xlib/SConscript',
|
||||
])
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
SConscript([
|
||||
'winsys/sw/gdi/SConscript',
|
||||
])
|
||||
|
||||
if not env['msvc']:
|
||||
SConscript([
|
||||
'winsys/i915/sw/SConscript',
|
||||
])
|
||||
|
||||
if env['dri']:
|
||||
SConscript([
|
||||
'winsys/sw/dri/SConscript',
|
||||
])
|
||||
|
||||
SConscript([
|
||||
'winsys/svga/drm/SConscript',
|
||||
])
|
||||
|
||||
if env['drm_intel']:
|
||||
SConscript([
|
||||
'winsys/i915/drm/SConscript',
|
||||
])
|
||||
|
||||
if env['drm_radeon']:
|
||||
SConscript([
|
||||
'winsys/radeon/drm/SConscript',
|
||||
])
|
||||
SConscript('winsys/SConscript')
|
||||
|
||||
#
|
||||
# Targets
|
||||
@@ -124,7 +83,7 @@ SConscript([
|
||||
])
|
||||
|
||||
if not env['embedded']:
|
||||
if env['platform'] not in ['darwin', 'haiku', 'sunos']:
|
||||
if env['platform'] not in ['darwin']:
|
||||
SConscript([
|
||||
'targets/egl-static/SConscript'
|
||||
])
|
||||
@@ -157,10 +116,6 @@ if not env['embedded']:
|
||||
'targets/dri-r300/SConscript',
|
||||
'targets/dri-r600/SConscript',
|
||||
])
|
||||
if env['llvm']:
|
||||
SConscript([
|
||||
'targets/dri-radeonsi/SConscript',
|
||||
])
|
||||
|
||||
if env['xorg'] and env['drm']:
|
||||
SConscript([
|
||||
|
@@ -18,14 +18,6 @@ endif
|
||||
|
||||
include ../Makefile.template
|
||||
|
||||
default install clean: %: subdirs-%
|
||||
|
||||
subdirs-%:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) $*) || exit 1; \
|
||||
fi \
|
||||
done
|
||||
|
||||
indices/u_indices_gen.c: indices/u_indices_gen.py
|
||||
$(PYTHON2) $< > $@
|
||||
|
@@ -1,5 +1,3 @@
|
||||
SUBDIRS := pipe-loader
|
||||
|
||||
C_SOURCES := \
|
||||
cso_cache/cso_cache.c \
|
||||
cso_cache/cso_context.c \
|
||||
@@ -140,8 +138,6 @@ C_SOURCES := \
|
||||
util/u_vbuf.c \
|
||||
vl/vl_csc.c \
|
||||
vl/vl_compositor.c \
|
||||
vl/vl_matrix_filter.c \
|
||||
vl/vl_median_filter.c \
|
||||
vl/vl_decoder.c \
|
||||
vl/vl_mpeg12_decoder.c \
|
||||
vl/vl_mpeg12_bitstream.c \
|
||||
@@ -180,8 +176,6 @@ GALLIVM_SOURCES := \
|
||||
gallivm/lp_bld_sample_soa.c \
|
||||
gallivm/lp_bld_struct.c \
|
||||
gallivm/lp_bld_swizzle.c \
|
||||
gallivm/lp_bld_tgsi.c \
|
||||
gallivm/lp_bld_tgsi_action.c \
|
||||
gallivm/lp_bld_tgsi_aos.c \
|
||||
gallivm/lp_bld_tgsi_info.c \
|
||||
gallivm/lp_bld_tgsi_soa.c \
|
||||
|
@@ -119,6 +119,22 @@ static void delete_rasterizer_state(void *state, void *data)
|
||||
FREE(state);
|
||||
}
|
||||
|
||||
static void delete_fs_state(void *state, void *data)
|
||||
{
|
||||
struct cso_fragment_shader *cso = (struct cso_fragment_shader *)state;
|
||||
if (cso->delete_state)
|
||||
cso->delete_state(cso->context, cso->data);
|
||||
FREE(state);
|
||||
}
|
||||
|
||||
static void delete_vs_state(void *state, void *data)
|
||||
{
|
||||
struct cso_vertex_shader *cso = (struct cso_vertex_shader *)state;
|
||||
if (cso->delete_state)
|
||||
cso->delete_state(cso->context, cso->data);
|
||||
FREE(state);
|
||||
}
|
||||
|
||||
static void delete_velements(void *state, void *data)
|
||||
{
|
||||
struct cso_velements *cso = (struct cso_velements *)state;
|
||||
@@ -142,6 +158,12 @@ static INLINE void delete_cso(void *state, enum cso_cache_type type)
|
||||
case CSO_RASTERIZER:
|
||||
delete_rasterizer_state(state, 0);
|
||||
break;
|
||||
case CSO_FRAGMENT_SHADER:
|
||||
delete_fs_state(state, 0);
|
||||
break;
|
||||
case CSO_VERTEX_SHADER:
|
||||
delete_vs_state(state, 0);
|
||||
break;
|
||||
case CSO_VELEMENTS:
|
||||
delete_velements(state, 0);
|
||||
break;
|
||||
@@ -287,6 +309,8 @@ void cso_cache_delete(struct cso_cache *sc)
|
||||
/* delete driver data */
|
||||
cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0);
|
||||
cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0);
|
||||
cso_for_each_state(sc, CSO_FRAGMENT_SHADER, delete_fs_state, 0);
|
||||
cso_for_each_state(sc, CSO_VERTEX_SHADER, delete_vs_state, 0);
|
||||
cso_for_each_state(sc, CSO_RASTERIZER, delete_rasterizer_state, 0);
|
||||
cso_for_each_state(sc, CSO_SAMPLER, delete_sampler_state, 0);
|
||||
cso_for_each_state(sc, CSO_VELEMENTS, delete_velements, 0);
|
||||
|
@@ -89,6 +89,8 @@ enum cso_cache_type {
|
||||
CSO_RASTERIZER,
|
||||
CSO_BLEND,
|
||||
CSO_DEPTH_STENCIL_ALPHA,
|
||||
CSO_FRAGMENT_SHADER,
|
||||
CSO_VERTEX_SHADER,
|
||||
CSO_SAMPLER,
|
||||
CSO_VELEMENTS,
|
||||
CSO_CACHE_MAX,
|
||||
@@ -124,6 +126,20 @@ struct cso_rasterizer {
|
||||
struct pipe_context *context;
|
||||
};
|
||||
|
||||
struct cso_fragment_shader {
|
||||
struct pipe_shader_state state;
|
||||
void *data;
|
||||
cso_state_callback delete_state;
|
||||
struct pipe_context *context;
|
||||
};
|
||||
|
||||
struct cso_vertex_shader {
|
||||
struct pipe_shader_state state;
|
||||
void *data;
|
||||
cso_state_callback delete_state;
|
||||
struct pipe_context *context;
|
||||
};
|
||||
|
||||
struct cso_sampler {
|
||||
struct pipe_sampler_state state;
|
||||
void *data;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user