Compare commits
182 Commits
10.1
...
mesa-9.2.1
Author | SHA1 | Date | |
---|---|---|---|
|
2c3aa1b4ee | ||
|
5377bc3e40 | ||
|
486aecac7e | ||
|
8fc8f38d94 | ||
|
dfcc8caf25 | ||
|
c8ae770068 | ||
|
88513d6485 | ||
|
2eb55601bb | ||
|
26ffbf6f39 | ||
|
421141192f | ||
|
be029eb993 | ||
|
f7fba18e2e | ||
|
42b6d94537 | ||
|
563c488453 | ||
|
4babf9ba6b | ||
|
8a9099d4ef | ||
|
beebb2d9d5 | ||
|
e021b50227 | ||
|
3801e9a87e | ||
|
faec15dc7a | ||
|
5461cc1f00 | ||
|
4fbbf49cc5 | ||
|
130fda3d3b | ||
|
3a2926fdbf | ||
|
616da8f818 | ||
|
72295c5f67 | ||
|
a6a2039a44 | ||
|
f53b9849a1 | ||
|
50ffa8bac5 | ||
|
0547f28134 | ||
|
47da22626d | ||
|
c3de1eea7f | ||
|
ab9322534c | ||
|
2cda3f0e90 | ||
|
3b852f9d52 | ||
|
fd31f5ee1d | ||
|
c0253baaa0 | ||
|
9dd4e1ef85 | ||
|
fbbe25ef26 | ||
|
e5f788e1e0 | ||
|
26ae6ec1e8 | ||
|
9586f4de71 | ||
|
fa892ecc04 | ||
|
2377205bcb | ||
|
8218eebc80 | ||
|
46273ba256 | ||
|
d3f99fb532 | ||
|
6fb2032c35 | ||
|
c0abf6499f | ||
|
1a9bda1f34 | ||
|
59781051eb | ||
|
f31a1d9f8d | ||
|
3370dfdf3e | ||
|
2153557906 | ||
|
dda7358377 | ||
|
3fd1ca7949 | ||
|
4aa9f013d5 | ||
|
7aefdab219 | ||
|
fe6526f439 | ||
|
08b192d26a | ||
|
c1c076dd8d | ||
|
368fc4f3ec | ||
|
e14baf425b | ||
|
dce3865306 | ||
|
8efdaedfc2 | ||
|
c47804d286 | ||
|
5114ac3f87 | ||
|
f0bc10679e | ||
|
3f438bfa4c | ||
|
60e1b03455 | ||
|
cf537c405b | ||
|
601926515e | ||
|
c9a7d6950b | ||
|
89aff30f9b | ||
|
3eae076d70 | ||
|
3ec07eaaa5 | ||
|
35c9345711 | ||
|
74fcc65b58 | ||
|
b802f6a124 | ||
|
170b952cfe | ||
|
b97305bc21 | ||
|
ecd1d92baf | ||
|
c8b5222074 | ||
|
bd83ff1923 | ||
|
a8b08c5ccd | ||
|
796b4a7b40 | ||
|
d3004acdd1 | ||
|
684316512c | ||
|
9f7f727345 | ||
|
1fb22bf143 | ||
|
9fa7313e34 | ||
|
6296abed15 | ||
|
5b8c943eb2 | ||
|
d72f7720a6 | ||
|
b40d9e4f41 | ||
|
e2185778e2 | ||
|
a98d5f2663 | ||
|
24d1949ddc | ||
|
996bc26c87 | ||
|
b055c8689e | ||
|
d6d0175203 | ||
|
4ba5fd1052 | ||
|
872c09586c | ||
|
4f44202aae | ||
|
33b581f6f6 | ||
|
c088c24588 | ||
|
7d6dcb61cd | ||
|
8025bac852 | ||
|
5d6dc93490 | ||
|
31f582abd4 | ||
|
0b131ae24f | ||
|
8ee4a4e417 | ||
|
0c405cd0e8 | ||
|
b76ff3dbcd | ||
|
cb8e109492 | ||
|
4006fc4656 | ||
|
731a08341e | ||
|
3da0c76ec0 | ||
|
10ff10c89e | ||
|
12da1bcb3b | ||
|
195e995968 | ||
|
6f9b090719 | ||
|
70c9e07bd4 | ||
|
d383ff0843 | ||
|
d1419857d7 | ||
|
c15b2d86e2 | ||
|
1e0ad955e7 | ||
|
9aeb967e75 | ||
|
001c29cb18 | ||
|
c331562158 | ||
|
8e1d37161f | ||
|
78e760c234 | ||
|
71891ce017 | ||
|
a19bc84380 | ||
|
73bde3b8ff | ||
|
4a37827752 | ||
|
adc87c5e3f | ||
|
4d7ebeb51e | ||
|
6d8f471640 | ||
|
687415cf70 | ||
|
e4f81bdbc4 | ||
|
6c25c0a0da | ||
|
526e71bfcc | ||
|
06aee8a56c | ||
|
b319e3975e | ||
|
d4c2c5a739 | ||
|
a3f48d97cd | ||
|
030ada7a50 | ||
|
b61036fa2d | ||
|
ddf6f591a9 | ||
|
e3dbfc5769 | ||
|
cdcba2878a | ||
|
8efee44c38 | ||
|
3bdd95270d | ||
|
5476049e38 | ||
|
a2dbaeb2d8 | ||
|
ded1695494 | ||
|
3213c60d81 | ||
|
678ac190a5 | ||
|
771b576da6 | ||
|
9c66a29358 | ||
|
5154c93fa8 | ||
|
8a27c824ec | ||
|
4953bf3837 | ||
|
c7bfe87721 | ||
|
c6f6b4e161 | ||
|
4f5e18cb3e | ||
|
e108bb07a0 | ||
|
55241e9958 | ||
|
6237090330 | ||
|
55ab069e5f | ||
|
925e8a200b | ||
|
014b9ceb62 | ||
|
8f80e55002 | ||
|
579eae3012 | ||
|
cb06c9b2aa | ||
|
253a4c3e73 | ||
|
99666d81e4 | ||
|
e8bc520713 | ||
|
49f40ebefa | ||
|
9b8ad64362 | ||
|
ee421aec32 |
@@ -8,5 +8,4 @@
|
||||
(c-set-offset 'innamespace '0)
|
||||
(c-set-offset 'inline-open '0)))
|
||||
)
|
||||
(makefile-mode (indent-tabs-mode . t))
|
||||
)
|
||||
|
@@ -33,10 +33,9 @@ endif
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(MESA_TOP)/include
|
||||
|
||||
MESA_VERSION=$(shell cat $(MESA_TOP)/VERSION)
|
||||
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
|
||||
LOCAL_CFLAGS += \
|
||||
-DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
|
||||
-DPACKAGE_VERSION=\"9.2.1\" \
|
||||
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
|
||||
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
||||
|
||||
|
@@ -78,7 +78,6 @@ endif
|
||||
ifneq ($(strip $(MESA_GPU_DRIVERS)),)
|
||||
|
||||
SUBDIRS := \
|
||||
src/loader \
|
||||
src/mapi \
|
||||
src/glsl \
|
||||
src/mesa \
|
||||
|
@@ -26,6 +26,12 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
doxygen:
|
||||
cd doxygen && $(MAKE)
|
||||
|
||||
check-local:
|
||||
$(MAKE) -C src/mapi/glapi/tests check
|
||||
$(MAKE) -C src/mapi/shared-glapi/tests check
|
||||
$(MAKE) -C src/mesa/main/tests check
|
||||
$(MAKE) -C src/glx/tests check
|
||||
|
||||
.PHONY: doxygen
|
||||
|
||||
# Rules for making release tarballs
|
||||
@@ -45,7 +51,6 @@ EXTRA_FILES = \
|
||||
bin/ltmain.sh \
|
||||
bin/missing \
|
||||
bin/ylwrap \
|
||||
bin/test-driver \
|
||||
src/glsl/glsl_parser.cpp \
|
||||
src/glsl/glsl_parser.h \
|
||||
src/glsl/glsl_lexer.cpp \
|
||||
@@ -64,7 +69,7 @@ IGNORE_FILES = \
|
||||
|
||||
parsers: configure
|
||||
$(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp glcpp/glcpp-lex.c glcpp/glcpp-parse.c glcpp/glcpp-parse.h
|
||||
$(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
|
||||
$(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
ARCHIVES = $(PACKAGE_NAME).tar.gz \
|
||||
|
@@ -69,10 +69,8 @@ if env['gles']:
|
||||
#######################################################################
|
||||
# Environment setup
|
||||
|
||||
with open("VERSION") as f:
|
||||
mesa_version = f.read().strip()
|
||||
env.Append(CPPDEFINES = [
|
||||
('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
|
||||
('PACKAGE_VERSION', '\\"9.2.1\\"'),
|
||||
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
|
||||
])
|
||||
|
||||
|
@@ -1,28 +1,10 @@
|
||||
# This patch does not apply cleanly, author says it can be skipped.
|
||||
dff3eccd158d648482bb47118ef5d57a9186e5a4
|
||||
# Already cherry picked without -x
|
||||
d8ac987f6ab228df1a478b36c3d889992754374f glsl: Disallow uniform block layout qualifiers on non-uniform block vars.
|
||||
|
||||
# And this one depends on the above, author says it too can be skipped.
|
||||
ac35ded4733883037316d556af596524e5e02535
|
||||
# The bug fixed by this patch does not exist in 9.2. Discussed with Marek and
|
||||
# Brian Paul on the mesa-stable mailing list.
|
||||
89a665eb5fa176f68223bf54a472d6a0567c3546 draw: fix segfaults with aaline and aapoint stages disabled
|
||||
|
||||
# This patch introduces some regressions. See:
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=77443
|
||||
1afe3359258a9e89b62c8638761f52d78f6d1cbc
|
||||
|
||||
# Author retracted this from consideration for stable branch
|
||||
3e817e7e56806d8adb8f16c35136045c29908944
|
||||
|
||||
# And this one was simply a bug fix for the previously-retracted commit
|
||||
2bab95973d8ad3a84f62670143d6f26c230d9582
|
||||
|
||||
# Here we have a commit, and its subsequent "revert" both proposed within a
|
||||
# single window of the stable release. So we can achieve the same final effect
|
||||
# by ignoring both of the commits.
|
||||
e3cc0d90e14e62a0a787b6c07a6df0f5c84039be
|
||||
0d5ec2c615784929be095951f9269773a790a2dd
|
||||
|
||||
# The function being modified here (_eglCreateWindowSurfaceCommon) does not
|
||||
# exist in the 10.1 branch.
|
||||
91ff0d4c6510dc38f279c586ced17fba917873e7
|
||||
|
||||
# This patch is not needed (modifies work only in 10.2)
|
||||
6980cae6aeb6671b6b0245e20a2d34957c1fff0a
|
||||
# Previously cherry picked (patch originally appeared twice on master with a
|
||||
# revert in between)
|
||||
4e5eb8ba25054ede4798fa424e6f32b23aba0f98 i965/vec4: Only zero out unused message components when there are any.
|
||||
|
@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*10\.1.*mesa-stable\)' HEAD..origin/master |\
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*mesa-stable\)' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
@@ -100,4 +100,4 @@ def AddOptions(opts):
|
||||
opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes'))
|
||||
opts.Add(BoolOption('texture_float', 'enable floating-point textures and renderbuffers', 'no'))
|
||||
if host_platform == 'windows':
|
||||
opts.Add(EnumOption('MSVC_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0', '10.0', '11.0', '12.0')))
|
||||
opts.Add(EnumOption('MSVC_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0', '10.0', '11.0')))
|
||||
|
440
configure.ac
440
configure.ac
@@ -6,14 +6,17 @@ dnl Tell the user about autoconf.html in the --help output
|
||||
m4_divert_once([HELP_END], [
|
||||
See docs/autoconf.html for more details on the options for Mesa.])
|
||||
|
||||
m4_define(MESA_VERSION, m4_normalize(m4_include(VERSION)))
|
||||
AC_INIT([Mesa], [MESA_VERSION],
|
||||
AC_INIT([Mesa], [9.2.1],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||
AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
|
||||
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
|
||||
@@ -28,21 +31,22 @@ AC_SUBST([OSMESA_VERSION])
|
||||
|
||||
dnl Versions for external dependencies
|
||||
LIBDRM_REQUIRED=2.4.24
|
||||
LIBDRM_RADEON_REQUIRED=2.4.50
|
||||
LIBDRM_INTEL_REQUIRED=2.4.52
|
||||
LIBDRM_RADEON_REQUIRED=2.4.46
|
||||
LIBDRM_INTEL_REQUIRED=2.4.38
|
||||
LIBDRM_NVVIEUX_REQUIRED=2.4.33
|
||||
LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41"
|
||||
LIBDRM_FREEDRENO_REQUIRED=2.4.51
|
||||
LIBDRM_FREEDRENO_REQUIRED=2.4.39
|
||||
DRI2PROTO_REQUIRED=2.6
|
||||
DRI3PROTO_REQUIRED=1.0
|
||||
PRESENTPROTO_REQUIRED=1.0
|
||||
LIBUDEV_REQUIRED=151
|
||||
GLPROTO_REQUIRED=1.4.14
|
||||
LIBDRM_XORG_REQUIRED=2.4.24
|
||||
LIBKMS_XORG_REQUIRED=1.0.0
|
||||
|
||||
dnl Check for progs
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CC
|
||||
AX_PROG_CC_FOR_BUILD
|
||||
AC_PROG_CXX
|
||||
AX_PROG_CXX_FOR_BUILD
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AC_CHECK_PROGS([MAKE], [gmake make])
|
||||
@@ -137,6 +141,21 @@ dnl Cache LDFLAGS and CPPFLAGS so we can add to them and restore later
|
||||
_SAVE_LDFLAGS="$LDFLAGS"
|
||||
_SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
dnl build host compiler macros
|
||||
DEFINES_FOR_BUILD=""
|
||||
AC_SUBST([DEFINES_FOR_BUILD])
|
||||
case "$build_os" in
|
||||
linux*|*-gnu*|gnu*)
|
||||
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -D_GNU_SOURCE"
|
||||
;;
|
||||
solaris*)
|
||||
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DSVR4"
|
||||
;;
|
||||
cygwin*)
|
||||
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Compiler macros
|
||||
DEFINES=""
|
||||
AC_SUBST([DEFINES])
|
||||
@@ -159,6 +178,7 @@ if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -Wall -std=gnu99"
|
||||
;;
|
||||
*)
|
||||
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -Wall -std=c99"
|
||||
CFLAGS="$CFLAGS -Wall -std=c99"
|
||||
;;
|
||||
esac
|
||||
@@ -188,13 +208,16 @@ if test "x$GCC" = xyes; then
|
||||
CFLAGS=$save_CFLAGS
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-strict-aliasing"
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
||||
# gcc's builtin memcmp is slower than glibc's
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
|
||||
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-builtin-memcmp"
|
||||
CFLAGS="$CFLAGS -fno-builtin-memcmp"
|
||||
fi
|
||||
if test "x$GXX" = xyes; then
|
||||
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -Wall"
|
||||
CXXFLAGS="$CXXFLAGS -Wall"
|
||||
|
||||
# Enable -fvisibility=hidden if using a gcc that supports it
|
||||
@@ -211,10 +234,12 @@ if test "x$GXX" = xyes; then
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-strict-aliasing"
|
||||
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
|
||||
|
||||
# gcc's builtin memcmp is slower than glibc's
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
|
||||
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-builtin-memcmp"
|
||||
CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
|
||||
fi
|
||||
|
||||
@@ -230,12 +255,6 @@ esac
|
||||
AC_SUBST([VISIBILITY_CFLAGS])
|
||||
AC_SUBST([VISIBILITY_CXXFLAGS])
|
||||
|
||||
dnl
|
||||
dnl Optional flags, check for compiler support
|
||||
dnl
|
||||
AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_SUPPORTED=1], [SSE41_SUPPORTED=0])
|
||||
AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1])
|
||||
|
||||
dnl
|
||||
dnl Hacks to enable 32 or 64 bit build
|
||||
dnl
|
||||
@@ -295,6 +314,14 @@ AC_ARG_ENABLE([debug],
|
||||
[enable_debug=no]
|
||||
)
|
||||
if test "x$enable_debug" = xyes; then
|
||||
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DDEBUG"
|
||||
if test "x$GCC_FOR_BUILD" = xyes; then
|
||||
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g -O0"
|
||||
fi
|
||||
if test "x$GXX_FOR_BUILD" = xyes; then
|
||||
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g -O0"
|
||||
fi
|
||||
|
||||
DEFINES="$DEFINES -DDEBUG"
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -g -O0"
|
||||
@@ -542,20 +569,6 @@ AC_ARG_ENABLE([dri],
|
||||
[enable DRI modules @<:@default=enabled@:>@])],
|
||||
[enable_dri="$enableval"],
|
||||
[enable_dri=yes])
|
||||
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
dri3_default=yes
|
||||
;;
|
||||
*)
|
||||
dri3_default=no
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE([dri3],
|
||||
[AS_HELP_STRING([--enable-dri3],
|
||||
[enable DRI3 @<:@default=auto@:>@])],
|
||||
[enable_dri3="$enableval"],
|
||||
[enable_dri3="$dri3_default"])
|
||||
AC_ARG_ENABLE([glx],
|
||||
[AS_HELP_STRING([--enable-glx],
|
||||
[enable GLX library @<:@default=enabled@:>@])],
|
||||
@@ -577,6 +590,11 @@ AC_ARG_ENABLE([egl],
|
||||
[enable_egl="$enableval"],
|
||||
[enable_egl=yes])
|
||||
|
||||
AC_ARG_ENABLE([xorg],
|
||||
[AS_HELP_STRING([--enable-xorg],
|
||||
[enable support for X.Org DDX API @<:@default=no@:>@])],
|
||||
[enable_xorg="$enableval"],
|
||||
[enable_xorg=no])
|
||||
AC_ARG_ENABLE([xa],
|
||||
[AS_HELP_STRING([--enable-xa],
|
||||
[enable build of the XA X Acceleration API @<:@default=no@:>@])],
|
||||
@@ -592,7 +610,7 @@ AC_ARG_ENABLE([xvmc],
|
||||
[AS_HELP_STRING([--enable-xvmc],
|
||||
[enable xvmc library @<:@default=auto@:>@])],
|
||||
[enable_xvmc="$enableval"],
|
||||
[enable_xvmc=no])
|
||||
[enable_xvmc=auto])
|
||||
AC_ARG_ENABLE([vdpau],
|
||||
[AS_HELP_STRING([--enable-vdpau],
|
||||
[enable vdpau library @<:@default=auto@:>@])],
|
||||
@@ -605,25 +623,19 @@ AC_ARG_ENABLE([opencl],
|
||||
@<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_opencl=no])
|
||||
AC_ARG_ENABLE([opencl_icd],
|
||||
[AS_HELP_STRING([--enable-opencl-icd],
|
||||
[Build an OpenCL ICD library to be loaded by an ICD implementation
|
||||
@<:@default=no@:>@])],
|
||||
[enable_opencl_icd="$enableval"],
|
||||
[enable_opencl_icd=no])
|
||||
AC_ARG_ENABLE([xlib-glx],
|
||||
AC_ARG_ENABLE([xlib_glx],
|
||||
[AS_HELP_STRING([--enable-xlib-glx],
|
||||
[make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
|
||||
[enable_xlib_glx="$enableval"],
|
||||
[enable_xlib_glx=no])
|
||||
AC_ARG_ENABLE([gallium-egl],
|
||||
AC_ARG_ENABLE([gallium_egl],
|
||||
[AS_HELP_STRING([--enable-gallium-egl],
|
||||
[enable optional EGL state tracker (not required
|
||||
for EGL support in Gallium with OpenGL and OpenGL ES)
|
||||
@<:@default=disable@:>@])],
|
||||
[enable_gallium_egl="$enableval"],
|
||||
[enable_gallium_egl=no])
|
||||
AC_ARG_ENABLE([gallium-gbm],
|
||||
AC_ARG_ENABLE([gallium_gbm],
|
||||
[AS_HELP_STRING([--enable-gallium-gbm],
|
||||
[enable optional gbm state tracker (not required for
|
||||
gbm support in Gallium)
|
||||
@@ -637,7 +649,7 @@ AC_ARG_ENABLE([r600-llvm-compiler],
|
||||
[enable_r600_llvm="$enableval"],
|
||||
[enable_r600_llvm=no])
|
||||
|
||||
AC_ARG_ENABLE([gallium-tests],
|
||||
AC_ARG_ENABLE([gallium_tests],
|
||||
[AS_HELP_STRING([--enable-gallium-tests],
|
||||
[Enable optional Gallium tests) @<:@default=disable@:>@])],
|
||||
[enable_gallium_tests="$enableval"],
|
||||
@@ -667,6 +679,7 @@ if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles1" = xno -a \
|
||||
"x$enable_gles2" = xno -a \
|
||||
"x$enable_openvg" = xno -a \
|
||||
"x$enable_xorg" = xno -a \
|
||||
"x$enable_xa" = xno -a \
|
||||
"x$enable_xvmc" = xno -a \
|
||||
"x$enable_vdpau" = xno -a \
|
||||
@@ -722,7 +735,8 @@ fi
|
||||
AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \
|
||||
"x$enable_dri" = xyes)
|
||||
AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes)
|
||||
AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes)
|
||||
AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
|
||||
"x$enable_osmesa" = xyes)
|
||||
|
||||
AC_ARG_ENABLE([shared-glapi],
|
||||
[AS_HELP_STRING([--enable-shared-glapi],
|
||||
@@ -776,19 +790,6 @@ AC_SUBST([MESA_LLVM])
|
||||
# Check for libdrm
|
||||
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],
|
||||
[have_libdrm=yes], [have_libdrm=no])
|
||||
if test "x$have_libdrm" = xyes; then
|
||||
DEFINES="$DEFINES -DHAVE_LIBDRM"
|
||||
fi
|
||||
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
need_libudev=yes ;;
|
||||
*)
|
||||
need_libudev=no ;;
|
||||
esac
|
||||
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
|
||||
have_libudev=yes, have_libudev=no)
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
# DRI must be shared, I think
|
||||
@@ -845,19 +846,11 @@ xyesno)
|
||||
fi
|
||||
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
|
||||
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED"
|
||||
if test x"$enable_dri3" = xyes; then
|
||||
PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED])
|
||||
PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED])
|
||||
fi
|
||||
fi
|
||||
|
||||
# find the DRI deps for libGL
|
||||
dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8"
|
||||
|
||||
if test x"$enable_dri3" = xyes; then
|
||||
dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= 1.1"
|
||||
fi
|
||||
|
||||
# add xf86vidmode if available
|
||||
PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no)
|
||||
if test "$HAVE_XF86VIDMODE" = yes ; then
|
||||
@@ -869,21 +862,12 @@ xyesno)
|
||||
X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
|
||||
GL_LIB_DEPS="$DRIGL_LIBS"
|
||||
|
||||
if test x"$enable_dri3$have_libudev" = xyesyes; then
|
||||
X11_INCLUDES="$X11_INCLUDES $LIBUDEV_CFLAGS"
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS"
|
||||
fi
|
||||
|
||||
# need DRM libs, $PTHREAD_LIBS, etc.
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
GL_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$have_libudev" = yes; then
|
||||
DEFINES="$DEFINES -DHAVE_LIBUDEV"
|
||||
fi
|
||||
|
||||
# This is outside the case (above) so that it is invoked even for non-GLX
|
||||
# builds.
|
||||
AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes)
|
||||
@@ -904,6 +888,8 @@ AC_SUBST([GLESv1_CM_PC_LIB_PRIV])
|
||||
AC_SUBST([GLESv2_LIB_DEPS])
|
||||
AC_SUBST([GLESv2_PC_LIB_PRIV])
|
||||
|
||||
DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la"
|
||||
|
||||
AC_SUBST([HAVE_XF86VIDMODE])
|
||||
|
||||
dnl
|
||||
@@ -995,9 +981,6 @@ if test "x$enable_dri" = xyes; then
|
||||
linux*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
DEFINES="$DEFINES -DHAVE_ALIAS"
|
||||
if test "x$enable_dri3" = xyes; then
|
||||
DEFINES="$DEFINES -DHAVE_DRI3"
|
||||
fi
|
||||
|
||||
case "$host_cpu" in
|
||||
x86_64|amd64)
|
||||
@@ -1019,7 +1002,7 @@ if test "x$enable_dri" = xyes; then
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*freebsd* | dragonfly* | *netbsd* | openbsd*)
|
||||
freebsd* | dragonfly* | *netbsd* | openbsd*)
|
||||
DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
DEFINES="$DEFINES -DHAVE_ALIAS"
|
||||
|
||||
@@ -1030,7 +1013,7 @@ if test "x$enable_dri" = xyes; then
|
||||
gnu*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
DEFINES="$DEFINES -DHAVE_ALIAS"
|
||||
;;
|
||||
;;
|
||||
solaris*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
;;
|
||||
@@ -1050,38 +1033,38 @@ if test "x$enable_dri" = xyes; then
|
||||
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
|
||||
|
||||
# Check for expat
|
||||
PKG_CHECK_EXISTS([expat], [have_expat=yes], [have_expat=no])
|
||||
if test "x$have_expat" = "xyes"; then
|
||||
PKG_CHECK_MODULES([EXPAT], [expat], [],
|
||||
AC_MSG_ERROR([Expat required for DRI.]))
|
||||
else
|
||||
# expat version 2.0 and earlier do not provide expat.pc
|
||||
EXPAT_LIBS=-lexpat
|
||||
fi
|
||||
EXPAT_INCLUDES=""
|
||||
EXPAT_LIB=-lexpat
|
||||
AC_ARG_WITH([expat],
|
||||
[AS_HELP_STRING([--with-expat=DIR],
|
||||
[expat install directory])],[
|
||||
EXPAT_INCLUDES="-I$withval/include"
|
||||
CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
|
||||
LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
|
||||
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"
|
||||
|
||||
# If we are building any DRI driver other than swrast.
|
||||
if test -n "$DRI_DIRS"; then
|
||||
if test 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
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
else
|
||||
DRICOMMON_NEED_LIBDRM=no
|
||||
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
|
||||
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
|
||||
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
|
||||
AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
|
||||
"x$enable_osmesa" = xyes -o \
|
||||
-n "$DRI_DIRS")
|
||||
AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
|
||||
AC_SUBST([EXPAT_INCLUDES])
|
||||
AC_SUBST([DRI_LIB_DEPS])
|
||||
AC_SUBST([GALLIUM_DRI_LIB_DEPS])
|
||||
|
||||
@@ -1191,30 +1174,18 @@ if test "x$enable_gbm" = xauto; then
|
||||
esac
|
||||
fi
|
||||
if test "x$enable_gbm" = xyes; then
|
||||
if test "x$need_libudev$have_libudev" = xyesno; then
|
||||
AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED])
|
||||
fi
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
|
||||
AC_MSG_ERROR([gbm needs udev]))
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
|
||||
if test "x$enable_shared_glapi" = xno; then
|
||||
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
|
||||
fi
|
||||
else
|
||||
# Strictly speaking libgbm does not require --enable-dri, although
|
||||
# both of its backends do. Thus one can build libgbm without any
|
||||
# backends if --disable-dri is set.
|
||||
# To avoid unnecessary complexity of checking if at least one backend
|
||||
# is available when building, just mandate --enable-dri.
|
||||
AC_MSG_ERROR([gbm requires --enable-dri])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
|
||||
if test "x$need_libudev" = xyes; then
|
||||
GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
|
||||
else
|
||||
GBM_PC_REQ_PRIV=""
|
||||
fi
|
||||
GBM_PC_REQ_PRIV="libudev"
|
||||
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
|
||||
AC_SUBST([GBM_PC_REQ_PRIV])
|
||||
AC_SUBST([GBM_PC_LIB_PRIV])
|
||||
@@ -1231,6 +1202,11 @@ if test "x$enable_egl" = xyes; then
|
||||
|
||||
if test "$enable_static" != yes; then
|
||||
# build egl_glx when libGL is built
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
|
||||
[have_libudev=yes],[have_libudev=no])
|
||||
if test "$have_libudev" = yes; then
|
||||
DEFINES="$DEFINES -DHAVE_LIBUDEV"
|
||||
fi
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
HAVE_EGL_DRIVER_DRI2=1
|
||||
@@ -1289,11 +1265,37 @@ if test "x$enable_gallium_gbm" = xyes; then
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
|
||||
|
||||
dnl
|
||||
dnl X.Org DDX configuration
|
||||
dnl
|
||||
if test "x$enable_xorg" = xyes; then
|
||||
PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0])
|
||||
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
|
||||
PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED])
|
||||
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
|
||||
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
|
||||
HAVE_XEXTPROTO_71="no")
|
||||
GALLIUM_STATE_TRACKERS_DIRS="xorg $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_XORG, test "x$enable_xorg" = xyes)
|
||||
|
||||
dnl
|
||||
dnl XA configuration
|
||||
dnl
|
||||
if test "x$enable_xa" = xyes; then
|
||||
AC_PROG_AWK
|
||||
AC_PROG_GREP
|
||||
AC_CHECK_PROG(NM, nm, "nm")
|
||||
if test "x$AWK" = x || test "x$GREP" = x || test "x$NM" = x; then
|
||||
AC_MSG_WARN([Missing one of nm, grep or awk. Disabling xa.])
|
||||
enable_xa=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_xa" = xyes; then
|
||||
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
AC_SUBST(AWK)
|
||||
AC_SUBST(GREP)
|
||||
AC_SUBST(NM)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
|
||||
|
||||
@@ -1369,42 +1371,29 @@ AC_ARG_WITH([clang-libdir],
|
||||
[CLANG_LIBDIR="$withval"],
|
||||
[CLANG_LIBDIR=""])
|
||||
|
||||
PKG_CHECK_EXISTS([libclc], [have_libclc=yes], [have_libclc=no])
|
||||
LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
|
||||
LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
|
||||
AC_SUBST([LIBCLC_INCLUDEDIR])
|
||||
AC_SUBST([LIBCLC_LIBEXECDIR])
|
||||
|
||||
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 7; then
|
||||
AC_MSG_ERROR([gcc >= 4.7 is required to build clover])
|
||||
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
|
||||
|
||||
if test "x$have_libclc" = xno; then
|
||||
AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
|
||||
Make sure the directory containing libclc.pc is specified in your
|
||||
PKG_CONFIG_PATH environment variable.
|
||||
By default libclc.pc is installed to /usr/local/share/pkgconfig/])
|
||||
else
|
||||
LIBCLC_INCLUDEDIR=`$PKG_CONFIG --variable=includedir libclc`
|
||||
LIBCLC_LIBEXECDIR=`$PKG_CONFIG --variable=libexecdir libclc`
|
||||
AC_SUBST([LIBCLC_INCLUDEDIR])
|
||||
AC_SUBST([LIBCLC_LIBEXECDIR])
|
||||
if test "x$LIBCLC_INCLUDEDIR" == x || test "x$LIBCLC_LIBEXECDIR" == x; then
|
||||
AC_MSG_ERROR([pkg-config cannot use libclc.pc which 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
|
||||
|
||||
if test "x$enable_opencl_icd" = xyes; then
|
||||
OPENCL_LIBNAME="MesaOpenCL"
|
||||
else
|
||||
OPENCL_LIBNAME="OpenCL"
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
|
||||
AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
|
||||
AC_SUBST([OPENCL_LIBNAME])
|
||||
|
||||
dnl
|
||||
dnl Gallium configuration
|
||||
@@ -1445,6 +1434,8 @@ AC_ARG_WITH([egl-platforms],
|
||||
with_egl_platforms=""
|
||||
fi])
|
||||
|
||||
EGL_PLATFORMS=""
|
||||
|
||||
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
|
||||
@@ -1454,7 +1445,7 @@ egl_platforms=`IFS=', '; echo $with_egl_platforms`
|
||||
for plat in $egl_platforms; do
|
||||
case "$plat" in
|
||||
wayland)
|
||||
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.2.0 wayland-server >= 1.2.0])
|
||||
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2])
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
|
||||
|
||||
WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
|
||||
@@ -1473,8 +1464,6 @@ for plat in $egl_platforms; do
|
||||
drm)
|
||||
test "x$enable_gbm" = "xno" &&
|
||||
AC_MSG_ERROR([EGL platform drm needs gbm])
|
||||
test "x$have_libdrm" != xyes &&
|
||||
AC_MSG_ERROR([EGL platform drm requires libdrm >= $LIBDRM_REQUIRED])
|
||||
;;
|
||||
|
||||
android|fbdev|gdi|null)
|
||||
@@ -1485,9 +1474,9 @@ for plat in $egl_platforms; do
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$plat$need_libudev$have_libudev" in
|
||||
waylandyesno|drmyesno)
|
||||
AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;;
|
||||
case "$plat$have_libudev" in
|
||||
waylandno|drmno)
|
||||
AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -1500,6 +1489,8 @@ else
|
||||
EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM"
|
||||
fi
|
||||
|
||||
EGL_PLATFORMS="$egl_platforms"
|
||||
|
||||
if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then
|
||||
NEED_WINSYS_XLIB=yes
|
||||
fi
|
||||
@@ -1513,6 +1504,7 @@ 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])
|
||||
AC_SUBST([EGL_PLATFORMS])
|
||||
AC_SUBST([EGL_CFLAGS])
|
||||
|
||||
# If we don't have the X11 platform, set this define so we don't try to include
|
||||
@@ -1529,6 +1521,13 @@ AC_ARG_WITH([egl-driver-dir],
|
||||
[EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
|
||||
AC_SUBST([EGL_DRIVER_INSTALL_DIR])
|
||||
|
||||
AC_ARG_WITH([xorg-driver-dir],
|
||||
[AS_HELP_STRING([--with-xorg-driver-dir=DIR],
|
||||
[Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
|
||||
[XORG_DRIVER_INSTALL_DIR="$withval"],
|
||||
[XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
|
||||
AC_SUBST([XORG_DRIVER_INSTALL_DIR])
|
||||
|
||||
AC_ARG_WITH([max-width],
|
||||
[AS_HELP_STRING([--with-max-width=N],
|
||||
[Maximum framebuffer width (4096)])],
|
||||
@@ -1553,11 +1552,16 @@ AC_ARG_ENABLE([gallium-llvm],
|
||||
[enable_gallium_llvm="$enableval"],
|
||||
[enable_gallium_llvm=auto])
|
||||
|
||||
AC_ARG_ENABLE([llvm-shared-libs],
|
||||
[AS_HELP_STRING([--enable-llvm-shared-libs],
|
||||
[link with LLVM shared libraries @<:@default=enabled@:>@])],
|
||||
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])
|
||||
AS_IF([test x$enable_opencl = xyes],
|
||||
[
|
||||
AC_MSG_WARN([OpenCL required, forcing LLVM shared libraries])
|
||||
with_llvm_shared_libs=yes
|
||||
])
|
||||
|
||||
AC_ARG_WITH([llvm-prefix],
|
||||
[AS_HELP_STRING([--with-llvm-prefix],
|
||||
@@ -1577,7 +1581,6 @@ strip_unwanted_llvm_flags() {
|
||||
-e 's/-O.\>//g' \
|
||||
-e 's/-g\>//g' \
|
||||
-e 's/-Wall\>//g' \
|
||||
-e 's/-fcolor-diagnostics\>//g' \
|
||||
-e 's/-fomit-frame-pointer\>//g'
|
||||
}
|
||||
|
||||
@@ -1592,9 +1595,9 @@ if test "x$enable_gallium_llvm" = xauto; then
|
||||
fi
|
||||
if test "x$enable_gallium_llvm" = xyes; then
|
||||
if test "x$llvm_prefix" != x; then
|
||||
AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
|
||||
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
|
||||
else
|
||||
AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no])
|
||||
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
|
||||
fi
|
||||
|
||||
if test "x$LLVM_CONFIG" != xno; then
|
||||
@@ -1612,12 +1615,6 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
|
||||
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
|
||||
|
||||
dnl In LLVM 3.4.1 patch level was defined in config.h and not
|
||||
dnl llvm-config.h
|
||||
AC_COMPUTE_INT([LLVM_VERSION_PATCH], [LLVM_VERSION_PATCH],
|
||||
[#include "${LLVM_INCLUDEDIR}/llvm/Config/config.h"],
|
||||
LLVM_VERSION_PATCH=0) dnl Default if LLVM_VERSION_PATCH not found
|
||||
|
||||
if test "x${LLVM_VERSION_MAJOR}" != x; then
|
||||
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
|
||||
else
|
||||
@@ -1635,12 +1632,8 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
if $LLVM_CONFIG --components | grep -qw 'irreader'; then
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
|
||||
fi
|
||||
# LLVM 3.4 requires Option
|
||||
if $LLVM_CONFIG --components | grep -qw 'option'; then
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
|
||||
fi
|
||||
fi
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
|
||||
MESA_LLVM=1
|
||||
|
||||
dnl Check for Clang internal headers
|
||||
@@ -1659,10 +1652,6 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
else
|
||||
MESA_LLVM=0
|
||||
LLVM_VERSION_INT=0
|
||||
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
AC_MSG_ERROR([cannot enable OpenCL without LLVM])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Directory for XVMC libs
|
||||
@@ -1714,16 +1703,20 @@ gallium_check_st() {
|
||||
fi
|
||||
if test "x$enable_dri" = xyes && test "x$2" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2"
|
||||
HAVE_COMMON_DRI=yes
|
||||
fi
|
||||
if test "x$enable_xa" = xyes && test "x$3" != x; then
|
||||
if test "x$enable_xorg" = xyes && test "x$3" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3"
|
||||
fi
|
||||
if test "x$enable_xvmc" = xyes && test "x$4" != x; then
|
||||
if test "x$enable_xa" = xyes && test "x$4" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
|
||||
fi
|
||||
if test "x$enable_vdpau" = xyes && test "x$5" != x; then
|
||||
if test "x$enable_xvmc" = xyes && test "x$5" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
|
||||
fi
|
||||
if test "x$enable_vdpau" = xyes && test "x$6" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
|
||||
fi
|
||||
}
|
||||
|
||||
gallium_require_llvm() {
|
||||
@@ -1736,9 +1729,8 @@ gallium_require_llvm() {
|
||||
|
||||
gallium_require_drm_loader() {
|
||||
if test "x$enable_gallium_loader" = xyes; then
|
||||
if test "x$need_libudev$have_libudev" = xyesno; then
|
||||
AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED])
|
||||
fi
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
|
||||
AC_MSG_ERROR([Gallium drm loader requires libudev]))
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
|
||||
fi
|
||||
@@ -1764,8 +1756,9 @@ radeon_llvm_check() {
|
||||
}
|
||||
|
||||
dnl Gallium drivers
|
||||
if test "x$enable_dri" = xyes -o "x$enable_xa" = xyes -o \
|
||||
"x$enable_xvmc" = xyes -o "x$enable_vdpau" = xyes; then
|
||||
if test "x$enable_dri" = xyes -o "x$enable_xorg" = xyes -o \
|
||||
"x$enable_xa" = xyes -o "x$enable_xvmc" = xyes -o \
|
||||
"x$enable_vdpau" = xyes; then
|
||||
NEED_NONNULL_WINSYS=yes
|
||||
fi
|
||||
AM_CONDITIONAL(NEED_NONNULL_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes)
|
||||
@@ -1778,7 +1771,7 @@ if test "x$with_gallium_drivers" != x; then
|
||||
xsvga)
|
||||
HAVE_GALLIUM_SVGA=yes
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
|
||||
gallium_check_st "svga/drm" "dri-vmwgfx" "xa-vmwgfx"
|
||||
gallium_check_st "svga/drm" "dri-vmwgfx" "" "xa-vmwgfx"
|
||||
;;
|
||||
xi915)
|
||||
HAVE_GALLIUM_I915=yes
|
||||
@@ -1788,8 +1781,7 @@ if test "x$with_gallium_drivers" != x; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
|
||||
fi
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw"
|
||||
gallium_check_st "i915/drm" "dri-i915"
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
|
||||
;;
|
||||
xilo)
|
||||
HAVE_GALLIUM_ILO=yes
|
||||
@@ -1797,15 +1789,13 @@ if test "x$with_gallium_drivers" != x; then
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS ilo"
|
||||
gallium_check_st "intel/drm" "dri-ilo"
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
;;
|
||||
xr300)
|
||||
HAVE_GALLIUM_R300=yes
|
||||
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" "r300/dri" "" "" ""
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
gallium_check_st "radeon/drm" "dri-r300" "" "" "xvmc-r300" "vdpau-r300"
|
||||
;;
|
||||
xr600)
|
||||
HAVE_GALLIUM_R600=yes
|
||||
@@ -1814,6 +1804,7 @@ if test "x$with_gallium_drivers" != x; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
|
||||
if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
|
||||
radeon_llvm_check
|
||||
R600_NEED_RADEON_GALLIUM=yes;
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
|
||||
fi
|
||||
if test "x$enable_r600_llvm" = xyes; then
|
||||
@@ -1822,8 +1813,7 @@ if test "x$with_gallium_drivers" != x; then
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
|
||||
fi
|
||||
gallium_check_st "radeon/drm" "r600/dri" "" "r600/xvmc" "r600/vdpau"
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600"
|
||||
;;
|
||||
xradeonsi)
|
||||
HAVE_GALLIUM_RADEONSI=yes
|
||||
@@ -1831,24 +1821,21 @@ if test "x$with_gallium_drivers" != x; then
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
|
||||
radeon_llvm_check
|
||||
gallium_check_st "radeon/drm" "radeonsi/dri" "" "" "radeonsi/vdpau"
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" ""
|
||||
;;
|
||||
xnouveau)
|
||||
HAVE_GALLIUM_NOUVEAU=yes
|
||||
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau"
|
||||
gallium_check_st "nouveau/drm" "dri-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv50 nvc0"
|
||||
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
|
||||
;;
|
||||
xfreedreno)
|
||||
HAVE_GALLIUM_FREEDRENO=yes
|
||||
PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED])
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS freedreno"
|
||||
gallium_check_st "freedreno/drm" "dri-freedreno" "" "" ""
|
||||
DRICOMMON_NEED_LIBDRM=yes
|
||||
gallium_check_st "freedreno/drm" "dri-freedreno" "" "" "" ""
|
||||
;;
|
||||
xswrast)
|
||||
HAVE_GALLIUM_SOFTPIPE=yes
|
||||
@@ -1860,6 +1847,17 @@ if test "x$with_gallium_drivers" != x; then
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
|
||||
HAVE_COMMON_DRI=yes
|
||||
fi
|
||||
if test "x$enable_vdpau" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe"
|
||||
fi
|
||||
if test "x$enable_xvmc" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe"
|
||||
fi
|
||||
if test "x$enable_vdpau" = xyes -o "x$enable_xvmc" = xyes; then
|
||||
NEED_WINSYS_XLIB=yes
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
@@ -1953,6 +1951,7 @@ 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)
|
||||
|
||||
AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes -a \
|
||||
"x$HAVE_GALLIUM_R300" = xyes -o \
|
||||
@@ -1962,23 +1961,29 @@ AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test "x$HAVE_GALLIUM_I915" = xyes -o \
|
||||
"x$HAVE_GALLIUM_SVGA" = xyes)
|
||||
AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes)
|
||||
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
|
||||
AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_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)
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
|
||||
AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
|
||||
AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
|
||||
|
||||
AC_SUBST([ELF_LIB])
|
||||
|
||||
AM_CONDITIONAL(DRICOMMON_NEED_LIBDRM, test "x$DRICOMMON_NEED_LIBDRM" = xyes)
|
||||
AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes)
|
||||
AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
|
||||
"x$enable_xlib_glx" = xyes -o \
|
||||
"x$enable_osmesa" = xyes -o \
|
||||
"x$enable_gallium_osmesa" = xyes)
|
||||
AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes)
|
||||
AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_OSMESA, test "x$enable_gallium_osmesa" = xyes)
|
||||
|
||||
AM_CONDITIONAL(HAVE_X86_ASM, test "x$asm_arch" = xx86 -o "x$asm_arch" = xx86_64)
|
||||
AM_CONDITIONAL(HAVE_X86_64_ASM, test "x$asm_arch" = xx86_64)
|
||||
AM_CONDITIONAL(HAVE_SPARC_ASM, test "x$asm_arch" = xsparc)
|
||||
AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1)
|
||||
AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1)
|
||||
AM_CONDITIONAL(HAVE_SPARC_ASM, echo "$DEFINES" | grep 'SPARC_ASM' >/dev/null 2>&1)
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
||||
|
||||
AC_SUBST([VDPAU_MAJOR], 1)
|
||||
AC_SUBST([VDPAU_MINOR], 0)
|
||||
@@ -1986,8 +1991,8 @@ AC_SUBST([VDPAU_MINOR], 0)
|
||||
AC_SUBST([XVMC_MAJOR], 1)
|
||||
AC_SUBST([XVMC_MINOR], 0)
|
||||
|
||||
AC_SUBST([XA_MAJOR], 2)
|
||||
AC_SUBST([XA_MINOR], 1)
|
||||
AC_SUBST([XA_MAJOR], 1)
|
||||
AC_SUBST([XA_MINOR], 0)
|
||||
AC_SUBST([XA_TINY], 0)
|
||||
AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
|
||||
|
||||
@@ -1995,12 +2000,6 @@ dnl Restore LDFLAGS and CPPFLAGS
|
||||
LDFLAGS="$_SAVE_LDFLAGS"
|
||||
CPPFLAGS="$_SAVE_CPPFLAGS"
|
||||
|
||||
dnl Suppress clang's warnings about unused CFLAGS and CXXFLAGS
|
||||
if test "x$acv_mesa_CLANG" = xyes; then
|
||||
CFLAGS="$CFLAGS -Qunused-arguments"
|
||||
CXXFLAGS="$CXXFLAGS -Qunused-arguments"
|
||||
fi
|
||||
|
||||
dnl Add user CFLAGS and CXXFLAGS
|
||||
CFLAGS="$CFLAGS $USER_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
|
||||
@@ -2022,13 +2021,15 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gallium/auxiliary/pipe-loader/Makefile
|
||||
src/gallium/drivers/Makefile
|
||||
src/gallium/drivers/freedreno/Makefile
|
||||
src/gallium/drivers/galahad/Makefile
|
||||
src/gallium/drivers/freedreno/a2xx/Makefile
|
||||
src/gallium/drivers/freedreno/a3xx/Makefile
|
||||
src/gallium/drivers/i915/Makefile
|
||||
src/gallium/drivers/identity/Makefile
|
||||
src/gallium/drivers/ilo/Makefile
|
||||
src/gallium/drivers/llvmpipe/Makefile
|
||||
src/gallium/drivers/noop/Makefile
|
||||
src/gallium/drivers/nouveau/Makefile
|
||||
src/gallium/drivers/nv30/Makefile
|
||||
src/gallium/drivers/nv50/Makefile
|
||||
src/gallium/drivers/nvc0/Makefile
|
||||
src/gallium/drivers/r300/Makefile
|
||||
src/gallium/drivers/r600/Makefile
|
||||
src/gallium/drivers/radeon/Makefile
|
||||
@@ -2044,17 +2045,21 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gallium/state_trackers/dri/sw/Makefile
|
||||
src/gallium/state_trackers/egl/Makefile
|
||||
src/gallium/state_trackers/gbm/Makefile
|
||||
src/gallium/state_trackers/glx/xlib/Makefile
|
||||
src/gallium/state_trackers/glx/Makefile
|
||||
src/gallium/state_trackers/osmesa/Makefile
|
||||
src/gallium/state_trackers/vdpau/Makefile
|
||||
src/gallium/state_trackers/vega/Makefile
|
||||
src/gallium/state_trackers/xa/Makefile
|
||||
src/gallium/state_trackers/xorg/Makefile
|
||||
src/gallium/state_trackers/xvmc/Makefile
|
||||
src/gallium/targets/Makefile
|
||||
src/gallium/targets/dri-freedreno/Makefile
|
||||
src/gallium/targets/dri-i915/Makefile
|
||||
src/gallium/targets/dri-ilo/Makefile
|
||||
src/gallium/targets/dri-nouveau/Makefile
|
||||
src/gallium/targets/dri-r300/Makefile
|
||||
src/gallium/targets/dri-r600/Makefile
|
||||
src/gallium/targets/dri-radeonsi/Makefile
|
||||
src/gallium/targets/dri-swrast/Makefile
|
||||
src/gallium/targets/dri-vmwgfx/Makefile
|
||||
src/gallium/targets/egl-static/Makefile
|
||||
@@ -2063,17 +2068,22 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gallium/targets/osmesa/Makefile
|
||||
src/gallium/targets/osmesa/osmesa.pc
|
||||
src/gallium/targets/pipe-loader/Makefile
|
||||
src/gallium/targets/radeonsi/dri/Makefile
|
||||
src/gallium/targets/radeonsi/vdpau/Makefile
|
||||
src/gallium/targets/r300/dri/Makefile
|
||||
src/gallium/targets/r600/dri/Makefile
|
||||
src/gallium/targets/r600/vdpau/Makefile
|
||||
src/gallium/targets/r600/xvmc/Makefile
|
||||
src/gallium/targets/libgl-xlib/Makefile
|
||||
src/gallium/targets/vdpau-nouveau/Makefile
|
||||
src/gallium/targets/vdpau-r300/Makefile
|
||||
src/gallium/targets/vdpau-r600/Makefile
|
||||
src/gallium/targets/vdpau-radeonsi/Makefile
|
||||
src/gallium/targets/vdpau-softpipe/Makefile
|
||||
src/gallium/targets/xa-vmwgfx/Makefile
|
||||
src/gallium/targets/xa-vmwgfx/xatracker.pc
|
||||
src/gallium/targets/xorg-i915/Makefile
|
||||
src/gallium/targets/xorg-nouveau/Makefile
|
||||
src/gallium/targets/xorg-r600/Makefile
|
||||
src/gallium/targets/xorg-radeonsi/Makefile
|
||||
src/gallium/targets/xvmc-nouveau/Makefile
|
||||
src/gallium/targets/xvmc-r300/Makefile
|
||||
src/gallium/targets/xvmc-r600/Makefile
|
||||
src/gallium/targets/xvmc-softpipe/Makefile
|
||||
src/gallium/tests/trivial/Makefile
|
||||
src/gallium/tests/unit/Makefile
|
||||
src/gallium/winsys/Makefile
|
||||
@@ -2093,10 +2103,10 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gbm/Makefile
|
||||
src/gbm/main/gbm.pc
|
||||
src/glsl/Makefile
|
||||
src/glsl/builtin_compiler/Makefile
|
||||
src/glx/Makefile
|
||||
src/glx/tests/Makefile
|
||||
src/gtest/Makefile
|
||||
src/loader/Makefile
|
||||
src/mapi/Makefile
|
||||
src/mapi/es1api/Makefile
|
||||
src/mapi/es1api/glesv1_cm.pc
|
||||
@@ -2124,8 +2134,12 @@ AC_CONFIG_FILES([Makefile
|
||||
src/mesa/drivers/osmesa/Makefile
|
||||
src/mesa/drivers/osmesa/osmesa.pc
|
||||
src/mesa/drivers/x11/Makefile
|
||||
src/mesa/libdricore/Makefile
|
||||
src/mesa/main/tests/Makefile
|
||||
src/mesa/main/tests/hash_table/Makefile])
|
||||
src/mesa/main/tests/hash_table/Makefile
|
||||
src/mesa/program/Makefile
|
||||
src/mesa/x86-64/Makefile
|
||||
src/mesa/x86/Makefile])
|
||||
|
||||
dnl Sort the dirs alphabetically
|
||||
GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
@@ -2190,7 +2204,7 @@ dnl EGL
|
||||
echo ""
|
||||
echo " EGL: $enable_egl"
|
||||
if test "$enable_egl" = yes; then
|
||||
echo " EGL platforms: $egl_platforms"
|
||||
echo " EGL platforms: $EGL_PLATFORMS"
|
||||
|
||||
egl_drivers=""
|
||||
if test "x$HAVE_EGL_DRIVER_GLX" != "x"; then
|
||||
|
260
docs/GL3.txt
260
docs/GL3.txt
@@ -7,177 +7,153 @@ infrastructure is complete but it may be the case that few (if any) drivers
|
||||
implement the features.
|
||||
|
||||
|
||||
OpenGL Core and Compatibility context support
|
||||
|
||||
OpenGL 3.1 and later versions are only supported with the Core profile.
|
||||
There are no plans to support GL_ARB_compatibility. The last supported OpenGL
|
||||
version with all deprecated features is 3.0. Some of the later GL features
|
||||
are exposed in the 3.0 context as extensions.
|
||||
|
||||
|
||||
Feature Status
|
||||
----------------------------------------------------- ------------------------
|
||||
|
||||
GL 3.0 --- all DONE: i965, nv50, nvc0, r600, radeonsi
|
||||
GL 3.0:
|
||||
|
||||
GLSL 1.30 DONE ()
|
||||
glBindFragDataLocation, glGetFragDataLocation DONE
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (r300, swrast)
|
||||
Map buffer subranges (GL_ARB_map_buffer_range) DONE (r300, swrast)
|
||||
Clamping controls (GL_ARB_color_buffer_float) DONE (r300)
|
||||
Float textures, renderbuffers (GL_ARB_texture_float) DONE (r300)
|
||||
GL_EXT_packed_float DONE ()
|
||||
GL_EXT_texture_shared_exponent DONE (swrast)
|
||||
Float depth buffers (GL_ARB_depth_buffer_float) DONE ()
|
||||
Framebuffer objects (GL_ARB_framebuffer_object) DONE (r300, swrast)
|
||||
GL_ARB_half_float_pixel DONE (r300, swrast)
|
||||
GL_ARB_half_float_vertex DONE (r300, swrast)
|
||||
GL_EXT_texture_integer DONE ()
|
||||
GL_EXT_texture_array DONE ()
|
||||
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (swrast)
|
||||
GL_EXT_texture_compression_rgtc DONE (r300, swrast)
|
||||
GL_ARB_texture_rg DONE (r300, swrast)
|
||||
Transform feedback (GL_EXT_transform_feedback) DONE ()
|
||||
Vertex array objects (GL_ARB_vertex_array_object) DONE (all drivers)
|
||||
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE ()
|
||||
glClearBuffer commands DONE
|
||||
glGetStringi command DONE
|
||||
glTexParameterI, glGetTexParameterI commands DONE
|
||||
glVertexAttribI commands DONE
|
||||
Depth format cube textures DONE ()
|
||||
GLX_ARB_create_context (GLX 1.4 is required) DONE
|
||||
Multisample anti-aliasing DONE (r300)
|
||||
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)
|
||||
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)
|
||||
Half-float DONE
|
||||
Non-normalized Integer texture/framebuffer formats DONE (i965, r600)
|
||||
1D/2D Texture arrays DONE
|
||||
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, swrast)
|
||||
GL_EXT_texture_compression_rgtc DONE (i965, r300, r600, swrast)
|
||||
Red and red/green texture formats DONE (i965, swrast, gallium)
|
||||
Transform feedback (GL_EXT_transform_feedback) DONE (i965, r600)
|
||||
Vertex array objects (GL_APPLE_vertex_array_object) DONE (i965, r300, r600, swrast)
|
||||
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600)
|
||||
glClearBuffer commands DONE
|
||||
glGetStringi command DONE
|
||||
glTexParameterI, glGetTexParameterI commands DONE
|
||||
glVertexAttribI commands DONE
|
||||
Depth format cube textures DONE
|
||||
GLX_ARB_create_context (GLX 1.4 is required) DONE
|
||||
|
||||
|
||||
GL 3.1 --- all DONE: i965, nv50, nvc0, r600, radeonsi
|
||||
GL 3.1:
|
||||
|
||||
GLSL 1.40 DONE ()
|
||||
Forward compatible context support/deprecations DONE ()
|
||||
Instanced drawing (GL_ARB_draw_instanced) DONE (swrast)
|
||||
Buffer copying (GL_ARB_copy_buffer) DONE (r300, swrast)
|
||||
Primitive restart (GL_NV_primitive_restart) DONE (r300)
|
||||
16 vertex texture image units DONE ()
|
||||
Texture buffer objs (GL_ARB_texture_buffer_object) DONE for OpenGL 3.1 contexts ()
|
||||
Rectangular textures (GL_ARB_texture_rectangle) DONE (r300, swrast)
|
||||
Uniform buffer objs (GL_ARB_uniform_buffer_object) DONE (swrast)
|
||||
Signed normalized textures (GL_EXT_texture_snorm) DONE (r300)
|
||||
GLSL 1.40 DONE (i965, r600)
|
||||
Forward compatibile context support/deprecations DONE (i965, r600)
|
||||
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)
|
||||
16 vertex texture image units DONE
|
||||
Texture buffer objs (GL_ARB_texture_buffer_object) DONE for OpenGL 3.1 contexts (i965, r600)
|
||||
Rectangular textures (GL_ARB_texture_rectangle) DONE (i965, r300, r600, swrast)
|
||||
Uniform buffer objs (GL_ARB_uniform_buffer_object) DONE (i965, r600, swrast)
|
||||
Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600)
|
||||
|
||||
|
||||
GL 3.2 --- all DONE: i965, nv50, nvc0, radeonsi
|
||||
GL 3.2:
|
||||
|
||||
Core/compatibility profiles DONE
|
||||
GLSL 1.50 DONE ()
|
||||
Geometry shaders DONE ()
|
||||
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (r300, r600, swrast)
|
||||
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (r300, r600, swrast)
|
||||
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (r300, r600, swrast)
|
||||
Provoking vertex (GL_ARB_provoking_vertex) DONE (r300, r600, swrast)
|
||||
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE (r600)
|
||||
Multisample textures (GL_ARB_texture_multisample) DONE (r600)
|
||||
Frag depth clamp (GL_ARB_depth_clamp) DONE (r600, swrast)
|
||||
Fence objects (GL_ARB_sync) DONE (r300, r600, swrast)
|
||||
GLX_ARB_create_context_profile DONE
|
||||
Core/compatibility profiles DONE
|
||||
GLSL 1.50 in progress
|
||||
Geometry shaders (GL_ARB_geometry_shader4) partially done
|
||||
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)
|
||||
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE (i965, r600)
|
||||
Multisample textures (GL_ARB_texture_multisample) DONE (i965)
|
||||
Frag depth clamp (GL_ARB_depth_clamp) DONE (i965, r600, swrast)
|
||||
Fence objects (GL_ARB_sync) DONE (i965, r300, r600, swrast)
|
||||
GLX_ARB_create_context_profile DONE
|
||||
|
||||
|
||||
GL 3.3 --- all DONE: i965, nv50, nvc0, radeonsi
|
||||
GL 3.3:
|
||||
|
||||
GLSL 3.30 DONE ()
|
||||
GL_ARB_blend_func_extended DONE (r600, softpipe)
|
||||
GL_ARB_explicit_attrib_location DONE (all drivers that support GLSL)
|
||||
GL_ARB_occlusion_query2 DONE (r300, r600, swrast)
|
||||
GL_ARB_sampler_objects DONE (all drivers)
|
||||
GL_ARB_shader_bit_encoding DONE (r600)
|
||||
GL_ARB_texture_rgb10_a2ui DONE (r600)
|
||||
GL_ARB_texture_swizzle DONE (r300, r600, swrast)
|
||||
GL_ARB_timer_query DONE (r600)
|
||||
GL_ARB_instanced_arrays DONE (r300, r600)
|
||||
GL_ARB_vertex_type_2_10_10_10_rev DONE (r600)
|
||||
GLSL 3.30 new features in this version pretty much done
|
||||
GL_ARB_blend_func_extended DONE (i965, r600, softpipe)
|
||||
GL_ARB_explicit_attrib_location DONE (i915, i965, r300, r600, swrast)
|
||||
GL_ARB_occlusion_query2 DONE (i965, r300, r600, swrast)
|
||||
GL_ARB_sampler_objects DONE (i965, r300, r600)
|
||||
GL_ARB_shader_bit_encoding DONE
|
||||
GL_ARB_texture_rgb10_a2ui DONE (i965, r600)
|
||||
GL_ARB_texture_swizzle DONE (same as EXT version) (i965, r300, r600, swrast)
|
||||
GL_ARB_timer_query DONE (i965, r600)
|
||||
GL_ARB_instanced_arrays DONE (i965, r300, r600)
|
||||
GL_ARB_vertex_type_2_10_10_10_rev DONE (i965, r600)
|
||||
|
||||
|
||||
GL 4.0:
|
||||
|
||||
GLSL 4.0 not started
|
||||
GL_ARB_texture_query_lod DONE (i965)
|
||||
GL_ARB_draw_buffers_blend DONE (i965, nv50, nvc0, r600, radeonsi, softpipe)
|
||||
GL_ARB_draw_indirect DONE (i965)
|
||||
GL_ARB_gpu_shader5 started
|
||||
GL_ARB_gpu_shader_fp64 not started
|
||||
GL_ARB_sample_shading DONE (i965)
|
||||
GL_ARB_shader_subroutine not started
|
||||
GL_ARB_tessellation_shader not started
|
||||
GL_ARB_texture_buffer_object_rgb32 DONE (i965, r600, radeonsi, softpipe)
|
||||
GL_ARB_texture_cube_map_array DONE (i965, nvc0, r600, softpipe)
|
||||
GL_ARB_texture_gather DONE (i965)
|
||||
GL_ARB_transform_feedback2 DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_transform_feedback3 DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GLSL 4.0 not started
|
||||
GL_ARB_texture_query_lod DONE (i965)
|
||||
GL_ARB_draw_buffers_blend DONE (i965, r600, softpipe)
|
||||
GL_ARB_draw_indirect started (Christoph)
|
||||
GL_ARB_gpu_shader5 started
|
||||
GL_ARB_gpu_shader_fp64 not started
|
||||
GL_ARB_sample_shading not started
|
||||
GL_ARB_shader_subroutine not started
|
||||
GL_ARB_tessellation_shader not started
|
||||
GL_ARB_texture_buffer_object_rgb32 DONE (i965, softpipe)
|
||||
GL_ARB_texture_cube_map_array DONE (i965, softpipe)
|
||||
GL_ARB_texture_gather started (Maxence, Chris)
|
||||
GL_ARB_transform_feedback2 DONE
|
||||
GL_ARB_transform_feedback3 DONE
|
||||
|
||||
|
||||
GL 4.1:
|
||||
|
||||
GLSL 4.1 not started
|
||||
GL_ARB_ES2_compatibility DONE (i965, nv50, nvc0, r300, r600, radeonsi)
|
||||
GL_ARB_get_program_binary DONE (0 binary formats)
|
||||
GL_ARB_separate_shader_objects started (Ian Romanick, Gregory Hainaut)
|
||||
GL_ARB_shader_precision not started
|
||||
GL_ARB_vertex_attrib_64bit not started
|
||||
GL_ARB_viewport_array DONE (i965)
|
||||
GLSL 4.1 not started
|
||||
GL_ARB_ES2_compatibility DONE (i965, r300, r600)
|
||||
GL_ARB_get_program_binary DONE (0 binary formats)
|
||||
GL_ARB_separate_shader_objects some infrastructure done
|
||||
GL_ARB_shader_precision not started
|
||||
GL_ARB_vertex_attrib_64bit not started
|
||||
GL_ARB_viewport_array not started
|
||||
|
||||
|
||||
GL 4.2:
|
||||
|
||||
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 DONE (i965)
|
||||
GL_ARB_texture_storage DONE (all drivers)
|
||||
GL_ARB_transform_feedback_instanced DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_shader_image_load_store in progress (curro)
|
||||
GL_ARB_conservative_depth DONE (all drivers that support GLSL 1.30)
|
||||
GL_ARB_shading_language_420pack DONE (all drivers that support GLSL 1.30)
|
||||
GL_ARB_internalformat_query DONE (i965, nv50, nvc0, r300, r600, radeonsi)
|
||||
GL_ARB_map_buffer_alignment DONE (all drivers)
|
||||
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 (i965, r300, r600, swrast, gallium)
|
||||
GL_ARB_transform_feedback_instanced DONE
|
||||
GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_shader_image_load_store not started
|
||||
GL_ARB_conservative_depth DONE (softpipe)
|
||||
GL_ARB_shading_language_420pack started (Todd)
|
||||
GL_ARB_internalformat_query DONE (i965, gallium)
|
||||
GL_ARB_map_buffer_alignment DONE (r300, r600, radeonsi)
|
||||
|
||||
|
||||
GL 4.3:
|
||||
|
||||
GLSL 4.3 not started
|
||||
GL_ARB_arrays_of_arrays started
|
||||
GL_ARB_ES3_compatibility DONE (i965)
|
||||
GL_ARB_clear_buffer_object DONE (all drivers)
|
||||
GL_ARB_compute_shader started (Paul Berry)
|
||||
GL_ARB_copy_image not started
|
||||
GL_KHR_debug DONE (all drivers)
|
||||
GL_ARB_explicit_uniform_location not started
|
||||
GL_ARB_fragment_layer_viewport not started
|
||||
GL_ARB_framebuffer_no_attachments not started
|
||||
GL_ARB_internalformat_query2 not started
|
||||
GL_ARB_invalidate_subdata DONE (all drivers)
|
||||
GL_ARB_multi_draw_indirect DONE (i965)
|
||||
GL_ARB_program_interface_query not started
|
||||
GL_ARB_robust_buffer_access_behavior not started
|
||||
GL_ARB_shader_image_size not started
|
||||
GL_ARB_shader_storage_buffer_object not started
|
||||
GL_ARB_stencil_texturing not started
|
||||
GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi)
|
||||
GL_ARB_texture_query_levels DONE (i965)
|
||||
GL_ARB_texture_storage_multisample DONE (all drivers that support GL_ARB_texture_multisample)
|
||||
GL_ARB_texture_view started (Courtney Goeltzenleuchter, Chris Forbes)
|
||||
GL_ARB_vertex_attrib_binding DONE (all drivers)
|
||||
|
||||
|
||||
GL 4.4:
|
||||
|
||||
GLSL 4.4 not started
|
||||
GL_MAX_VERTEX_ATTRIB_STRIDE not started
|
||||
GL_ARB_buffer_storage not started
|
||||
GL_ARB_clear_texture not started
|
||||
GL_ARB_enhanced_layouts not started
|
||||
GL_ARB_multi_bind started (Fredrik Höglund)
|
||||
GL_ARB_query_buffer_object not started
|
||||
GL_ARB_texture_mirror_clamp_to_edge DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast)
|
||||
GL_ARB_texture_stencil8 not started
|
||||
GL_ARB_vertex_type_10f_11f_11f_rev DONE (i965, r600)
|
||||
GLSL 4.3 not started
|
||||
ARB_arrays_of_arrays not started
|
||||
ARB_ES3_compatibility DONE (i965)
|
||||
ARB_clear_buffer_object not started
|
||||
ARB_compute_shader started (gallium)
|
||||
ARB_copy_image not started
|
||||
KHR_debug some work done (ARB_debug_output)
|
||||
ARB_explicit_uniform_location not started
|
||||
ARB_fragment_layer_viewport not started
|
||||
ARB_framebuffer_no_attachments not started
|
||||
ARB_internalformat_query2 not started
|
||||
ARB_invalidate_subdata not started
|
||||
ARB_multi_draw_indirect not started
|
||||
ARB_program_interface_query not started
|
||||
ARB_robust_buffer_access_behavior not started
|
||||
ARB_shader_image_size not started
|
||||
ARB_shader_storage_buffer_object not started
|
||||
ARB_stencil_texturing not started
|
||||
ARB_texture_buffer_range DONE (nv50, nvc0)
|
||||
ARB_texture_query_levels not started
|
||||
ARB_texture_storage_multisample DONE (i965)
|
||||
ARB_texture_view not started
|
||||
ARB_vertex_attrib_binding not started
|
||||
|
||||
|
||||
More info about these features and the work involved can be found at
|
||||
|
256
docs/README.CYGWIN
Normal file
256
docs/README.CYGWIN
Normal file
@@ -0,0 +1,256 @@
|
||||
|
||||
Mesa Cygwin/X11 Information
|
||||
|
||||
|
||||
WARNING
|
||||
=======
|
||||
|
||||
If you installed X11 (packages xorg-x11-devel and xorg-x11-bin-dlls ) with the
|
||||
latest setup.exe from Cygwin the GL (Mesa) libraries and include are already
|
||||
installed in /usr/X11R6.
|
||||
|
||||
The following will explain how to "replace" them.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
How to compile Mesa on Cygwin/X11 systems:
|
||||
|
||||
1. Shared libs:
|
||||
type 'make cygwin-sl'.
|
||||
|
||||
When finished, the Mesa DLL will be in the Mesa-x.y/lib/ and
|
||||
Mesa-x.y/bin directories.
|
||||
|
||||
|
||||
2. Static libs:
|
||||
type 'make cygwin-static'.
|
||||
When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory.
|
||||
|
||||
Header and library files:
|
||||
After you've compiled Mesa and tried the demos I recommend the following
|
||||
procedure for "installing" Mesa.
|
||||
|
||||
Copy the Mesa include/GL directory to /usr/X11R6/include:
|
||||
cp -a include/GL /usr/X11R6/include
|
||||
|
||||
Copy the Mesa library files to /usr/X11R6/lib:
|
||||
cp -a lib/* /usr/X11R6ocal/lib
|
||||
|
||||
Copy the Mesa bin files (used by the DLL stuff) to /usr/X11R6/bin:
|
||||
cp -a lib/cyg* /usr/X11R6/bin
|
||||
|
||||
Xt/Motif widgets:
|
||||
If you want to use Mesa or OpenGL in your Xt/Motif program you can build
|
||||
the widgets found in either the widgets-mesa or widgets-sgi directories.
|
||||
The former were written for Mesa and the later are the original SGI
|
||||
widgets. Look in those directories for more information.
|
||||
For the Motif widgets you must have downloaded the lesstif package.
|
||||
|
||||
|
||||
Using the library
|
||||
=================
|
||||
|
||||
Configuration options:
|
||||
The file src/mesa/main/config.h has many parameters which you can adjust
|
||||
such as maximum number of lights, clipping planes, maximum texture size,
|
||||
etc. In particular, you may want to change DEPTH_BITS from 16 to 32
|
||||
if a 16-bit depth buffer isn't precise enough for your application.
|
||||
|
||||
|
||||
Shared libraries:
|
||||
If you compile shared libraries (Win32 DLLS) you may have to set an
|
||||
environment variable to specify where the Mesa libraries are located.
|
||||
Set the PATH variable to include /your-dir/Mesa-2.6/bin.
|
||||
Otherwise, when you try to run a demo it may fail with a message saying
|
||||
that one or more DLL couldn't be found.
|
||||
|
||||
|
||||
Xt/Motif Widgets:
|
||||
Two versions of the Xt/Motif OpenGL drawing area widgets are included:
|
||||
|
||||
widgets-sgi/ SGI's stock widgets
|
||||
widgets-mesa/ Mesa-tuned widgets
|
||||
|
||||
Look in those directories for details
|
||||
|
||||
|
||||
Togl:
|
||||
Togl is an OpenGL/Mesa widget for Tcl/Tk.
|
||||
See http://togl.sourceforge.net for more information.
|
||||
|
||||
|
||||
|
||||
X Display Modes:
|
||||
Mesa supports RGB(A) rendering into almost any X visual type and depth.
|
||||
|
||||
The glXChooseVisual function tries its best to pick an appropriate visual
|
||||
for the given attribute list. However, if this doesn't suit your needs
|
||||
you can force Mesa to use any X visual you want (any supported by your
|
||||
X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL
|
||||
environment variables. When an RGB visual is requested, glXChooseVisual
|
||||
will first look if the MESA_RGB_VISUAL variable is defined. If so, it
|
||||
will try to use the specified visual. Similarly, when a color index
|
||||
visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL
|
||||
variable.
|
||||
|
||||
The format of accepted values is: <visual-class> <depth>
|
||||
Here are some examples:
|
||||
|
||||
using the C-shell:
|
||||
% setenv MESA_RGB_VISUAL "TrueColor 8" // 8-bit TrueColor
|
||||
% setenv MESA_CI_VISUAL "PseudoColor 12" // 12-bit PseudoColor
|
||||
% setenv MESA_RGB_VISUAL "PseudoColor 8" // 8-bit PseudoColor
|
||||
|
||||
using the KornShell:
|
||||
$ export MESA_RGB_VISUAL="TrueColor 8"
|
||||
$ export MESA_CI_VISUAL="PseudoColor 12"
|
||||
$ export MESA_RGB_VISUAL="PseudoColor 8"
|
||||
|
||||
|
||||
Double buffering:
|
||||
Mesa can use either an X Pixmap or XImage as the backbuffer when in
|
||||
double buffer mode. Using GLX, the default is to use an XImage. The
|
||||
MESA_BACK_BUFFER environment variable can override this. The valid
|
||||
values for MESA_BACK_BUFFER are: Pixmap and XImage (only the first
|
||||
letter is checked, case doesn't matter).
|
||||
|
||||
A pixmap is faster when drawing simple lines and polygons while an
|
||||
XImage is faster when Mesa has to do pixel-by-pixel rendering. If you
|
||||
need depth buffering the XImage will almost surely be faster. Exper-
|
||||
iment with the MESA_BACK_BUFFER variable to see which is faster for
|
||||
your application.
|
||||
|
||||
|
||||
Colormaps:
|
||||
When using Mesa directly or with GLX, it's up to the application writer
|
||||
to create a window with an appropriate colormap. The aux, tk, and GLUT
|
||||
toolkits try to minimize colormap "flashing" by sharing colormaps when
|
||||
possible. Specifically, if the visual and depth of the window matches
|
||||
that of the root window, the root window's colormap will be shared by
|
||||
the Mesa window. Otherwise, a new, private colormap will be allocated.
|
||||
|
||||
When sharing the root colormap, Mesa may be unable to allocate the colors
|
||||
it needs, resulting in poor color quality. This can happen when a
|
||||
large number of colorcells in the root colormap are already allocated.
|
||||
To prevent colormap sharing in aux, tk and GLUT, define the environment
|
||||
variable MESA_PRIVATE_CMAP. The value isn't significant.
|
||||
|
||||
|
||||
Gamma correction:
|
||||
To compensate for the nonlinear relationship between pixel values
|
||||
and displayed intensities, there is a gamma correction feature in
|
||||
Mesa. Some systems, such as Silicon Graphics, support gamma
|
||||
correction in hardware (man gamma) so you won't need to use Mesa's
|
||||
gamma facility. Other systems, however, may need gamma adjustment
|
||||
to produce images which look correct. If in the past you thought
|
||||
Mesa's images were too dim, read on.
|
||||
|
||||
Gamma correction is controlled with the MESA_GAMMA environment
|
||||
variable. Its value is of the form "Gr Gg Gb" or just "G" where
|
||||
Gr is the red gamma value, Gg is the green gamma value, Gb is the
|
||||
blue gamma value and G is one gamma value to use for all three
|
||||
channels. Each value is a positive real number typically in the
|
||||
range 1.0 to 2.5. The defaults are all 1.0, effectively disabling
|
||||
gamma correction. Examples using csh:
|
||||
|
||||
% setenv MESA_GAMMA "2.3 2.2 2.4" // separate R,G,B values
|
||||
% setenv MESA_GAMMA "2.0" // same gamma for R,G,B
|
||||
|
||||
The demos/gamma.c program may help you to determine reasonable gamma
|
||||
value for your display. With correct gamma values, the color intensities
|
||||
displayed in the top row (drawn by dithering) should nearly match those
|
||||
in the bottom row (drawn as grays).
|
||||
|
||||
Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well
|
||||
on HP displays using the HP-ColorRecovery technology.
|
||||
|
||||
Mesa implements gamma correction with a lookup table which translates
|
||||
a "linear" pixel value to a gamma-corrected pixel value. There is a
|
||||
small performance penalty. Gamma correction only works in RGB mode.
|
||||
Also be aware that pixel values read back from the frame buffer will
|
||||
not be "un-corrected" so glReadPixels may not return the same data
|
||||
drawn with glDrawPixels.
|
||||
|
||||
For more information about gamma correction see:
|
||||
http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html
|
||||
|
||||
|
||||
Overlay Planes
|
||||
|
||||
Overlay planes in the frame buffer are supported by Mesa but require
|
||||
hardware and X server support. To determine if your X server has
|
||||
overlay support you can test for the SERVER_OVERLAY_VISUALS property:
|
||||
|
||||
xprop -root | grep SERVER_OVERLAY_VISUALS
|
||||
|
||||
|
||||
HPCR glClear(GL_COLOR_BUFFER_BIT) dithering
|
||||
|
||||
If you set the MESA_HPCR_CLEAR environment variable then dithering
|
||||
will be used when clearing the color buffer. This is only applicable
|
||||
to HP systems with the HPCR (Color Recovery) system.
|
||||
|
||||
|
||||
Extensions
|
||||
==========
|
||||
There are three Mesa-specific GLX extensions at this time.
|
||||
|
||||
GLX_MESA_pixmap_colormap
|
||||
|
||||
This extension adds the GLX function:
|
||||
|
||||
GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
|
||||
Pixmap pixmap, Colormap cmap )
|
||||
|
||||
It is an alternative to the standard glXCreateGLXPixmap() function.
|
||||
Since Mesa supports RGB rendering into any X visual, not just True-
|
||||
Color or DirectColor, Mesa needs colormap information to convert RGB
|
||||
values into pixel values. An X window carries this information but a
|
||||
pixmap does not. This function associates a colormap to a GLX pixmap.
|
||||
See the xdemos/glxpixmap.c file for an example of how to use this
|
||||
extension.
|
||||
|
||||
GLX_MESA_release_buffers
|
||||
|
||||
Mesa associates a set of ancillary (depth, accumulation, stencil and
|
||||
alpha) buffers with each X window it draws into. These ancillary
|
||||
buffers are allocated for each X window the first time the X window
|
||||
is passed to glXMakeCurrent(). Mesa, however, can't detect when an
|
||||
X window has been destroyed in order to free the ancillary buffers.
|
||||
|
||||
The best it can do is to check for recently destroyed windows whenever
|
||||
the client calls the glXCreateContext() or glXDestroyContext()
|
||||
functions. This may not be sufficient in all situations though.
|
||||
|
||||
The GLX_MESA_release_buffers extension allows a client to explicitly
|
||||
deallocate the ancillary buffers by calling glxReleaseBuffersMESA()
|
||||
just before an X window is destroyed. For example:
|
||||
|
||||
#ifdef GLX_MESA_release_buffers
|
||||
glXReleaseBuffersMESA( dpy, window );
|
||||
#endif
|
||||
XDestroyWindow( dpy, window );
|
||||
|
||||
This extension is new in Mesa 2.0.
|
||||
|
||||
GLX_MESA_copy_sub_buffer
|
||||
|
||||
This extension adds the glXCopySubBufferMESA() function. It works
|
||||
like glXSwapBuffers() but only copies a sub-region of the window
|
||||
instead of the whole window.
|
||||
|
||||
This extension is new in Mesa version 2.6
|
||||
|
||||
|
||||
|
||||
Summary of X-related environment variables:
|
||||
MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
|
||||
MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
|
||||
MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
|
||||
MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
|
||||
MESA_GAMMA - gamma correction coefficients (X only)
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
README.CYGWIN - lassauge April 2004 - based on README.X11
|
102
docs/README.MITS
Normal file
102
docs/README.MITS
Normal file
@@ -0,0 +1,102 @@
|
||||
|
||||
Mesa 3.0 MITS Information
|
||||
|
||||
|
||||
This software is distributed under the terms of the GNU Library
|
||||
General Public License, see the LICENSE file for details.
|
||||
|
||||
|
||||
This document is a preliminary introduction to help you get
|
||||
started. For more detaile information consult the web page.
|
||||
|
||||
http://10-dencies.zkm.de/~mesa/
|
||||
|
||||
|
||||
|
||||
Version 0.1 (Yes it's very alpha code so be warned!)
|
||||
Contributors:
|
||||
Emil Briggs (briggs@bucky.physics.ncsu.edu)
|
||||
David Bucciarelli (tech.hmw@plus.it)
|
||||
Andreas Schiffler (schiffler@zkm.de)
|
||||
|
||||
|
||||
|
||||
1. Requirements:
|
||||
Mesa 3.0.
|
||||
An SMP capable machine running Linux 2.x
|
||||
libpthread installed on your machine.
|
||||
|
||||
|
||||
2. What does MITS stand for?
|
||||
MITS stands for Mesa Internal Threading System. By adding
|
||||
internal threading to Mesa it should be possible to improve
|
||||
performance of OpenGL applications on SMP machines.
|
||||
|
||||
|
||||
3. Do applications have to be recoded to take advantage of MITS?
|
||||
No. The threading is internal to Mesa and transparent to
|
||||
applications.
|
||||
|
||||
|
||||
4. Will all applications benefit from the current implementation of MITS?
|
||||
No. This implementation splits the processing of the vertex buffer
|
||||
over two threads. There is a certain amount of overhead involved
|
||||
with the thread synchronization and if there is not enough work
|
||||
to be done the extra overhead outweighs any speedup from using
|
||||
dual processors. You will not for example see any speedup when
|
||||
running Quake because it uses GL_POLYGON and there is only one
|
||||
polygon for each vertex buffer processed. Test results on a
|
||||
dual 200 Mhz. Pentium Pro system show that one needs around
|
||||
100-200 vertices in the vertex buffer before any there is any
|
||||
appreciable benefit from the threading.
|
||||
|
||||
|
||||
5. Are there any parameters that I can tune to try to improve performance.
|
||||
Yes. You can try to vary the size of the vertex buffer which is
|
||||
define in VB_MAX located in the file src/vb.h from your top level
|
||||
Mesa distribution. The number needs to be a multiple of 12 and
|
||||
the optimum value will probably depend on the capabilities of
|
||||
your machine and the particular application you are running.
|
||||
|
||||
|
||||
6. Are there any ways I can modify the application to improve its
|
||||
performance with the MITS?
|
||||
Yes. Try to use as many vertices between each Begin/End pair
|
||||
as possbile. This will reduce the thread synchronization
|
||||
overhead.
|
||||
|
||||
|
||||
7. What sort of speedups can I expect?
|
||||
On some benchmarks performance gains of up to 30% have been
|
||||
observerd. Others may see no gain at all and in a few rare
|
||||
cases even some degradation.
|
||||
|
||||
|
||||
8. What still needs to be done?
|
||||
Lots of testing and benchmarking.
|
||||
A portable implementation that works within the Mesa thread API.
|
||||
Threading of additional areas of Mesa to improve performance
|
||||
even more.
|
||||
|
||||
|
||||
|
||||
Installation:
|
||||
|
||||
1. This assumes that you already have a working Mesa 3.0 installation
|
||||
from source.
|
||||
2. Place the tarball MITS.tar.gz in your top level Mesa directory.
|
||||
3. Unzip it and untar it. It will replace the following files in
|
||||
your Mesa source tree so back them up if you want to save them.
|
||||
|
||||
|
||||
README.MITS
|
||||
Make-config
|
||||
Makefile
|
||||
mklib.glide
|
||||
src/vbxform.c
|
||||
src/vb.h
|
||||
|
||||
4. Rebuild Mesa using the command
|
||||
|
||||
make linux-386-glide-mits
|
||||
|
207
docs/README.QUAKE
Normal file
207
docs/README.QUAKE
Normal file
@@ -0,0 +1,207 @@
|
||||
|
||||
Info on using Mesa 3.0 with Linux Quake I and Quake II
|
||||
|
||||
|
||||
|
||||
Disclaimer
|
||||
----------
|
||||
|
||||
I am _not_ a Quake expert by any means. I pretty much only run it to
|
||||
test Mesa. There have been a lot of questions about Linux Quake and
|
||||
Mesa so I'm trying to provide some useful info here. If this file
|
||||
doesn't help you then you should look elsewhere for help. The Mesa
|
||||
mailing list or the news://news.3dfx.com/3dfx.linux.glide newsgroup
|
||||
might be good.
|
||||
|
||||
Again, all the information I have is in this file. Please don't email
|
||||
me with questions.
|
||||
|
||||
If you have information to contribute to this file please send it to
|
||||
me at brianp@elastic.avid.com
|
||||
|
||||
|
||||
|
||||
Linux Quake
|
||||
-----------
|
||||
|
||||
You can get Linux Quake from http://www.idsoftware.com/
|
||||
|
||||
Quake I and II for Linux were tested with, and include, Mesa 2.6. You
|
||||
shouldn't have too many problems if you simply follow the instructions
|
||||
in the Quake distribution.
|
||||
|
||||
|
||||
|
||||
RedHat 5.0 Linux problems
|
||||
-------------------------
|
||||
|
||||
RedHat Linux 5.x uses the GNU C library ("glibc" or "libc6") whereas
|
||||
previous RedHat and other Linux distributions use "libc5" for its
|
||||
runtime C library.
|
||||
|
||||
Linux Quake I and II were compiled for libc5. If you compile Mesa
|
||||
on a RedHat 5.x system the resulting libMesaGL.so file will not work
|
||||
with Linux Quake because of the different C runtime libraries.
|
||||
The symptom of this is a segmentation fault soon after starting Quake.
|
||||
|
||||
If you want to use a newer version of Mesa (like 3.x) with Quake on
|
||||
RedHat 5.x then read on.
|
||||
|
||||
The solution to the C library problem is to force Mesa to use libc5.
|
||||
libc5 is in /usr/i486-linux-libc5/lib on RedHat 5.x systems.
|
||||
|
||||
Emil Briggs (briggs@tick.physics.ncsu.edu) nicely gave me the following
|
||||
info:
|
||||
|
||||
> I only know what works on a RedHat 5.0 distribution. RH5 includes
|
||||
> a full set of libraries for both libc5 and glibc. The loader ld.so
|
||||
> uses the libc5 libraries in /usr/i486-linux-libc5/lib for programs
|
||||
> linked against libc5 while it uses the glibc libraries in /lib and
|
||||
> /usr/lib for programs linked against glibc.
|
||||
>
|
||||
> Anyway I changed line 41 of mklib.glide to
|
||||
> GLIDELIBS="-L/usr/local/glide/lib -lglide2x -L/usr/i486-linux-libc5/lib"
|
||||
>
|
||||
> And I started quake2 up with a script like this
|
||||
> #!/bin/csh
|
||||
> setenv LD_LIBRARY_PATH /usr/i486-linux-libc5/lib
|
||||
> setenv MESA_GLX_FX f
|
||||
> ./quake2 +set vid_ref gl
|
||||
> kbd_mode -a
|
||||
> reset
|
||||
|
||||
|
||||
I've already patched the mklib.glide file. You'll have to start Quake
|
||||
with the script shown above though.
|
||||
|
||||
|
||||
|
||||
**********************
|
||||
|
||||
Daryll Strauss writes:
|
||||
|
||||
Here's my thoughts on the problem. On a RH 5.x system, you can NOT build
|
||||
a libc5 executable or library. Red Hat just doesn't include the right
|
||||
stuff to do it.
|
||||
|
||||
Since Quake is a libc5 based application, you are in trouble. You need
|
||||
libc5 libraries.
|
||||
|
||||
What can you do about it? Well there's a package called gcc5 that does
|
||||
MOST of the right stuff to compile with libc5. (It brings back older
|
||||
header files, makes appropriate symbolic links for libraries, and sets
|
||||
up the compiler to use the correct directories) You can find gcc5 here:
|
||||
ftp://ecg.mit.edu/pub/linux/gcc5-1.0-1.i386.rpm
|
||||
|
||||
No, this isn't quite enough. There are still a few tricks to getting
|
||||
Mesa to compile as a libc5 application. First you have to make sure that
|
||||
every compile uses gcc5 instead of gcc. Second, in some cases the link
|
||||
line actually lists -L/usr/lib which breaks gcc5 (because it forces you
|
||||
to use the glibc version of things)
|
||||
|
||||
If you get all the stuff correctly compiled with gcc5 it should work.
|
||||
I've run Mesa 3.0B6 and its demos in a window with my Rush on a Red Hat
|
||||
5.1 system. It is a big hassle, but it can be done. I've only made Quake
|
||||
segfault, but I think that's from my libRush using the wrong libc.
|
||||
|
||||
Yes, mixing libc5 and glibc is a major pain. I've been working to get
|
||||
all my libraries compiling correctly with this setup. Someone should
|
||||
make an RPM out of it and feed changes back to Brian once they get it
|
||||
all working. If no one else has done so by the time I get the rest of my
|
||||
stuff straightened out, I'll try to do it myself.
|
||||
|
||||
- |Daryll
|
||||
|
||||
|
||||
|
||||
*********************
|
||||
|
||||
David Bucciarelli (tech.hmw@plus.it) writes:
|
||||
|
||||
I'm using the Mesa-3.0beta7 and the RedHat 5.1 and QuakeII is
|
||||
working fine for me. I had only to make a small change to the
|
||||
Mesa-3.0/mklib.glide file, from:
|
||||
|
||||
|
||||
GLIDELIBS="-L/usr/local/glide/lib -lglide2x
|
||||
-L/usr/i486-linux-libc5/lib -lm"
|
||||
|
||||
to:
|
||||
|
||||
GLIDELIBS="-L/usr/i486-linux-libc5/lib -lglide2x"
|
||||
|
||||
and to make two symbolic links:
|
||||
|
||||
[david@localhost Mesa]$ ln -s libMesaGL.so libMesaGL.so.2
|
||||
[david@localhost Mesa]$ ln -s libMesaGLU.so libMesaGLU.so.2
|
||||
|
||||
I'm using the Daryll's Linux glide rpm for the Voodoo2 and glibc (it
|
||||
includes also the Glide for the libc5). I'm not using the /dev/3Dfx and
|
||||
running QuakeII as root with the following env. var:
|
||||
|
||||
export
|
||||
LD_LIBRARY_PATH=/dsk1/home/david/src/gl/Mesa/lib:/usr/i486-linux-libc5/lib
|
||||
|
||||
I think that all problems are related to the glibc, Quake will never
|
||||
work if you get the following output:
|
||||
|
||||
[david@localhost Mesa]$ ldd lib/libMesaGL.so
|
||||
libglide2x.so => /usr/lib/libglide2x.so (0x400f8000)
|
||||
libm.so.6 => /lib/libm.so.6 (0x40244000)
|
||||
libc.so.6 => /lib/libc.so.6 (0x4025d000)
|
||||
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
|
||||
|
||||
You must get the following outputs:
|
||||
|
||||
[david@localhost Mesa]# ldd lib/libMesaGL.so
|
||||
libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so
|
||||
(0x400f3000)
|
||||
|
||||
[root@localhost quake2]# ldd quake2
|
||||
libdl.so.1 => /lib/libdl.so.1 (0x40005000)
|
||||
libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x40008000)
|
||||
libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x40010000)
|
||||
|
||||
[root@localhost quake2]# ldd ref_gl.so
|
||||
libMesaGL.so.2 =>
|
||||
/dsk1/home/david/src/gl/Mesa/lib/libMesaGL.so.2 (0x400eb000)
|
||||
libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so
|
||||
(0x401d9000)
|
||||
libX11.so.6 => /usr/i486-linux-libc5/lib/libX11.so.6
|
||||
(0x40324000)
|
||||
libXext.so.6 => /usr/i486-linux-libc5/lib/libXext.so.6
|
||||
(0x403b7000)
|
||||
libvga.so.1 => /usr/i486-linux-libc5/lib/libvga.so.1
|
||||
(0x403c1000)
|
||||
libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x403f5000)
|
||||
libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x403fd000)
|
||||
|
||||
|
||||
***********************
|
||||
|
||||
Steve Davies (steve@one47.demon.co.uk) writes:
|
||||
|
||||
|
||||
Try using:
|
||||
|
||||
export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib
|
||||
./quake2 +set vid_ref gl
|
||||
|
||||
to start the game... Works for me, but assumes that you have the
|
||||
compatability libc5 RPMs installed.
|
||||
|
||||
|
||||
***************************
|
||||
|
||||
WWW resources - you may find additional Linux Quake help at these URLs:
|
||||
|
||||
|
||||
http://quake.medina.net/howto
|
||||
|
||||
http://webpages.mr.net/bobz
|
||||
|
||||
http://www.linuxgames.com/quake2/
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
52
docs/README.THREADS
Normal file
52
docs/README.THREADS
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
|
||||
Mesa Threads README
|
||||
-------------------
|
||||
|
||||
Thread safety was introduced in Mesa 2.6 by John Stone and
|
||||
Christoph Poliwoda.
|
||||
|
||||
It was redesigned in Mesa 3.3 so that thread safety is
|
||||
supported by default (on systems which support threads,
|
||||
that is). There is no measurable penalty on single
|
||||
threaded applications.
|
||||
|
||||
NOTE that the only _driver_ which is thread safe at this time
|
||||
is the OS/Mesa driver!
|
||||
|
||||
|
||||
At present the mthreads code supports three thread APIS:
|
||||
1) POSIX threads (aka pthreads).
|
||||
2) Solaris / Unix International threads.
|
||||
3) Win32 threads (Win 95/NT).
|
||||
|
||||
Support for other thread libraries can be added src/glthread.[ch]
|
||||
|
||||
|
||||
In order to guarantee proper operation, it is
|
||||
necessary for both Mesa and application code to use the same threads API.
|
||||
So, if your application uses Sun's thread API, then you should build Mesa
|
||||
using one of the targets for Sun threads.
|
||||
|
||||
The mtdemos directory contains some example programs which use
|
||||
multiple threads to render to osmesa rendering context(s).
|
||||
|
||||
Linux users should be aware that there exist many different POSIX
|
||||
threads packages. The best solution is the linuxthreads package
|
||||
(http://pauillac.inria.fr/~xleroy/linuxthreads/) as this package is the
|
||||
only one that really supports multiprocessor machines (AFAIK). See
|
||||
http://pauillac.inria.fr/~xleroy/linuxthreads/README for further
|
||||
information about the usage of linuxthreads.
|
||||
|
||||
If you are interested in helping with thread safety work in Mesa
|
||||
join the Mesa developers mailing list and post your proposal.
|
||||
|
||||
|
||||
Regards,
|
||||
John Stone -- j.stone@acm.org johns@cs.umr.edu
|
||||
Christoph Poliwoda -- poliwoda@volumegraphics.com
|
||||
|
||||
|
||||
Version info:
|
||||
Mesa 2.6 - initial thread support.
|
||||
Mesa 3.3 - thread support mostly rewritten (Brian Paul)
|
@@ -123,6 +123,24 @@ directories.</p>
|
||||
There are also a few general options for altering the Mesa build:
|
||||
</p>
|
||||
<dl>
|
||||
<dt><code>--with-x</code></dt>
|
||||
<dd><p>When the X11 development libraries are
|
||||
needed, the <code>pkg-config</code> utility <a href="#pkg-config">will
|
||||
be used</a> for locating them. If they cannot be found through
|
||||
<code>pkg-config</code> a fallback routing using <code>imake</code> will
|
||||
be used. In this case, the <code>--with-x</code>,
|
||||
<code>--x-includes</code> and <code>--x-libraries</code> options can
|
||||
control the use of X for Mesa.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>--enable-gl-osmesa</code></dt>
|
||||
<dd><p>The <a href="osmesa.html">OSMesa
|
||||
library</a> can be built on top of libGL for drivers that provide it.
|
||||
This option controls whether to build libOSMesa. By default, this is
|
||||
enabled for the Xlib driver and disabled otherwise. Note that this
|
||||
option is different than using OSMesa as the driver.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>--enable-debug</code></dt>
|
||||
<dd><p>This option will enable compiler
|
||||
options and macros to aid in debugging the Mesa libraries.</p>
|
||||
@@ -137,12 +155,12 @@ assembly will not be used.</p>
|
||||
|
||||
<dt><code>--enable-32-bit</code></dt>
|
||||
<dt><code>--enable-64-bit</code></dt>
|
||||
<dd><p>By default, the build will compile code as directed by the environment
|
||||
variables
|
||||
<dd><p>By default, the
|
||||
build will compile code as directed by the environment variables
|
||||
<code>CC</code>, <code>CFLAGS</code>, etc. If the compiler is
|
||||
<code>gcc</code>, these options offer a helper to add the compiler flags
|
||||
to force 32- or 64-bit code generation as used on the x86 and x86_64
|
||||
architectures. Note that these options are mutually exclusive.</p>
|
||||
architectures.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@@ -153,19 +171,19 @@ architectures. Note that these options are mutually exclusive.</p>
|
||||
There are several different driver modes that Mesa can use. These are
|
||||
described in more detail in the <a href="install.html">basic
|
||||
installation instructions</a>. The Mesa driver is controlled through the
|
||||
configure options <code>--enable-xlib-glx</code>, <code>--enable-osmesa</code>,
|
||||
and <code>--enable-dri</code>.
|
||||
configure option --with-driver. There are currently three supported
|
||||
options in the configure script.
|
||||
</p>
|
||||
|
||||
<h3 id="xlib">Xlib</h3><p>
|
||||
<h3 id="xlib">Xlib</h3><p>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>--enable-xlib-glx</code>. The libX11 and libXext
|
||||
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.
|
||||
|
||||
<h3 id="dri">DRI</h3><p>This mode uses the DRI hardware drivers for
|
||||
accelerated OpenGL rendering. Enable the DRI drivers with the option
|
||||
<code>--enable-dri</code>. See the <a href="install.html">basic
|
||||
<code>--with-driver=dri</code>. See the <a href="install.html">basic
|
||||
installation instructions</a> for details on prerequisites for the DRI
|
||||
drivers.
|
||||
|
||||
@@ -205,8 +223,7 @@ and <code>/usr/local/lib</code>, respectively.
|
||||
<h3 id="osmesa">OSMesa </h3><p> 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. It corresponds to the option
|
||||
<code>--enable-osmesa</code>.
|
||||
page for more details.
|
||||
|
||||
<!-- OSMesa specific options -->
|
||||
<dl>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
<p>
|
||||
The SGI OpenGL conformance tests verify correct operation of OpenGL
|
||||
implementations. I, Brian Paul, have been given a copy of the tests
|
||||
for testing Mesa. The tests are not publicly available.
|
||||
for testing Mesa. The tests are not publically available.
|
||||
</p>
|
||||
<p>
|
||||
This file has the latest results of testing Mesa with the OpenGL 1.2
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<h1>Development Notes</h1>
|
||||
|
||||
|
||||
<h2>Adding Extensions</h2>
|
||||
<h2>Adding Extentions</h2>
|
||||
|
||||
<p>
|
||||
To add a new GL extension to Mesa you have to do at least the following.
|
||||
@@ -36,7 +36,7 @@ To add a new GL extension to Mesa you have to do at least the following.
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
In the src/mapi/glapi/gen/ directory, add the new extension functions and
|
||||
In the src/mesa/glapi/ directory, add the new extension functions and
|
||||
enums to the gl_API.xml file.
|
||||
Then, a bunch of source files must be regenerated by executing the
|
||||
corresponding Python scripts.
|
||||
@@ -155,29 +155,6 @@ of <tt>bool</tt>, <tt>true</tt>, and
|
||||
src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.
|
||||
</p>
|
||||
|
||||
<h2>Submitting patches</h2>
|
||||
|
||||
<p>
|
||||
You should always run the Mesa Testsuite before submitting patches.
|
||||
The Testsuite can be run using the 'make check' command. All tests
|
||||
must pass before patches will be accepted, this may mean you have
|
||||
to update the tests themselves.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Patches should be sent to the Mesa mailing list for review.
|
||||
When submitting a patch make sure to use git send-email rather than attaching
|
||||
patches to emails. Sending patches as attachments prevents people from being
|
||||
able to provide in-line review comments.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When submitting follow-up patches you can use --in-reply-to to make v2, v3,
|
||||
etc patches show up as replies to the originals. This usually works well
|
||||
when you're sending out updates to individual patches (as opposed to
|
||||
re-sending the whole series). Using --in-reply-to makes
|
||||
it harder for reviewers to accidentally review old patches.
|
||||
</p>
|
||||
|
||||
<h2>Marking a commit as a candidate for a stable branch</h2>
|
||||
|
||||
@@ -190,26 +167,11 @@ you should add an appropriate note to the commit message.
|
||||
Here are some examples of such a note:
|
||||
</p>
|
||||
<ul>
|
||||
<li>CC: <mesa-stable@lists.freedesktop.org></li>
|
||||
<li>CC: "9.2 10.0" <mesa-stable@lists.freedesktop.org></li>
|
||||
<li>CC: "10.0" <mesa-stable@lists.freedesktop.org></li>
|
||||
<li>NOTE: This is a candidate for the 9.0 branch.</li>
|
||||
<li>NOTE: This is a candidate for the 8.0 and 9.0 branches.</li>
|
||||
<li>NOTE: This is a candidate for the stable branches.</li>
|
||||
</ul>
|
||||
|
||||
Simply adding the CC to the mesa-stable list address is adequate to nominate
|
||||
the commit for the most-recently-created stable branch. It is only necessary
|
||||
to specify a specific branch name, (such as "9.2 10.0" or "10.0" in the
|
||||
examples above), if you want to nominate the commit for an older stable
|
||||
branch. And, as in these examples, you can nominate the commit for the older
|
||||
branch in addition to the more recent branch, or nominate the commit
|
||||
exclusively for the older branch.
|
||||
|
||||
This "CC" syntax for patch nomination will cause patches to automatically be
|
||||
copied to the mesa-stable@ mailing list when you use "git send-email" to send
|
||||
patches to the mesa-dev@ mailing list. Also, if you realize that a commit
|
||||
should be nominated for the stable branch after it has already been committed,
|
||||
you can send a note directly to the mesa-stable@lists.freedesktop.org where
|
||||
the Mesa stable-branch maintainers will receive it. Be sure to mention the
|
||||
commit ID of the commit of interest (as it appears in the mesa master branch).
|
||||
|
||||
<h2>Cherry-picking candidates for a stable branch</h2>
|
||||
|
||||
@@ -231,7 +193,15 @@ branch is relevant.
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Verify and update version info in VERSION</h3>
|
||||
<h3>Verify and update version info</h3>
|
||||
|
||||
<dl>
|
||||
<dt>SConstruct</dt>
|
||||
<dt>Android.common.mk</dt>
|
||||
<dd>PACKAGE_VERSION</dd>
|
||||
<dt>configure.ac</dt>
|
||||
<dd>AC_INIT</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
Create a docs/relnotes/x.y.z.html file.
|
||||
@@ -299,10 +269,10 @@ sftp USERNAME,mesa3d@web.sourceforge.net
|
||||
<p>
|
||||
Make an announcement on the mailing lists:
|
||||
|
||||
<em>mesa-dev@lists.freedesktop.org</em>,
|
||||
<em>mesa-users@lists.freedesktop.org</em>
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>d</em><em>e</em><em>v</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>,
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>u</em><em>s</em><em>e</em><em>r</em><em>s</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
|
||||
and
|
||||
<em>mesa-announce@lists.freedesktop.org</em>
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>a</em><em>n</em><em>n</em><em>o</em><em>u</em><em>n</em><em>c</em><em>e</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@@ -25,7 +25,7 @@ href="#overview">overview of Mesa's implementation</a>.</p>
|
||||
<h2>1. Complexity of GL Dispatch</h2>
|
||||
|
||||
<p>Every GL application has at least one object called a GL <em>context</em>.
|
||||
This object, which is an implicit parameter to every GL function, stores all
|
||||
This object, which is an implicit parameter to ever GL function, stores all
|
||||
of the GL related state for the application. Every texture, every buffer
|
||||
object, every enable, and much, much more is stored in the context. Since
|
||||
an application can have more than one context, the context to be used is
|
||||
@@ -51,7 +51,7 @@ example, <tt>glFogCoordf</tt> may operate differently depending on whether
|
||||
or not fog is enabled.</p>
|
||||
|
||||
<p>In multi-threaded environments, it is possible for each thread to have a
|
||||
different GL context current. This means that poor old <tt>glVertex3fv</tt>
|
||||
differnt GL context current. This means that poor old <tt>glVertex3fv</tt>
|
||||
has to know which GL context is current in the thread where it is being
|
||||
called.</p>
|
||||
|
||||
@@ -207,13 +207,13 @@ few preprocessor defines.</p>
|
||||
<li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li>
|
||||
<li>If <tt>HAVE_PTHREAD</tt> is defined, method #3 is used.</li>
|
||||
<li>If <tt>WIN32_THREADS</tt> is defined, method #2 is used.</li>
|
||||
<li>If none of the preceding are defined, method #1 is used.</li>
|
||||
<li>If none of the preceeding are defined, method #1 is used.</li>
|
||||
</ul>
|
||||
|
||||
<p>Two different techniques are used to handle the various different cases.
|
||||
On x86 and SPARC, a macro called <tt>GL_STUB</tt> is used. In the preamble
|
||||
of the assembly source file different implementations of the macro are
|
||||
selected based on the defined preprocessor variables. The assembly code
|
||||
selected based on the defined preprocessor variables. The assmebly code
|
||||
then consists of a series of invocations of the macros such as:
|
||||
|
||||
<blockquote>
|
||||
@@ -242,7 +242,7 @@ first technique, is to insert <tt>#ifdef</tt> within the assembly
|
||||
implementation of each function. This makes the assembly file considerably
|
||||
larger (e.g., 29,332 lines for <tt>glapi_x86-64.S</tt> versus 1,155 lines for
|
||||
<tt>glapi_x86.S</tt>) and causes simple changes to the function
|
||||
implementation to generate many lines of diffs. Since the assembly files
|
||||
implementation to generate many lines of diffs. Since the assmebly files
|
||||
are typically generated by scripts (see <a href="#autogen">below</a>), this
|
||||
isn't a significant problem.</p>
|
||||
|
||||
|
@@ -88,7 +88,7 @@ drivers will be installed to <code>${libdir}/egl</code>.</p>
|
||||
<dd>
|
||||
|
||||
<p>List the platforms (window systems) to support. Its argument is a comma
|
||||
separated string such as <code>--with-egl-platforms=x11,drm</code>. It decides
|
||||
seprated string such as <code>--with-egl-platforms=x11,drm</code>. It decides
|
||||
the platforms a driver may support. The first listed platform is also used by
|
||||
the main library to decide the native platform: the platform the EGL native
|
||||
types such as <code>EGLNativeDisplayType</code> or
|
||||
@@ -223,7 +223,7 @@ the X server directly using (XCB-)DRI2 protocol.</p>
|
||||
<dd>
|
||||
|
||||
<p>This driver is based on Gallium3D. It supports all rendering APIs and
|
||||
hardware supported by Gallium3D. It is the only driver that supports OpenVG.
|
||||
hardwares supported by Gallium3D. It is the only driver that supports OpenVG.
|
||||
The supported platforms are X11, DRM, FBDEV, and GDI.</p>
|
||||
|
||||
<p>This driver comes with its own hardware drivers
|
||||
@@ -273,8 +273,8 @@ longer than the display that creates them.</p>
|
||||
|
||||
<p>In EGL, when a display is terminated through <code>eglTerminate</code>, all
|
||||
display resources should be destroyed. Similarly, when a thread is released
|
||||
through <code>eglReleaseThread</code>, all current display resources should be
|
||||
released. Another way to destroy or release resources is through functions
|
||||
throught <code>eglReleaseThread</code>, all current display resources should be
|
||||
released. Another way to destory or release resources is through functions
|
||||
such as <code>eglDestroySurface</code> or <code>eglMakeCurrent</code>.</p>
|
||||
|
||||
<p>When a resource that is current to some thread is destroyed, the resource
|
||||
|
@@ -47,7 +47,7 @@ sometimes be useful for debugging end-user issues.
|
||||
<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
|
||||
<li>MESA_DEBUG - if set, error messages are printed to stderr. For example,
|
||||
if the application generates a GL_INVALID_ENUM error, a corresponding error
|
||||
message indicating where the error occurred, and possibly why, will be
|
||||
message indicating where the error occured, and possibly why, will be
|
||||
printed to stderr.<br>
|
||||
If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will
|
||||
generate exceptions.
|
||||
@@ -121,38 +121,10 @@ See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
|
||||
<h2>i945/i965 driver environment variables (non-Gallium)</h2>
|
||||
|
||||
<ul>
|
||||
<li>INTEL_NO_HW - if set to 1, prevents batches from being submitted to the hardware.
|
||||
This is useful for debugging hangs, etc.</li>
|
||||
<li>INTEL_DEBUG - a comma-separated list of named flags, which do various things:
|
||||
<ul>
|
||||
<li>tex - emit messages about textures.</li>
|
||||
<li>state - emit messages about state flag tracking</li>
|
||||
<li>blit - emit messages about blit operations</li>
|
||||
<li>miptree - emit messages about miptrees</li>
|
||||
<li>perf - emit messages about performance issues</li>
|
||||
<li>perfmon - emit messages about AMD_performance_monitor</li>
|
||||
<li>bat - emit batch information</li>
|
||||
<li>pix - emit messages about pixel operations</li>
|
||||
<li>buf - emit messages about buffer objects</li>
|
||||
<li>reg - emit messages about regions</li>
|
||||
<li>fbo - emit messages about framebuffers</li>
|
||||
<li>fs - dump shader assembly for fragment shaders</li>
|
||||
<li>gs - dump shader assembly for geometry shaders</li>
|
||||
<li>sync - emit messages about synchronization</li>
|
||||
<li>prim - emit messages about drawing primitives</li>
|
||||
<li>vert - emit messages about vertex assembly</li>
|
||||
<li>dri - emit messages about the DRI interface</li>
|
||||
<li>sf - emit messages about the strips & fans unit (for old gens, includes the SF program)</li>
|
||||
<li>stats - enable statistics counters. you probably actually want perfmon or intel_gpu_top instead.</li>
|
||||
<li>urb - emit messages about URB setup</li>
|
||||
<li>vs - dump shader assembly for vertex shaders</li>
|
||||
<li>clip - emit messages about the clip unit (for old gens, includes the CLIP program)</li>
|
||||
<li>aub - dump batches into an AUB trace for use with simulation tools</li>
|
||||
<li>shader_time - record how much GPU time is spent in each shader</li>
|
||||
<li>no16 - suppress generation of 16-wide fragment shaders. useful for debugging broken shaders</li>
|
||||
<li>blorp - emit messages about the blorp operations (blits & clears)</li>
|
||||
<li>nodualobj - suppress generation of dual-object geometry shader code</li>
|
||||
</ul>
|
||||
<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
|
||||
OpenGL conformance. If set to 2, always use software rendering.
|
||||
<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
|
||||
glCopyPixels, glDrawPixels.
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -201,14 +173,14 @@ See src/mesa/state_tracker/st_debug.c for other options.
|
||||
to stderr
|
||||
<li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
|
||||
<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
|
||||
vertex shading processing.
|
||||
vertex shading procesing.
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>LLVMpipe driver environment variables</h3>
|
||||
<ul>
|
||||
<li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
|
||||
<li>LP_DEBUG - a comma-separated list of debug options is accepted. See the
|
||||
<li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
|
||||
source code for details.
|
||||
<li>LP_PERF - a comma-separated list of options to selectively no-op various
|
||||
parts of the driver. See the source code for details.
|
||||
|
@@ -137,7 +137,7 @@ Just follow the Mesa <a href="install.html">compilation instructions</a>.
|
||||
<h2>1.6 Are there other open-source implementations of OpenGL?</h2>
|
||||
<p>
|
||||
Yes, SGI's <a href="http://oss.sgi.com/projects/ogl-sample/index.html">
|
||||
OpenGL Sample Implementation (SI)</a> is available.
|
||||
OpenGL Sample Implemenation (SI)</a> is available.
|
||||
The SI was written during the time that OpenGL was originally designed.
|
||||
Unfortunately, development of the SI has stagnated.
|
||||
Mesa is much more up to date with modern features and extensions.
|
||||
@@ -353,7 +353,7 @@ That's where Mesa development is discussed.
|
||||
</p>
|
||||
<p>
|
||||
The <a href="http://www.opengl.org/documentation">
|
||||
OpenGL Specification</a> is the bible for OpenGL implementation work.
|
||||
OpenGL Specification</a> is the bible for OpenGL implemention work.
|
||||
You should read it.
|
||||
</p>
|
||||
<p>Most of the Mesa development work involves implementing new OpenGL
|
||||
@@ -375,7 +375,7 @@ For a Gallium3D hardware driver, the r300g, r600g and the i915g are good example
|
||||
</p>
|
||||
<p>The DRI website has more information about writing hardware drivers.
|
||||
The process isn't well document because the Mesa driver interface changes
|
||||
over time, and we seldom have spare time for writing documentation.
|
||||
over time, and we seldome have spare time for writing documentation.
|
||||
That being said, many people have managed to figure out the process.
|
||||
</p>
|
||||
<p>
|
||||
@@ -390,7 +390,7 @@ The <a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compres
|
||||
indicates that there are intellectual property (IP) and/or patent issues
|
||||
to be dealt with.
|
||||
</p>
|
||||
<p>We've been unsuccessful in getting a response from S3 (or whoever owns
|
||||
<p>We've been unsucessful in getting a response from S3 (or whoever owns
|
||||
the IP nowadays) to indicate whether or not an open source project can
|
||||
implement the extension (specifically the compression/decompression
|
||||
algorithms).
|
||||
|
@@ -16,58 +16,6 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>January 9, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.0.2.html">Mesa 10.0.2</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>December 12, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.0.1.html">Mesa 10.0.1</a>
|
||||
and <a href="relnotes/9.2.5.html">Mesa 9.2.5</a> are released.
|
||||
These are both bug-fix releases.
|
||||
</p>
|
||||
|
||||
<h2>November 30, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.0.html">Mesa 10.0</a> is released.
|
||||
This is a new development release.
|
||||
See the release notes for more information about the release.
|
||||
</p>
|
||||
|
||||
<h2>November 27, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/9.2.4.html">Mesa 9.2.4</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
<h2>November 13, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/9.2.3.html">Mesa 9.2.3</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
<h2>October 18, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/9.2.2.html">Mesa 9.2.2</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
<h2>October 4, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/9.2.1.html">Mesa 9.2.1</a> and
|
||||
<a href="relnotes/9.1.7.html">Mesa 9.1.7</a> are released,
|
||||
both bug-fix releases.
|
||||
</p>
|
||||
|
||||
<h2>August 27, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/9.2.html">Mesa 9.2</a> is released.
|
||||
This is a new development release.
|
||||
See the release notes for more information about the release.
|
||||
</p>
|
||||
|
||||
<h2>August 1, 2013</h2>
|
||||
<p>
|
||||
<a href="relnotes/9.1.6.html">Mesa 9.1.6</a> is released.
|
||||
|
@@ -103,9 +103,6 @@ Device drivers src/mesa/drivers/* MIT, generally
|
||||
|
||||
Ext headers include/GL/glext.h Khronos
|
||||
include/GL/glxext.h
|
||||
|
||||
C11 thread include/c11/threads*.h Boost (permissive)
|
||||
emulation
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
|
@@ -203,66 +203,11 @@ for posterior analysis, e.g.:
|
||||
We use LLVM-C bindings for now. They are not documented, but follow the C++
|
||||
interfaces very closely, and appear to be complete enough for code
|
||||
generation. See
|
||||
<a href="http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html">
|
||||
this stand-alone example</a>. See the llvm-c/Core.h file for reference.
|
||||
http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html
|
||||
for a stand-alone example. See the llvm-c/Core.h file for reference.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1 id="recommended_reading">Recommended Reading</h1>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>Rasterization</p>
|
||||
<ul>
|
||||
<li><a href="http://www.cs.unc.edu/~olano/papers/2dh-tri/">Triangle Scan Conversion using 2D Homogeneous Coordinates</a></li>
|
||||
<li><a href="http://www.drdobbs.com/parallel/rasterization-on-larrabee/217200602">Rasterization on Larrabee</a> (<a href="http://devmaster.net/posts/2887/rasterization-on-larrabee">DevMaster copy</a>)</li>
|
||||
<li><a href="http://devmaster.net/posts/6133/rasterization-using-half-space-functions">Rasterization using half-space functions</a></li>
|
||||
<li><a href="http://devmaster.net/posts/6145/advanced-rasterization">Advanced Rasterization</a></li>
|
||||
<li><a href="http://fgiesen.wordpress.com/2013/02/17/optimizing-sw-occlusion-culling-index/">Optimizing Software Occlusion Culling</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>Texture sampling</p>
|
||||
<ul>
|
||||
<li><a href="http://chrishecker.com/Miscellaneous_Technical_Articles#Perspective_Texture_Mapping">Perspective Texture Mapping</a></li>
|
||||
<li><a href="http://www.flipcode.com/archives/Texturing_As_In_Unreal.shtml">Texturing As In Unreal</a></li>
|
||||
<li><a href="http://www.gamasutra.com/view/feature/3301/runtime_mipmap_filtering.php">Run-Time MIP-Map Filtering</a></li>
|
||||
<li><a href="http://alt.3dcenter.org/artikel/2003/10-26_a_english.php">Will "brilinear" filtering persist?</a></li>
|
||||
<li><a href="http://ixbtlabs.com/articles2/gffx/nv40-rx800-3.html">Trilinear filtering</a></li>
|
||||
<li><a href="http://devmaster.net/posts/12785/texture-swizzling">Texture Swizzling</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>SIMD</p>
|
||||
<ul>
|
||||
<li><a href="http://www.cdl.uni-saarland.de/projects/wfv/#header4">Whole-Function Vectorization</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>Optimization</p>
|
||||
<ul>
|
||||
<li><a href="http://www.drdobbs.com/optimizing-pixomatic-for-modern-x86-proc/184405807">Optimizing Pixomatic For Modern x86 Processors</a></li>
|
||||
<li><a href="http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-optimization-manual.html">Intel 64 and IA-32 Architectures Optimization Reference Manual</a></li>
|
||||
<li><a href="http://www.agner.org/optimize/">Software optimization resources</a></li>
|
||||
<li><a href="http://software.intel.com/en-us/articles/intel-intrinsics-guide">Intel Intrinsics Guide</a><li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>LLVM</p>
|
||||
<ul>
|
||||
<li><a href="http://llvm.org/docs/LangRef.html">LLVM Language Reference Manual</a></li>
|
||||
<li><a href="http://npcontemplation.blogspot.co.uk/2008/06/secret-of-llvm-c-bindings.html">The secret of LLVM C bindings</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>General</p>
|
||||
<ul>
|
||||
<li><a href="http://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/">A trip through the Graphics Pipeline</a></li>
|
||||
<li><a href="http://msdn.microsoft.com/en-us/library/gg615082.aspx#architecture">WARP Architecture and Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
<h1>OpenGL ES</h1>
|
||||
|
||||
<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More information about
|
||||
<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More informations about
|
||||
OpenGL ES can be found at <a href="http://www.khronos.org/opengles/">
|
||||
http://www.khronos.org/opengles/</a>.</p>
|
||||
|
||||
@@ -48,7 +48,7 @@ EGL drivers for your hardware.</p>
|
||||
|
||||
<h3>Dispatch Table</h3>
|
||||
|
||||
<p>OpenGL ES has an additional indirection when dispatching functions</p>
|
||||
<p>OpenGL ES has an additional indirection when dispatching fucntions</p>
|
||||
|
||||
<pre>
|
||||
Mesa: glFoo() --> _mesa_Foo()
|
||||
|
@@ -20,7 +20,7 @@
|
||||
The current version of the OpenVG state tracker implements OpenVG 1.1.
|
||||
</p>
|
||||
<p>
|
||||
More information about OpenVG can be found at
|
||||
More informations about OpenVG can be found at
|
||||
<a href="http://www.khronos.org/openvg/">
|
||||
http://www.khronos.org/openvg/</a> .
|
||||
</p>
|
||||
|
@@ -21,17 +21,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes/10.1.html">10.1 release notes</a>
|
||||
<li><a href="relnotes/10.0.2.html">10.0.2 release notes</a>
|
||||
<li><a href="relnotes/10.0.1.html">10.0.1 release notes</a>
|
||||
<li><a href="relnotes/10.0.html">10.0 release notes</a>
|
||||
<li><a href="relnotes/9.2.5.html">9.2.5 release notes</a>
|
||||
<li><a href="relnotes/9.2.4.html">9.2.4 release notes</a>
|
||||
<li><a href="relnotes/9.2.3.html">9.2.3 release notes</a>
|
||||
<li><a href="relnotes/9.2.2.html">9.2.2 release notes</a>
|
||||
<li><a href="relnotes/9.2.1.html">9.2.1 release notes</a>
|
||||
<li><a href="relnotes/9.2.html">9.2 release notes</a>
|
||||
<li><a href="relnotes/9.1.7.html">9.1.7 release notes</a>
|
||||
<li><a href="relnotes/9.1.6.html">9.1.6 release notes</a>
|
||||
<li><a href="relnotes/9.1.5.html">9.1.5 release notes</a>
|
||||
<li><a href="relnotes/9.1.4.html">9.1.4 release notes</a>
|
||||
|
@@ -1,150 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.0.1 Release Notes / (December 12, 2013)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.0.1 is a bug fix release which fixes bugs found since the 10.0 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.0.1 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
0a72ca5b36046a658bf6038326ff32ed MesaLib-10.0.1.tar.bz2
|
||||
01bde35c912e504ba62caf1ef9f7022c MesaLib-10.0.1.tar.gz
|
||||
59a174a11a89e6b1b8ee9c3f7e3c388c MesaLib-10.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=64323">Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838">Bug 68838</a> - GLSL: struct declarations produce a "empty declaration warning" in 9.2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70250">Bug 70250</a> - weston-terminal rendering corrupted with output transform 90 and 270</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70601">Bug 70601</a> - [SNB Bisected]Piglit spec/ARB_texture_float/multisample-formats 2 GL_ARB_texture_float fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72230">Bug 72230</a> - Unable to extract MesaLib-10.0.0.tar.{gz,bz2} with bsdtar</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325">Bug 72325</a> - [swrast] piglit glean fbo regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327">Bug 72327</a> - [swrast] piglit glean pointSprite regression</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-10.0..mesa-10.0.1
|
||||
</pre>
|
||||
|
||||
<p>Axel Davy (2):</p>
|
||||
<ul>
|
||||
<li>egl/wayland: Flush the wl_display at the end of SwapBuffers</li>
|
||||
<li>Enable throttling in SwapBuffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Chad Versace (2):</p>
|
||||
<ul>
|
||||
<li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li>
|
||||
<li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (1):</p>
|
||||
<ul>
|
||||
<li>swrast: fix readback regression since inversion fix</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>automake: include only one copy VERSION in tarball</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add 10.0 release md5sums</li>
|
||||
<li>Remove a057b83 from the pick list</li>
|
||||
<li>glsl: Don't emit empty declaration warning for a struct specifier</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (8):</p>
|
||||
<ul>
|
||||
<li>mesa: don't leak performance monitors on context destroy</li>
|
||||
<li>nv50: Fix GPU_READING/WRITING bit removal</li>
|
||||
<li>nouveau: avoid leaking fences while waiting</li>
|
||||
<li>nv50: wait on the buf's fence before sticking it into pushbuf</li>
|
||||
<li>nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)</li>
|
||||
<li>nouveau/video: update h264 picparm field names based on usage</li>
|
||||
<li>nouveau/video: update a few more h264 picparm field names</li>
|
||||
<li>nv50: report 15 max inputs for fragment programs</li>
|
||||
</ul>
|
||||
|
||||
<p>Jordan Justen (1):</p>
|
||||
<ul>
|
||||
<li>dri megadriver_stub: add compatibility for older DRI loaders</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (2):</p>
|
||||
<ul>
|
||||
<li>egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffers</li>
|
||||
<li>egl/wayland: Send commit after flushing the driver context</li>
|
||||
</ul>
|
||||
|
||||
<p>Maarten Lankhorst (1):</p>
|
||||
<ul>
|
||||
<li>nouveau: Fix compiler warning regression</li>
|
||||
</ul>
|
||||
|
||||
<p>Paul Berry (1):</p>
|
||||
<ul>
|
||||
<li>i965/gen6: Fix multisample resolve blits for luminance/intensity 32F formats.</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (1):</p>
|
||||
<ul>
|
||||
<li>st/xa: Bump major version number to 2</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>r300/compiler/tests: Fix segfault</li>
|
||||
<li>r300/compiler/tests: Fix line length check in test parser</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,161 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.0.2 Release Notes / (January 9, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.0.2 is a bug fix release which fixes bugs found since the 10.0.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.0.2 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
de7d14baf0101b697c140d2f47ef27e9 MesaLib-10.0.2.tar.gz
|
||||
8544c0ab3e438a08b5103421ea15b6d2 MesaLib-10.0.2.tar.bz2
|
||||
181b0d6c1afca38e98a930d0e564ed90 MesaLib-10.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=70740">Bug 70740</a> - HiZ on SNB causes GPU hang with WebGL web app</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72026">Bug 72026</a> - SIGSEGV in fs_visitor::visit(ir_dereference_variable*)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72264">Bug 72264</a> - GLSL error reporting</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72369">Bug 72369</a> - glitches in serious sam 3 with the sb shader backend</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-10.0.1..mesa-10.0.2
|
||||
</pre>
|
||||
|
||||
<p>Aaron Watry (8):</p>
|
||||
<ul>
|
||||
<li>clover: Remove unused variable</li>
|
||||
<li>pipe_loader/sw: close dev->lib when initialization fails</li>
|
||||
<li>radeon/compute: Stop leaking LLVMContexts in radeon_llvm_parse_bitcode</li>
|
||||
<li>r600/compute: Free compiled kernels when deleting compute state</li>
|
||||
<li>r600/compute: Use the correct FREE macro when deleting compute state</li>
|
||||
<li>radeon/llvm: Free target data at end of optimization</li>
|
||||
<li>st/vdpau: Destroy context when initialization fails</li>
|
||||
<li>r600/pipe: Stop leaking context->start_compute_cs_cmd.buf on EG/CM</li>
|
||||
</ul>
|
||||
|
||||
<p>Alex Deucher (1):</p>
|
||||
<ul>
|
||||
<li>r600g: fix SUMO2 pci id</li>
|
||||
</ul>
|
||||
|
||||
<p>Alexander von Gluck IV (1):</p>
|
||||
<ul>
|
||||
<li>Haiku: Add in public GL kit headers</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix error code generation in glBeginConditionalRender()</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (2):</p>
|
||||
<ul>
|
||||
<li>docs: Add md5sums for the 10.0.1 release.</li>
|
||||
<li>Update version to 10.0.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Chad Versace (1):</p>
|
||||
<ul>
|
||||
<li>i965/gen6: Fix HiZ hang in WebGL Google Maps</li>
|
||||
</ul>
|
||||
|
||||
<p>Erik Faye-Lund (1):</p>
|
||||
<ul>
|
||||
<li>glcpp: error on multiple #else/#elif directives</li>
|
||||
</ul>
|
||||
|
||||
<p>Henri Verbeet (1):</p>
|
||||
<ul>
|
||||
<li>i915: Add support for gl_FragData[0] reads.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (1):</p>
|
||||
<ul>
|
||||
<li>nv50: fix a small leak on context destroy</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonathan Liu (2):</p>
|
||||
<ul>
|
||||
<li>st/mesa: use pipe_sampler_view_release()</li>
|
||||
<li>llvmpipe: use pipe_sampler_view_release() to avoid segfault</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Fix 3DSTATE_PUSH_CONSTANT_ALLOC_PS packet creation.</li>
|
||||
<li>Revert "mesa: Remove GLXContextID typedef from glx.h."</li>
|
||||
</ul>
|
||||
|
||||
<p>Kevin Rogovin (1):</p>
|
||||
<ul>
|
||||
<li>Use line number information from entire function expression</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (1):</p>
|
||||
<ul>
|
||||
<li>dri_util: Don't assume __DRIcontext->driverPrivate is a gl_context</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (2):</p>
|
||||
<ul>
|
||||
<li>mesa: fix interpretation of glClearBuffer(drawbuffer)</li>
|
||||
<li>st/mesa: fix glClear with multiple colorbuffers and different formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Paul Berry (2):</p>
|
||||
<ul>
|
||||
<li>glsl: Teach ir_variable_refcount about ir_loop::counter variables.</li>
|
||||
<li>glsl: Fix inconsistent assumptions about ir_loop::counter.</li>
|
||||
</ul>
|
||||
|
||||
<p>Vadim Girlin (1):</p>
|
||||
<ul>
|
||||
<li>r600g/sb: fix stack size computation on evergreen</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,146 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.0 Release Notes / (November 30th, 2013)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.0 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 10.0.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.0 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
b38626b96c664db67a534d7859682436 MesaLib-10.0.0.tar.gz
|
||||
f3fe55d9735bea158bbe97ed9a0da819 MesaLib-10.0.0.tar.bz2
|
||||
c6ee1ce51e3bf35947d2978b872daf51 MesaLib-10.0.0.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
|
||||
<p>
|
||||
Note: some of the new features are only available with certain drivers.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>GL_AMD_seamless_cubemap_per_texture on i965.</li>
|
||||
<li>GL_ARB_conservative_depth on i965.</li>
|
||||
<li>GL_ARB_texture_gather on i965.</li>
|
||||
<li>GL_ARB_texture_query_levels on i965.</li>
|
||||
<li>GL_ARB_texture_mirror_clamp_to_edge.</li>
|
||||
<li>GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, and GL_ARB_transform_feedback_instanced on i965/Gen7 (with appropriate kernel support).</li>
|
||||
<li>GL_ARB_sample_shading on i965.</li>
|
||||
<li>GL_ARB_shader_atomic_counters on i965.</li>
|
||||
<li>GL_ARB_vertex_attrib_binding</li>
|
||||
<li>GL_ARB_vertex_type_10f_11f_11f_rev on i965 and r600g</li>
|
||||
<li>GL_KHR_debug</li>
|
||||
<li>GLX_MESA_query_renderer</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>Attempts have been made to <b>not</b> include bugs fixed in previous 9.2
|
||||
releases or bugs that were regressions during 10.0 development. This list is
|
||||
likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47755">Bug 47755</a> - [glsl-compiler] no error checking when Interpolation qualifier for built-in variable is different in vertex and fragment shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=52171">Bug 52171</a> - [gallium/r600/clover] Simple benchmarks failed to run</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53077">Bug 53077</a> - [IVB] Output error with msaa when both of framebuffer and source color's alpha are not 1</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54867">Bug 54867</a> - bug in r300 compiler</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60929">Bug 60929</a> - [r600-llvm] mono games with opengl are blocking on start</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62142">Bug 62142</a> - Mesa/demo mipmap_limits upside down with running by SOFTWARE</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62698">Bug 62698</a> - [bisected] WebGL demo "Consumed": texstate.c:628: update_texture_state: Assertion „__builtin_popcount(enabledTargets) == 1“ failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64225">Bug 64225</a> - bfgminer --scyte generates Segmentation Fault on Northern Island</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64226">Bug 64226</a> - python-opencl package generate segmentation fault at pipe_r600.so</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64261">Bug 64261</a> - [SNB Bisected]Ogles3conform GL3Tests_color_buffer_float_color_buffer_float_clamp_fixed.test fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66213">Bug 66213</a> - Certain Mesa Demos Rendering Inverted (vertically)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66806">Bug 66806</a> - [softpipe] glxgears floating point exception</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67921">Bug 67921</a> - [bisected commit 883987] crosscompiling fails with util/u_cpu_detect.c:247:4: error: 'asm' undeclared (first use in this function)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68162">Bug 68162</a> - [radeonsi] texture rendering is broken in Source-Engine games</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68451">Bug 68451</a> - Texture flicker in native Dota2 in mesa 9.2.0rc1</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68503">Bug 68503</a> - Graphical glitches in Serious Sam 3 when SB is enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68792">Bug 68792</a> - Problems during playback of h264 files using UVD and VLC on AMD E-350 CPU</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68845">Bug 68845</a> - VDPAU/UVD regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69078">Bug 69078</a> - Modern Warfare (1, 2 and 3) broken in Wine on SNB</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69321">Bug 69321</a> - starting openCL crashes/boots system</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70042">Bug 70042</a> - Major texture flickering in Dota 2 (r600g on HD 6950)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70088">Bug 70088</a> - Glamor on r600g crashes Xserver</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70123">Bug 70123</a> - Freeze caused by 'winsys/radeon: remove cs_queue_empty' commit</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70327">Bug 70327</a> - Casting floating point variable to integer not working properly while constant gets converted properly</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70891">Bug 70891</a> - CL_INVALID_BUILD_OPTIONS results in CL_INVALID_DEVICE when asking for build log</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70913">Bug 70913</a> - [PIGLIT,radeonsi] crash in "spec/EXT_framebuffer_multisample/sample-alpha-to-coverage 4 depth" (buffer overflow)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71022">Bug 71022</a> - configure: error: Expat required for DRI.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71110">Bug 71110</a> - xorg_driver.c:1030:2: error: too many arguments to function ‘DamageUnregister’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71172">Bug 71172</a> - Segfault when running glxinfo. NV25GL [Quadro4 900 XGL]</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71512">Bug 71512</a> - dlopen.h:54: undefined reference to `dlopen'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71870">Bug 71870</a> - Metro: Last Light rendering issues</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<ul>
|
||||
<li>Removed X.Org state tracker (unmaintained and broken)</li>
|
||||
<li>Removed the video-accel r300 targets</li>
|
||||
<li>Removed the video-accel softpipe targets</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,254 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1.1 Release Notes / (April 18, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.1 is a bug fix release which fixes bugs found since the 10.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.1.1 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
96e63674ccfa98e7ec6eb4fee3f770c3 MesaLib-10.1.1.tar.gz
|
||||
1fde7ed079df7aeb9b6a744ca033de8d MesaLib-10.1.1.tar.bz2
|
||||
e64d0a562638664b13d2edf22321df59 MesaLib-10.1.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71547">Bug 71547</a> - compilation failure :#error "SSE4.1 instruction set not enabled"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74868">Bug 74868</a> - r600g: Diablo III Crashes After a few minutes</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74988">Bug 74988</a> - Buffer overrun (segfault) decompressing ETC2 texture in GLBenchmark 3.0 Manhattan</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75279">Bug 75279</a> - XCloseDisplay() takes one minute around nouveau_dri.so, freezing Firefox startup</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75543">Bug 75543</a> - OSMesa Gallium OSMesaMakeCurrent</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75660">Bug 75660</a> - u_inlines.h:277:pipe_buffer_map_range: Assertion `length' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76323">Bug 76323</a> - GLSL compiler ignores layout(binding=N) on uniform blocks</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76377">Bug 76377</a> - DRI3 should only be enabled on Linux due to a udev dependency</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76749">Bug 76749</a> - [HSW] DOTA world lighting has no effect</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77102">Bug 77102</a> - gallium nouveau has no profile in vdpau and libva</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77207">Bug 77207</a> - [ivb/hsw] batch overwritten with garbage</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Aaron Watry (1):</p>
|
||||
<ul>
|
||||
<li>gallium/util: Fix memory leak</li>
|
||||
</ul>
|
||||
|
||||
<p>Alexander von Gluck IV (1):</p>
|
||||
<ul>
|
||||
<li>haiku: Fix build through scons corrections and viewport fixes</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (2):</p>
|
||||
<ul>
|
||||
<li>mesa: Set initial internal format of a texture to GL_RGBA</li>
|
||||
<li>mesa: Allow GL_DEPTH_COMPONENT and GL_DEPTH_STENCIL combinations in glTexImage{123}D()</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (12):</p>
|
||||
<ul>
|
||||
<li>softpipe: use 64-bit arithmetic in softpipe_resource_layout()</li>
|
||||
<li>mesa: don't call ctx->Driver.ClearBufferSubData() if size==0</li>
|
||||
<li>st/osmesa: check buffer size when searching for buffers</li>
|
||||
<li>mesa: fix copy & paste bugs in pack_ubyte_SARGB8()</li>
|
||||
<li>mesa: fix copy & paste bugs in pack_ubyte_SRGB8()</li>
|
||||
<li>c11/threads: don't include assert.h if the assert macro is already defined</li>
|
||||
<li>mesa: fix unpack_Z32_FLOAT_X24S8() / unpack_Z32_FLOAT() mix-up</li>
|
||||
<li>st/mesa: add null pointer checking in query object functions</li>
|
||||
<li>mesa: fix glMultiDrawArrays inside a display list</li>
|
||||
<li>cso: fix sampler view count in cso_set_sampler_views()</li>
|
||||
<li>svga: replace sampler assertion with conditional</li>
|
||||
<li>svga: move LIST_INITHEAD(dirty_buffers) earlier in svga_context_create()</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>cherry-ignore: Ignore a few patches</li>
|
||||
<li>glsl: Allow explicit binding on atomics again</li>
|
||||
<li>Update VERSION to 10.1.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Chia-I Wu (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: fix record clearing in copy propagation</li>
|
||||
</ul>
|
||||
|
||||
<p>Christian König (2):</p>
|
||||
<ul>
|
||||
<li>st/mesa: recreate sampler view on context change v3</li>
|
||||
<li>st/mesa: fix sampler view handling with shared textures v4</li>
|
||||
</ul>
|
||||
|
||||
<p>Courtney Goeltzenleuchter (1):</p>
|
||||
<ul>
|
||||
<li>mesa: add bounds checking to eliminate buffer overrun</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (5):</p>
|
||||
<ul>
|
||||
<li>nv50: add missing brackets when handling the samplers array</li>
|
||||
<li>mesa: return v.value_int64 when the requested type is TYPE_INT64</li>
|
||||
<li>configure: enable dri3 only for linux</li>
|
||||
<li>glx: drop obsolete _XUnlock_Mutex in __glXInitialize error path</li>
|
||||
<li>configure: cleanup libudev handling</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix buffer overruns in MSAA MCS buffer clearing.</li>
|
||||
</ul>
|
||||
|
||||
<p>Hans (2):</p>
|
||||
<ul>
|
||||
<li>util: don't define isfinite(), isnan() for MSVC >= 1800</li>
|
||||
<li>mesa: don't define c99 math functions for MSVC >= 1800</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (7):</p>
|
||||
<ul>
|
||||
<li>linker: Split set_uniform_binding into separate functions for blocks and samplers</li>
|
||||
<li>linker: Various trivial clean-ups in set_sampler_binding</li>
|
||||
<li>linker: Fold set_uniform_binding into call site</li>
|
||||
<li>linker: Clean up "unused parameter" warnings</li>
|
||||
<li>linker: Set block bindings based on UniformBlocks rather than UniformStorage</li>
|
||||
<li>linker: Set binding for all elements of UBO array</li>
|
||||
<li>glsl: Propagate explicit binding information from the AST all the way to the linker</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (8):</p>
|
||||
<ul>
|
||||
<li>nouveau: fix fence waiting logic in screen destroy</li>
|
||||
<li>nv50: adjust blit_3d handling of ms output textures</li>
|
||||
<li>loader: add special logic to distinguish nouveau from nouveau_vieux</li>
|
||||
<li>mesa/main: condition GL_DEPTH_STENCIL on ARB_depth_texture</li>
|
||||
<li>nouveau: add forgotten GL_COMPRESSED_INTENSITY to texture format list</li>
|
||||
<li>nouveau: there may not have been a texture if the fbo was incomplete</li>
|
||||
<li>nvc0/ir: move sample id to second source arg to fix sampler2DMS</li>
|
||||
<li>nouveau: fix firmware check on nvd7/nvd9</li>
|
||||
</ul>
|
||||
|
||||
<p>Johannes Nixdorf (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: fix the detection of expat with pkg-config</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonathan Gray (7):</p>
|
||||
<ul>
|
||||
<li>gallium: add endian detection for OpenBSD</li>
|
||||
<li>loader: use 0 instead of FALSE which isn't defined</li>
|
||||
<li>loader: don't limit the non-udev path to only android</li>
|
||||
<li>megadriver_stub.c: don't use _GNU_SOURCE to gate the compat code</li>
|
||||
<li>egl/dri2: don't require libudev to build drm/wayland platforms</li>
|
||||
<li>egl/dri2: use drm macros to construct device name</li>
|
||||
<li>configure: don't require libudev for gbm or egl drm/wayland</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (4):</p>
|
||||
<ul>
|
||||
<li>c11/threads: Fix nano to milisecond conversion.</li>
|
||||
<li>mapi/u_thread: Use GetCurrentThreadId</li>
|
||||
<li>c11/threads: Don't implement thrd_current on Windows.</li>
|
||||
<li>draw: Duplicate TGSI tokens in draw_pipe_pstipple module.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (4):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Fix register comparisons in saturate propagation.</li>
|
||||
<li>glsl: Fix lack of i2u in lower_ubo_reference.</li>
|
||||
<li>i965: Stop advertising GL_MESA_ycbcr_texture.</li>
|
||||
<li>glsl: Try vectorizing when seeing a repeated assignment to a channel.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (13):</p>
|
||||
<ul>
|
||||
<li>r600g: fix texelFetchOffset GLSL functions</li>
|
||||
<li>r600g: fix blitting the last 2 mipmap levels for Evergreen</li>
|
||||
<li>mesa: fix the format of glEdgeFlagPointer</li>
|
||||
<li>r600g,radeonsi: fix MAX_TEXTURE_3D_LEVELS and MAX_TEXTURE_ARRAY_LAYERS limits</li>
|
||||
<li>st/mesa: fix per-vertex edge flags and GLSL support (v2)</li>
|
||||
<li>mesa: mark GL_RGB9_E5 as not color-renderable</li>
|
||||
<li>mesa: fix texture border handling for cube arrays</li>
|
||||
<li>mesa: allow generating mipmaps for cube arrays</li>
|
||||
<li>mesa: fix software fallback for generating mipmaps for cube arrays</li>
|
||||
<li>mesa: fix software fallback for generating mipmaps for 3D textures</li>
|
||||
<li>st/mesa: fix generating mipmaps for cube arrays</li>
|
||||
<li>st/mesa: drop the lowering of quad strips to triangle strips</li>
|
||||
<li>r600g: implement edge flags</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (4):</p>
|
||||
<ul>
|
||||
<li>mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__.</li>
|
||||
<li>i965/fs: Fix off-by-one in saturate propagation.</li>
|
||||
<li>i965/fs: Don't propagate saturate modifiers into partial writes.</li>
|
||||
<li>i965/fs: Don't propagate saturation modifiers if there are source modifiers.</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>r600g: Don't leak bytecode on shader compile failure</li>
|
||||
</ul>
|
||||
|
||||
<p>Mike Stroyan (1):</p>
|
||||
<ul>
|
||||
<li>i965: Avoid dependency hints on math opcodes</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (5):</p>
|
||||
<ul>
|
||||
<li>winsys/svga: Replace the query mm buffer pool with a slab pool v3</li>
|
||||
<li>winsys/svga: Update the vmwgfx_drm.h header to latest version from kernel</li>
|
||||
<li>winsys/svga: Fix prime surface references also for guest-backed surfaces</li>
|
||||
<li>st/xa: Bind destination before setting new state</li>
|
||||
<li>st/xa: Make sure unused samplers are set to NULL</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (1):</p>
|
||||
<ul>
|
||||
<li>configure: Use LLVM shared libraries by default</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,179 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1.2 Release Notes / (May 5, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.2 is a bug fix release which fixes bugs found since the 10.1.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.1.2 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
37d79f94b1f41852a89d1fc3900bea76 MesaLib-10.1.2.tar.gz
|
||||
28b60d15ac9f364da1e0155911eaf44e MesaLib-10.1.2.tar.bz2
|
||||
05300039085a65fc53c5472c4bb5747a MesaLib-10.1.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=27499">Bug 27499</a> - [855GM i915] GL_LINE_STIPPLE displays incorrect colors</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75723">Bug 75723</a> - (regression since Linux 3.14?) brw_get_graphics_reset_status: Assertion `brw->hw_ctx != ((void *)0)' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76894">Bug 76894</a> - Piglit/spec/EXT_framebuffer_object/fbo-bind-renderbuffer failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77702">Bug 77702</a> - [i965 Bisected]Piglit spec/NV_conditional_render_blitframebuffer fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Ander Conselvan de Oliveira (2):</p>
|
||||
<ul>
|
||||
<li>gbm/dri: Fix out-of-memory error path in dri_device_create()</li>
|
||||
<li>egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (27):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix glGetVertexAttribi(GL_VERTEX_ATTRIB_ARRAY_SIZE)</li>
|
||||
<li>swrast: Add glBlitFramebuffer to commands affected by conditional rendering</li>
|
||||
<li>mesa: Fix error condition for multisample proxy texture targets</li>
|
||||
<li>i965: Put an assertion to check valid varying_to_slot[varying]</li>
|
||||
<li>i965: Fix component mask and varying_to_slot mapping for gl_Layer</li>
|
||||
<li>i965: Fix component mask and varying_to_slot mapping for gl_ViewportIndex</li>
|
||||
<li>mesa: Add helper function _mesa_is_format_integer()</li>
|
||||
<li>mesa: Add error condition for integer formats in glGetTexImage()</li>
|
||||
<li>mesa: Add an error condition in glGetFramebufferAttachmentParameteriv()</li>
|
||||
<li>mesa: Fix error code generation in glReadPixels()</li>
|
||||
<li>glsl: Allow overlapping locations for vertex input attributes</li>
|
||||
<li>mesa: Fix querying location of nth element of an array variable</li>
|
||||
<li>mesa: Use location VERT_ATTRIB_GENERIC0 for vertex attribute 0</li>
|
||||
<li>glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord</li>
|
||||
<li>glsl: Compile error if fs uses gl_FragCoord before first redeclaration</li>
|
||||
<li>mesa: Add entry for extension ARB_texture_stencil8</li>
|
||||
<li>mesa: Add error condition for format=STENCIL_INDEX in glGetTexImage()</li>
|
||||
<li>i965: Fix crash in do_blit_readpixels()</li>
|
||||
<li>mesa: Add missing types in _mesa_texstore_xx_xx() functions</li>
|
||||
<li>mesa: Allow srcFormat=GL_DEPTH_STENCIL in _mesa_texstore_xx_xx() functions</li>
|
||||
<li>mesa: Add new helper function _mesa_unpack_depth_stencil_row()</li>
|
||||
<li>mesa: Add support to unpack depth-stencil texture in to FLOAT_32_UNSIGNED_INT_24_8_REV</li>
|
||||
<li>mesa: Allow FLOAT_32_UNSIGNED_INT_24_8_REV in get_tex_depth_stencil()</li>
|
||||
<li>i965: Add glBlitFramebuffer to commands affected by conditional rendering</li>
|
||||
<li>glsl: Use switch to allow adding more shader types</li>
|
||||
<li>glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord</li>
|
||||
<li>glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions</li>
|
||||
</ul>
|
||||
|
||||
<p>Benjamin Bellec (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix GetStringi error message with correct function name</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>swrast: allocate swrast_texture_image::ImageSlices array if needed</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (4):</p>
|
||||
<ul>
|
||||
<li>docs: Add the MD5 sums for the 10.1.1 release tar files.</li>
|
||||
<li>cherry-ignore: Ignore a patch causing a regression</li>
|
||||
<li>cherry-ignore: Drop an ignored patch now that piglit has been updated.</li>
|
||||
<li>Update VERSION to 10.1.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Only allow `invariant` on shader in/out between stages.</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix render-to-texture in non-FinishRenderTexture cases.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (1):</p>
|
||||
<ul>
|
||||
<li>dri3: Enable GLX_MESA_query_renderer on DRI3 too</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Don't enable reset notification support on Gen4-5.</li>
|
||||
<li>i965: Actually emit PIPELINE_SELECT and 3DSTATE_VF_STATISTICS.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (10):</p>
|
||||
<ul>
|
||||
<li>r300g: don't crash when getting NULL colorbuffers</li>
|
||||
<li>st/mesa: remove trailing NULL colorbuffers</li>
|
||||
<li>r600g: fix edge flags and layered rendering on R600-R700</li>
|
||||
<li>r600g: disable async DMA on R700</li>
|
||||
<li>r600g: fix MSAA resolve on R6xx when the destination is 1D-tiled</li>
|
||||
<li>r600g: fix flushing on RV670, RS780, RS880 again</li>
|
||||
<li>r600g: fix buffer copying on R600-R700</li>
|
||||
<li>r600g: fix for broken CULL_FRONT behavior on R6xx</li>
|
||||
<li>r600g: fix for an MSAA hang on RV770</li>
|
||||
<li>r600g: fix hang on RV740 by using DX_RASTERIZATION_KILL instead of SX_MISC</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (2):</p>
|
||||
<ul>
|
||||
<li>r600g: Disable LLVM by default at runtime for graphics</li>
|
||||
<li>st/mesa: Fix NULL pointer dereference for incomplete framebuffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Neil Roberts (1):</p>
|
||||
<ul>
|
||||
<li>wayland: Fix the logic in disabling the prime capability</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Iglesias Gonsalvez (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (1):</p>
|
||||
<ul>
|
||||
<li>st/xa: Cache render target surface</li>
|
||||
</ul>
|
||||
|
||||
<p>nick (1):</p>
|
||||
<ul>
|
||||
<li>swrast: Fix vertex color in _swsetup_Translate()</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,90 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1.3 Release Notes / (May 9, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.3 is a bug fix release which fixes bugs found since the 10.1.2 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Note: Mesa 10.1.3 is being released sooner than originally scheduled to make
|
||||
available a fix for a performance rgression that was inadvertently introduced
|
||||
to Mesa 10.1.2. The performance regression is reported to make vmware
|
||||
swapbuffers fall back to software.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.3 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
665fe1656aaa2c37b32042068aff92cb MesaLib-10.1.3.tar.gz
|
||||
ba6dbe2b9cab0b4de840c996b9b6a3ad MesaLib-10.1.3.tar.bz2
|
||||
4e6f26330a63d3c47e62ac4bdead39e8 MesaLib-10.1.3.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77245">Bug 77245</a> - Bogus GL_ARB_explicit_attrib_location layout identifier warnings</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add MD5 sums for Mesa 10.1.2</li>
|
||||
<li>get-pick-list.sh: Require explicit "10.1" for nominating stable patches</li>
|
||||
<li>VERSION: Update to 10.1.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix MaxNumLayers for 1D array textures.</li>
|
||||
<li>i965: Fix depth (array slices) computation for 1D_ARRAY render targets.</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (1):</p>
|
||||
<ul>
|
||||
<li>glsl: fix bogus layout qualifier warnings</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (1):</p>
|
||||
<ul>
|
||||
<li>st/xa: Fix performance regression introduced by commit "Cache render target surface"</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,100 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1.4 Release Notes / (May 20, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.4 is a bug fix release which fixes bugs found since the 10.1.3 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.4 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
e934365d77f384bfaec844999440bef8 MesaLib-10.1.4.tar.gz
|
||||
6fddee101f49b7409cd29994c34ddee7 MesaLib-10.1.4.tar.bz2
|
||||
ba5f48e7d5e373922c804c2651fec6c1 MesaLib-10.1.4.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=78225">Bug 78225</a> - Compile error due to undefined reference to `gbm_dri_backend', fix attached</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78537">Bug 78537</a> - no anisotropic filtering in a native Half-Life 2</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix double-freeing of dispatch tables inside glBegin/End.</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add MD5 sums for 10.1.3</li>
|
||||
<li>cherry-ignore: Roland and Michel agreed to drop these patches.</li>
|
||||
<li>VERSION: Update to 10.1.4</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>configure: error out if building GBM without dri</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965/vs: Use samplers for UBOs in the VS like we do for non-UBO pulls.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (3):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: make sure to reverse cond codes on all the OP_SET variants</li>
|
||||
<li>nv50: fix setting of texture ms info to be per-stage</li>
|
||||
<li>nv50/ir: fix integer mul lowering for u32 x u32 -> high u32</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: Fix anisotropic filtering state setup</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>configure.ac: Add LLVM_VERSION_PATCH to DEFINES</li>
|
||||
<li>radeonsi: Enable geometry shaders with LLVM 3.4.1</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,105 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1.5 Release Notes / (June 6, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.5 is a bug fix release which fixes bugs found since the 10.1.4 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.5 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
b0aceaa75bc9a9b2d9215a113e2ad488b5cf85c99005a7624f8cf7c37c5d0eaa MesaLib-10.1.5.tar.gz
|
||||
bc6c5ec7836f254a49d055a29d9aa34c97c54c038f47ad3a00fa57a5fef15bbc MesaLib-10.1.5.tar.bz2
|
||||
78b7255cab0af7918945452a84de7989096ebcdd27e99b31c56c0589274cbc77 MesaLib-10.1.5.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=79115">Bug 79115</a> - </li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79421">Bug 79421</a> - </li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>glsl: fix use-after free bug/crash in ast_declarator_list::hir()</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (5):</p>
|
||||
<ul>
|
||||
<li>docs: Add md5sums for 10.1.4 release</li>
|
||||
<li>Merge remote-tracking branch 'origin/10.1' into 10.1</li>
|
||||
<li>cherry-ignore: Ignore two commits.</li>
|
||||
<li>Ignore a patch that is not needed for the 10.1 branch.</li>
|
||||
<li>Update version to 10.1.5</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>glx: do not leak dri3Display</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: fix s32 x s32 -> high s32 multiply logic</li>
|
||||
<li>nv50/ir: fix constant folding for OP_MUL subop HIGH</li>
|
||||
</ul>
|
||||
|
||||
<p>James Legg (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix unbinding GL_DEPTH_STENCIL_ATTACHMENT</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston Sequoia (2):</p>
|
||||
<ul>
|
||||
<li>glapi: Avoid heap corruption in _glapi_table</li>
|
||||
<li>darwin: Fix test for kCGLPFAOpenGLProfile support at runtime</li>
|
||||
</ul>
|
||||
|
||||
<p>Pavel Popov (2):</p>
|
||||
<ul>
|
||||
<li>i965: Properly return *RESET* status in glGetGraphicsResetStatusARB</li>
|
||||
<li>i965: Fix Line Stipple enable bit in 3DSTATE_SF for Haswell.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>llvmpipe: fix crash when not all attachments are populated in a fb</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,138 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1.6 Release Notes / (June 24, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.6 is a bug fix release which fixes bugs found since the 10.1.5 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.6 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
cde60e06b340d7598802fe4a4484b3fb8befd714f9ab9caabe1f27d3149e8815 MesaLib-10.1.6.tar.bz2
|
||||
e4e726d7805a442f7ed07d12f71335e6126796ec85328a5989eb5348a8042d00 MesaLib-10.1.6.tar.gz
|
||||
bf7e3f721a7ad0c2057a034834b6fea688e64f26a66cf8d1caa2827e405e72dd MesaLib-10.1.6.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=54372">Bug 54372</a> - GLX_INTEL_swap_event crashes driver when swapping window buffers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74005">Bug 74005</a> - [i965 Bisected]Piglit/glx_glx-make-glxdrawable-current fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78581">Bug 78581</a> - </li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79729">Bug 79729</a> - [i965] glClear on a multisample texture doesn't work</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Adrian Negreanu (7):</p>
|
||||
<ul>
|
||||
<li>add megadriver_stub_FILES</li>
|
||||
<li>android: adapt to the megadriver mechanism</li>
|
||||
<li>android: add libloader to libGLES_mesa and libmesa_egl_dri2</li>
|
||||
<li>android: add src/gallium/auxiliary as include path for libmesa_dricore</li>
|
||||
<li>android, egl: add correct drm include for libmesa_egl_dri2</li>
|
||||
<li>android, mesa_gen_matypes: pull in timespec POSIX definition</li>
|
||||
<li>android, dricore: undefined reference to _mesa_streaming_load_memcpy</li>
|
||||
</ul>
|
||||
|
||||
<p>Beren Minor (1):</p>
|
||||
<ul>
|
||||
<li>egl/main: Fix eglMakeCurrent when releasing context from current thread.</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add SHA256 checksums for the 10.1.5 release</li>
|
||||
<li>cherry-ignore: Add a patch to ignore</li>
|
||||
<li>Update VERSION to 10.1.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Manjarres (1):</p>
|
||||
<ul>
|
||||
<li>glx: Don't crash on swap event for a Window (non-GLXWindow)</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>configure: error out when building opencl without LLVM</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Copy Geom.UsesEndPrimitive when cloning a geometry program.</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (3):</p>
|
||||
<ul>
|
||||
<li>mesa/main: Make get_hash.c values constant.</li>
|
||||
<li>mesa: Make glGetIntegerv(GL_*_ARRAY_SIZE) return GL_BGRA.</li>
|
||||
<li>mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Remove glClear optimization based on drawable size</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>configure: Only check for OpenCL without LLVM when the latter is certain</li>
|
||||
</ul>
|
||||
|
||||
<p>Neil Roberts (1):</p>
|
||||
<ul>
|
||||
<li>i965: Set the fast clear color value for texture surfaces</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>draw: (trivial) fix clamping of viewport index</li>
|
||||
</ul>
|
||||
|
||||
<p>Tobias Klausmann (1):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: clear subop when folding constant expressions</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>clover: Prevent Clang from printing number of errors and warnings to stderr.</li>
|
||||
<li>clover: Don't use llvm's global context</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,73 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1 Release Notes / TBD</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 10.1.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.1 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
TBD.
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
|
||||
<p>
|
||||
Note: some of the new features are only available with certain drivers.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>GL_ARB_draw_indirect on i965.</li>
|
||||
<li>GL_ARB_clear_buffer_object</li>
|
||||
<li>GL_ARB_viewport_array on i965.</li>
|
||||
<li>GL_ARB_map_buffer_alignment on all drivers that did not previously support
|
||||
it.</li>
|
||||
<li>GL_AMD_shader_trinary_minmax.</li>
|
||||
<li>GL_EXT_framebuffer_blit on r200 and radeon.</li>
|
||||
<li>Reduced memory usage for display lists.</li>
|
||||
<li>OpenGL 3.3 support on nv50, nvc0, r600 and radeonsi</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
TBD.
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<ul>
|
||||
<li>Removed support for the GL_MESA_texture_array extension. This extension
|
||||
enabled the use of texture array with fixed-function and assembly fragment
|
||||
shaders. No applications are known to use this extension.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,168 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 9.1.7 Release Notes / October 4, 2013</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.1.7 is a bug fix release which fixes bugs found since the 9.1.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
|
||||
3.1 is <strong>only</strong> available if requested at context creation
|
||||
because GL_ARB_compatibility is not supported.
|
||||
</p>
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
9e4abf7b7a6db762012c3c9917a8e8c7 MesaLib-9.1.7.tar.bz2
|
||||
f1d4d479d6ce12b9566fdb379960a912 MesaLib-9.1.7.tar.gz
|
||||
abd612bfc5dd478d04fcc630dd7672f2 MesaLib-9.1.7.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=55503">Bug 55503</a> - Constant vertex attributes broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61635">Bug 61635</a> - glVertexAttribPointer(id, GL_UNSIGNED_BYTE, GL_FALSE,...) does not work</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65958">Bug 65958</a> - GPU Lockup on Trinity 7500G</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66292">Bug 66292</a> - [SNB/IVB/HSW Bisected]Ogles3conform GL3Tests_depth24_depth24_basic.test fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67548">Bug 67548</a> - glGetAttribLocation seems to be broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68195">Bug 68195</a> - piglit tests vs-struct-pad and fs-struct-pad both fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68250">Bug 68250</a> - Automatic mipmap generation with texture compression produces borders that fade to black</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69525">Bug 69525</a> - [GM45, bisected] Piglit tex-shadow2drect fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alex Deucher (2):</p>
|
||||
<ul>
|
||||
<li>r600g: disable GPUVM by default</li>
|
||||
<li>radeon/winsys: pad IBs to a multiple of 8 DWs</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (2):</p>
|
||||
<ul>
|
||||
<li>docs: Fix a typo in the 9.1.6 release notes</li>
|
||||
<li>mesa: Fix MESA_PATCH version</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>meta: Fix blitting a framebuffer with renderbuffer attachment</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (5):</p>
|
||||
<ul>
|
||||
<li>docs: Add 9.1.6 release md5sums</li>
|
||||
<li>Use -Bsymbolic when linking libEGL.so</li>
|
||||
<li>Update get-pick-list to look specifically for "9.1" in NOTE</li>
|
||||
<li>cherry-ignore: Ignore last two patches in current get-pick-list output</li>
|
||||
<li>Bump version to 9.1.7</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Gen4: Zero out extra coordinates when using shadow compare</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>nv50: handle pure integer vertex attributes</li>
|
||||
<li>nouveau: initialise the nouveau_transfer maps</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965/gen4: Fix fragment program rectangle texture shadow compares.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (11):</p>
|
||||
<ul>
|
||||
<li>mesa: Remove stray debug printfs in attachment completeness code</li>
|
||||
<li>mesa: Validate the layer selection of an array texture too</li>
|
||||
<li>mesa/vbo: Fix handling of attribute 0 in non-compatibilty contexts</li>
|
||||
<li>glsl: Add new overload of program_resource_visitor::visit_field method</li>
|
||||
<li>glsl: Use alignment of container record for its first field</li>
|
||||
<li>mesa: Remove all traces of GL_OES_matrix_get</li>
|
||||
<li>mesa: Don't call driver RenderTexture for really broken textures</li>
|
||||
<li>mesa: Don't call driver RenderTexture for invalid zoffset</li>
|
||||
<li>mesa: Generate a renderbuffer wrapper even if the texture has no image</li>
|
||||
<li>glsl: Move and refine test for unsized arrays in GLSL ES</li>
|
||||
<li>mesa: Don't return any data for GL_SHADER_BINARY_FORMATS</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nv30: U8_USCALED only works for size 4</li>
|
||||
<li>nv30: remove no-longer-used formats from table</li>
|
||||
</ul>
|
||||
|
||||
<p>Joakim Sindholt (1):</p>
|
||||
<ul>
|
||||
<li>nvc0: fix blitctx memory leak</li>
|
||||
</ul>
|
||||
|
||||
<p>Johannes Obermayr (1):</p>
|
||||
<ul>
|
||||
<li>st/gbm: Add $(WAYLAND_CFLAGS) for HAVE_EGL_PLATFORM_WAYLAND.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>meta: Set correct viewport and projection in decompress_texture_image.</li>
|
||||
</ul>
|
||||
|
||||
<p>Maarten Lankhorst (1):</p>
|
||||
<ul>
|
||||
<li>nvc0: restore viewport after blit</li>
|
||||
</ul>
|
||||
|
||||
<p>Rico Schüller (1):</p>
|
||||
<ul>
|
||||
<li>glx: Initialize OpenGL version to 1.0</li>
|
||||
</ul>
|
||||
|
||||
<p>Tiziano Bacocco (1):</p>
|
||||
<ul>
|
||||
<li>nvc0/ir: fix use after free in texture barrier insertion pass</li>
|
||||
</ul>
|
||||
|
||||
<p>Torsten Duwe (1):</p>
|
||||
<ul>
|
||||
<li>wayland-egl.pc requires wayland-client.pc.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -31,9 +31,7 @@ because GL_ARB_compatibility is not supported.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
e6cdfa84dfddd86e3d36ec7ff4b6478a MesaLib-9.2.1.tar.gz
|
||||
dd4c82667d9c19c28a553b12eba3f8a0 MesaLib-9.2.1.tar.bz2
|
||||
d9af0f5607f7d275793d293057ca9ac6 MesaLib-9.2.1.zip
|
||||
TBA
|
||||
</pre>
|
||||
|
||||
|
||||
|
@@ -1,97 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 9.2.2 Release Notes / (October 18, 2013)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.2.2 is a bug fix release which fixes bugs found since the 9.2.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
|
||||
3.1 is <strong>only</strong> available if requested at context creation
|
||||
because GL_ARB_compatibility is not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
</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=69449">Bug 69449</a> - Valgrind error in program_resource_visitor::recursion</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70411">Bug 70411</a> - glInvalidateFramebuffer fails with GL_INVALID_ENUM</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-9.2.1..mesa-9.2.2
|
||||
</pre>
|
||||
|
||||
<p>Brian Paul (3):</p>
|
||||
<ul>
|
||||
<li>docs: add missing <pre> tag</li>
|
||||
<li>svga: fix incorrect memcpy src in svga_buffer_upload_piecewise()</li>
|
||||
<li>mesa: consolidate cube width=height error checking</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add md5sums for 9.2.1 release</li>
|
||||
<li>Bump version to 9.2.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Constantin Baranov (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Add missing switch break in invalidate_framebuffer_storage()</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (3):</p>
|
||||
<ul>
|
||||
<li>i965: Don't forget the cube map padding on gen5+.</li>
|
||||
<li>mesa: Fix compiler warnings when ALIGN's alignment is "1 << value".</li>
|
||||
<li>i965: Fix 3D texture layout by more literally copying from the spec.</li>
|
||||
</ul>
|
||||
|
||||
<p>Francisco Jerez (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Fix usage of the wrong union member in program_resource_visitor::recursion.</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: Use 'SI' as the LLVM processor for CIK on LLVM <= 3.3</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,115 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 9.2.3 Release Notes / (November 13, 2013)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.2.3 is a bug fix release which fixes bugs found since the 9.2.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
|
||||
3.1 is <strong>only</strong> available if requested at context creation
|
||||
because GL_ARB_compatibility is not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
66e9a33a414f801e1c33398bf627d56b MesaLib-9.2.3.tar.gz
|
||||
f56b6beb556e4b9072814419f7c554e3 MesaLib-9.2.3.tar.bz2
|
||||
ed852dab576faac237ac4298bf55d0a1 MesaLib-9.2.3.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69437">Bug 69437</a> - Composite Bypass no longer works</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-9.2.2..mesa-9.2.3
|
||||
</pre>
|
||||
|
||||
<p>Brian Paul (2):</p>
|
||||
<ul>
|
||||
<li>st/mesa: move out of memory check in st_draw_vbo()</li>
|
||||
<li>osmesa: fix broken triangle/line drawing when using float color buffer</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (7):</p>
|
||||
<ul>
|
||||
<li>Remove error when calling glGenQueries/glDeleteQueries while a query is active</li>
|
||||
<li>Bump version to 9.2.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Vetter (1):</p>
|
||||
<ul>
|
||||
<li>i965: CS writes/reads should use I915_GEM_INSTRUCTION</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix texture buffer rendering after a whole buffer replacement.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (6):</p>
|
||||
<ul>
|
||||
<li>i965: Emit post-sync non-zero flush before 3DSTATE_GS_SVB_INDEX.</li>
|
||||
<li>i965: Emit post-sync non-zero flush before 3DSTATE_DRAWING_RECTANGLE.</li>
|
||||
<li>i965: Also guard 3DSTATE_DRAWING_RECTANGLE with a flush in blorp.</li>
|
||||
<li>i965: Move post-sync non-zero flush for 3DSTATE_MULTISAMPLE.</li>
|
||||
<li>i965: Also emit HIER_DEPTH and STENCIL packets when disabling depth.</li>
|
||||
<li>i965: Also emit HiZ and Stencil packets when disabling depth on Gen6.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (1):</p>
|
||||
<ul>
|
||||
<li>wayland: Don't rely on static variable for identifying wl_drm buffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: fix blitting the last 2 mipmap levels of compressed textures</li>
|
||||
</ul>
|
||||
|
||||
<p>Petr Sebor (1):</p>
|
||||
<ul>
|
||||
<li>meta: enable vertex attributes in the context of the newly created array object</li>
|
||||
</ul>
|
||||
|
||||
<p>Scott Graham (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fixes for MSVC 2013</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,102 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 9.2.4 Release Notes / (November 27, 2013)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.2.4 is a bug fix release which fixes bugs found since the 9.2.3 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
|
||||
3.1 is <strong>only</strong> available if requested at context creation
|
||||
because GL_ARB_compatibility is not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
28190b831b0271d69dbc44b2686eab1c MesaLib-9.2.4.tar.gz
|
||||
e630c0a307cec4f0f70ddd029d2fe084 MesaLib-9.2.4.tar.bz2
|
||||
8ef5e1e92e1d30fbedec31f716a7619e MesaLib-9.2.4.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=53077">Bug 53077</a> - [IVB] Output error with msaa when both of framebuffer and source color's alpha are not 1</li>
|
||||
|
||||
<li>Fix freedreno to compile with recent libdrm.</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-9.2.3..mesa-9.2.4
|
||||
</pre>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix GL_FEEDBACK mode inverted Y coordinate bug</li>
|
||||
</ul>
|
||||
|
||||
<p>Paul Berry (2):</p>
|
||||
<ul>
|
||||
<li>i965: Fix vertical alignment for multisampled buffers.</li>
|
||||
<li>glsl: Fix lowering of direct assignment in lower_clip_distance.</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Clark (17):</p>
|
||||
<ul>
|
||||
<li>freedreno/a3xx: fix color inversion on mem->gmem restore</li>
|
||||
<li>freedreno/a3xx: fix viewport on gmem->mem resolve</li>
|
||||
<li>freedreno: add debug option to disable scissor optimization</li>
|
||||
<li>freedreno: update register headers</li>
|
||||
<li>freedreno/a3xx: some texture fixes</li>
|
||||
<li>freedreno/a3xx/compiler: fix CMP</li>
|
||||
<li>freedreno/a3xx/compiler: handle saturate on dst</li>
|
||||
<li>freedreno/a3xx/compiler: use max_reg rather than file_count</li>
|
||||
<li>freedreno/a3xx/compiler: cat4 cannot use const reg as src</li>
|
||||
<li>freedreno: fix segfault when no color buffer bound</li>
|
||||
<li>freedreno/a3xx/compiler: make compiler errors more useful</li>
|
||||
<li>freedreno/a3xx/compiler: bit of re-arrange/cleanup</li>
|
||||
<li>freedreno/a3xx/compiler: fix SGT/SLT/etc</li>
|
||||
<li>freedreno/a3xx: don't leak so much</li>
|
||||
<li>freedreno/a3xx/compiler: better const handling</li>
|
||||
<li>freedreno/a3xx/compiler: handle sync flags better</li>
|
||||
<li>freedreno: updates for msm drm/kms driver</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (1):</p>
|
||||
<ul>
|
||||
<li>mesa: enable GL_TEXTURE_LOD_BIAS set/get</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,120 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 9.2.5 Release Notes / (December 12, 2013)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.2.5 is a bug fix release which fixes bugs found since the 9.2.4 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
|
||||
3.1 is <strong>only</strong> available if requested at context creation
|
||||
because GL_ARB_compatibility is not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
9fb4de29ca1d9cfd03cbdefa123ba336 MesaLib-9.2.5.tar.bz2
|
||||
1146c7c332767174f3de782b88d8e8ca MesaLib-9.2.5.tar.gz
|
||||
a9a6c46dac7ea26fd272bf14894d95f3 MesaLib-9.2.5.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=62142">Bug 62142</a> - Mesa/demo mipmap_limits upside down with running by SOFTWARE</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64323">Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66213">Bug 66213</a> - Certain Mesa Demos Rendering Inverted (vertically)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838">Bug 68838</a> - GLSL: struct declarations produce a "empty declaration warning" in 9.2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325">Bug 72325</a> - [swrast] piglit glean fbo regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327">Bug 72327</a> - [swrast] piglit glean pointSprite regression</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-9.2.4..mesa-9.2.5
|
||||
</pre>
|
||||
|
||||
<p>Chad Versace (2):</p>
|
||||
<ul>
|
||||
<li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li>
|
||||
<li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (4):</p>
|
||||
<ul>
|
||||
<li>i965: Gen4-5: Don't enable hardware alpha test with MRT</li>
|
||||
<li>i965: Gen4-5: Include alpha func/ref in program key</li>
|
||||
<li>i965/fs: Gen4-5: Setup discard masks for MRT alpha test</li>
|
||||
<li>i965/fs: Gen4-5: Implement alpha test in shader for MRT</li>
|
||||
</ul>
|
||||
|
||||
<p>Chí-Thanh Christopher Nguyễn (1):</p>
|
||||
<ul>
|
||||
<li>st/xorg: Handle new DamageUnregister API which has only one argument</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (3):</p>
|
||||
<ul>
|
||||
<li>mesa/swrast: fix inverted front buffer rendering with old-school swrast</li>
|
||||
<li>glx: don't fail out when no configs if we have visuals</li>
|
||||
<li>swrast: fix readback regression since inversion fix</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Don't emit empty declaration warning for a struct specifier</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (4):</p>
|
||||
<ul>
|
||||
<li>nv50: Fix GPU_READING/WRITING bit removal</li>
|
||||
<li>nouveau: avoid leaking fences while waiting</li>
|
||||
<li>nv50: wait on the buf's fence before sticking it into pushbuf</li>
|
||||
<li>nv50: report 15 max inputs for fragment programs</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>r300/compiler/tests: Fix segfault</li>
|
||||
<li>r300/compiler/tests: Fix line length check in test parser</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -156,7 +156,7 @@ each time you do a pull.
|
||||
</p>
|
||||
<li>Small changes to master
|
||||
<p>
|
||||
If you are an experienced git user working on substantial modifications,
|
||||
If you are an experienced git user working on substancial modifications,
|
||||
you are probably
|
||||
working on a separate branch and would rebase your branch prior to
|
||||
merging with master.
|
||||
|
@@ -67,7 +67,7 @@ Example: export MESA_GLSL=dump,nopt
|
||||
<h2 id="support">GLSL Version</h2>
|
||||
|
||||
<p>
|
||||
The GLSL compiler currently supports version 3.30 of the shading language.
|
||||
The GLSL compiler currently supports version 1.40 of the shading language.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -234,7 +234,7 @@ This option is only relevant if EmitHighLevelInstructions is set.
|
||||
|
||||
<dt>EmitComments</dt>
|
||||
<dd>
|
||||
If set, instructions will be annotated with comments to help with debugging.
|
||||
If set, instructions will be annoted with comments to help with debugging.
|
||||
Extra NOP instructions will also be inserted.
|
||||
</dd>
|
||||
</dl>
|
||||
|
@@ -59,6 +59,7 @@ each directory.
|
||||
<li><b>osmesa</b> - off-screen software driver
|
||||
<li>XXX more
|
||||
</ul>
|
||||
<li><b>es</b> - OpenGL ES overlay, parallelly buildable with the core Mesa
|
||||
<li><b>math</b> - vertex array translation and transformation code
|
||||
(not used with Gallium)
|
||||
<li><b>program</b> - Vertex/fragment shader and GLSL compiler code
|
||||
@@ -123,7 +124,7 @@ each directory.
|
||||
Currently there's run-time code generation for x86/SSE, PowerPC
|
||||
and Cell SPU.
|
||||
<li><b>tgsi</b> - TG Shader Infrastructure. Code for encoding,
|
||||
manipulating and interpreting GPU programs.
|
||||
manipulating and interpretting GPU programs.
|
||||
<li><b>translate</b> - module for translating vertex data from one format
|
||||
to another.
|
||||
<li><b>util</b> - assorted utilities for arithmetic, hashing, surface
|
||||
@@ -134,6 +135,7 @@ each directory.
|
||||
<li><b>clover</b> - OpenCL state tracker
|
||||
<li><b>dri</b> - Meta state tracker for DRI drivers
|
||||
<li><b>egl</b> - Meta state tracker for EGL drivers
|
||||
<li><b>es</b> - OpenGL ES 1.x and 2.x state trackers
|
||||
<li><b>glx</b> - Meta state tracker for GLX
|
||||
<li><b>vdpau</b> - VDPAU state tracker
|
||||
<li><b>vega</b> - OpenVG 1.x state tracker
|
||||
|
@@ -1,138 +0,0 @@
|
||||
Name
|
||||
|
||||
EXT_shader_integer_mix
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_EXT_shader_integer_mix
|
||||
|
||||
Contact
|
||||
|
||||
Matt Turner (matt.turner 'at' intel.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Matt Turner, Intel
|
||||
Ian Romanick, Intel
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 09/12/2013
|
||||
Author Revision: 6
|
||||
|
||||
Number
|
||||
|
||||
TBD
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 3.0 or OpenGL ES 3.0 is required. This extension interacts with
|
||||
GL_ARB_ES3_compatibility.
|
||||
|
||||
This extension is written against the OpenGL 4.4 (core) specification
|
||||
and the GLSL 4.40 specification.
|
||||
|
||||
Overview
|
||||
|
||||
GLSL 1.30 (and GLSL ES 3.00) expanded the mix() built-in function to
|
||||
operate on a boolean third argument that does not interpolate but
|
||||
selects. This extension extends mix() to select between int, uint,
|
||||
and bool components.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 8 of the GLSL 4.40 Specification (Built-in Functions)
|
||||
|
||||
Modify Section 8.3, Common Functions
|
||||
|
||||
Additions to the table listing common built-in functions:
|
||||
|
||||
Syntax Description
|
||||
--------------------------- --------------------------------------------------
|
||||
genIType mix(genIType x, Selects which vector each returned component comes
|
||||
genIType y, from. For a component of a that is false, the
|
||||
genBType a) corresponding component of x is returned. For a
|
||||
genUType mix(genUType x, component of a that is true, the corresponding
|
||||
genUType y, component of y is returned.
|
||||
genBType a)
|
||||
genBType mix(genBType x,
|
||||
genBType y,
|
||||
genBType a)
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
Modifications to The OpenGL Shading Language Specification, Version 4.40
|
||||
|
||||
Including the following line in a shader can be used to control the
|
||||
language features described in this extension:
|
||||
|
||||
#extension GL_EXT_shader_integer_mix : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
New preprocessor #defines are added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_EXT_shader_integer_mix 1
|
||||
|
||||
Interactions with ARB_ES3_compatibility
|
||||
|
||||
On desktop implementations that support ARB_ES3_compatibility,
|
||||
GL_EXT_shader_integer_mix can be enabled (and the new functions
|
||||
used) in shaders declared with '#version 300 es'.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
1) Should we allow linear interpolation of integers via a non-boolean
|
||||
third component?
|
||||
|
||||
RESOLVED: No.
|
||||
|
||||
2) Should we allow mix() to select between boolean components?
|
||||
|
||||
RESOLVED: Yes. Implementing the same functionality using casts would be
|
||||
possible but ugly.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- ---------------------------------------------
|
||||
6 09/12/2013 idr After discussions in Khronos, change vendor
|
||||
prefix to EXT.
|
||||
|
||||
5 09/09/2013 idr Add ARB_ES3_compatibility interaction.
|
||||
|
||||
4 09/06/2013 mattst88 Allow extension on OpenGL ES 3.0.
|
||||
|
||||
3 08/28/2013 mattst88 Add #extension/#define changes.
|
||||
|
||||
2 08/26/2013 mattst88 Change vendor prefix to MESA. Add mix() that
|
||||
selects between boolean components.
|
||||
1 08/26/2013 mattst88 Initial revision
|
@@ -1,405 +0,0 @@
|
||||
Name
|
||||
|
||||
MESA_query_renderer
|
||||
|
||||
Name Strings
|
||||
|
||||
GLX_MESA_query_renderer
|
||||
|
||||
Contact
|
||||
|
||||
Ian Romanick <ian.d.romanick@intel.com>
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP claims.
|
||||
|
||||
Status
|
||||
|
||||
Incomplete. DO NOT SHIP.
|
||||
|
||||
Version
|
||||
|
||||
Version 6, 7-November-2013
|
||||
|
||||
Number
|
||||
|
||||
TBD.
|
||||
|
||||
Dependencies
|
||||
|
||||
GLX 1.4 is required.
|
||||
|
||||
GLX_ARB_create_context and GLX_ARB_create_context_profile are required.
|
||||
|
||||
This extension interacts with GLX_EXT_create_context_es2_profile and
|
||||
GLX_EXT_create_context_es_profile.
|
||||
|
||||
Overview
|
||||
|
||||
In many situations, applications want to detect characteristics of a
|
||||
rendering device before creating a context for that device. Information
|
||||
gathered at this stage may guide choices the application makes about
|
||||
color depth, number of samples per-pixel, texture quality, and so on.
|
||||
In addition, versions of supported APIs and implementation API
|
||||
preference may also guide start-up decisions made by the application.
|
||||
For example, one implementation may prefer vertex data be supplied using
|
||||
methods only available in a compatibility profile, but another
|
||||
implementation may only support the desired version in a core profile.
|
||||
|
||||
There are also cases where more than one renderer may be available per
|
||||
display. For example, there is typically a hardware implementation and
|
||||
a software based implementation. There are cases where an application
|
||||
may want to pick one over the other. One such situation is when the
|
||||
software implementation supports more features than the hardware
|
||||
implementation. Another situation is when a particular version of the
|
||||
hardware implementation is blacklisted due to known bugs.
|
||||
|
||||
This extension provides a mechanism for the application to query all of
|
||||
the available renderers for a particular display and screen. In
|
||||
addition, this extension provides a mechanism for applications to create
|
||||
contexts with respect to a specific renderer.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
Bool glXQueryRendererIntegerMESA(Display *dpy, int screen,
|
||||
int renderer, int attribute,
|
||||
unsigned int *value);
|
||||
Bool glXQueryCurrentRendererIntegerMESA(int attribute, unsigned int *value);
|
||||
|
||||
const char *glXQueryRendererStringMESA(Display *dpy, int screen,
|
||||
int renderer, int attribute);
|
||||
|
||||
const char *glXQueryCurrentRendererStringMESA(int attribute);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted as an <attribute> in glXQueryRendererIntegerMESA and
|
||||
glXQueryCurrentRendererIntegerMESA:
|
||||
|
||||
GLX_RENDERER_VENDOR_ID_MESA 0x8183
|
||||
GLX_RENDERER_DEVICE_ID_MESA 0x8184
|
||||
GLX_RENDERER_VERSION_MESA 0x8185
|
||||
GLX_RENDERER_ACCELERATED_MESA 0x8186
|
||||
GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
|
||||
GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
|
||||
GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
|
||||
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
|
||||
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
|
||||
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
|
||||
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
|
||||
|
||||
Accepted as an <attribute> in glXQueryRendererStringMESA and
|
||||
glXQueryCurrentRendererStringMESA:
|
||||
|
||||
GLX_RENDERER_VENDOR_ID_MESA
|
||||
GLX_RENDERER_DEVICE_ID_MESA
|
||||
|
||||
Accepted as an attribute name in <*attrib_list> in
|
||||
glXCreateContextAttribsARB:
|
||||
|
||||
GLX_RENDERER_ID_MESA 0x818E
|
||||
|
||||
Additions to the OpenGL / WGL Specifications
|
||||
|
||||
None. This specification is written for GLX.
|
||||
|
||||
Additions to the GLX 1.4 Specification
|
||||
|
||||
[Add the following to Section X.Y.Z of the GLX Specification]
|
||||
|
||||
To obtain information about the available renderers for a particular
|
||||
display and screen,
|
||||
|
||||
Bool glXQueryRendererIntegerMESA(Display *dpy, int screen, int renderer,
|
||||
int attribute, unsigned int *value);
|
||||
|
||||
can be used. The value for <attribute> will be returned in one or more
|
||||
integers specified by <value>. The values, data sizes, and descriptions
|
||||
of each renderer attribute are listed in the table below.
|
||||
|
||||
GLX renderer attribute number description
|
||||
of values
|
||||
---------------------- --------- -----------
|
||||
GLX_RENDERER_VENDOR_ID_MESA 1 PCI ID of the device vendor
|
||||
GLX_RENDERER_DEVICE_ID_MESA 1 PCI ID of the device
|
||||
GLX_RENDERER_VERSION_MESA 3 Major, minor, and patch level of
|
||||
the renderer implementation
|
||||
GLX_RENDERER_ACCELERATED_MESA 1 Boolean indicating whether or
|
||||
not the renderer is hardware
|
||||
accelerated
|
||||
GLX_RENDERER_VIDEO_MEMORY_MESA 1 Number of megabytes of video
|
||||
memory available to the renderer
|
||||
GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA
|
||||
1 Boolean indicating whether or
|
||||
not the renderer uses a unified
|
||||
memory architecture or has
|
||||
separate "on-card" and GART
|
||||
memory.
|
||||
GLX_RENDERER_PREFERRED_PROFILE_MESA
|
||||
1 Bitmask of the preferred context
|
||||
profile for this renderer. This
|
||||
value is suitable to be supplied
|
||||
with the
|
||||
GLX_CONTEXT_PROFILE_MASK_ARB
|
||||
attribute to
|
||||
glXCreateContextAttribsARB
|
||||
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA
|
||||
2 Maximum core profile major and
|
||||
minor version supported by the
|
||||
renderer
|
||||
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA
|
||||
2 Maximum compatibility profile
|
||||
major and minor version
|
||||
supported by the renderer
|
||||
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA
|
||||
2 Maximum OpenGL ES 1.x
|
||||
major and minor version
|
||||
supported by the renderer
|
||||
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA
|
||||
2 Maximum OpenGL ES 2.x or 3.x
|
||||
major and minor version
|
||||
supported by the renderer
|
||||
|
||||
In the table, boolean attributes will have either the value 0 or 1.
|
||||
|
||||
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA,
|
||||
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA,
|
||||
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA, and
|
||||
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA each return <0, 0> in
|
||||
*value if no version of that profile is supported.
|
||||
|
||||
GLX_RENDERER_VENDOR_ID_MESA and GLX_RENDERER_DEVICE_ID_MESA may return
|
||||
0xFFFFFFFF if the device does not have a PCI ID (because it is not a PCI
|
||||
device) or if the PCI ID is not available. In this case the application
|
||||
should rely on the string query instead.
|
||||
|
||||
If <attribute> is not a recognized value, False is returned, but no GLX
|
||||
error is generated. Otherwise, True is returned.
|
||||
|
||||
String versions of some attributes may also be queried using
|
||||
|
||||
const char *glXQueryRendererStringMESA(Display *dpy, int screen,
|
||||
int renderer, int attribute);
|
||||
|
||||
The value for <attribute> will be returned in one or more
|
||||
integers specified by <value>. The values, data sizes, and descriptions
|
||||
of each renderer attribute are listed in the table below.
|
||||
|
||||
GLX renderer attribute description
|
||||
---------------------- -----------
|
||||
GLX_RENDERER_VENDOR_ID_MESA Name of the renderer provider. This may
|
||||
differ from the vendor name of the
|
||||
underlying hardware.
|
||||
GLX_RENDERER_DEVICE_ID_MESA Name of the renderer. This may differ from
|
||||
the name of the underlying hardware (e.g.,
|
||||
for a software renderer).
|
||||
|
||||
If <attribute> is not a recognized value, NULL is returned, but no GLX
|
||||
error is generated.
|
||||
|
||||
The string returned for GLX_RENDERER_VENDOR_ID_MESA will have the same
|
||||
format as the string that would be returned by glGetString of GL_VENDOR.
|
||||
It may, however, have a different value.
|
||||
|
||||
The string returned for GLX_RENDERER_DEVICE_ID_MESA will have the same
|
||||
format as the string that would be returned by glGetString of GL_RENDERER.
|
||||
It may, however, have a different value.
|
||||
|
||||
|
||||
[Add to section section 3.3.7 "Rendering Contexts"]
|
||||
|
||||
The attribute name GLX_RENDERER_ID_MESA specified the index of the render
|
||||
against which the context should be created. The default value of
|
||||
GLX_RENDER_ID_MESA is 0.
|
||||
|
||||
|
||||
[Add to list of errors for glXCreateContextAttribsARB in section section
|
||||
3.3.7 "Rendering Contexts"]
|
||||
|
||||
* If the value of GLX_RENDERER_ID_MESA specifies a non-existent
|
||||
renderer, BadMatch is generated.
|
||||
|
||||
Dependencies on GLX_EXT_create_context_es_profile and
|
||||
GLX_EXT_create_context_es2_profile
|
||||
|
||||
If neither extension is supported, remove all mention of
|
||||
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA from the spec.
|
||||
|
||||
If GLX_EXT_create_context_es_profile is not supported, remove all mention of
|
||||
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA from the spec.
|
||||
|
||||
Issues
|
||||
|
||||
1) How should the difference between on-card and GART memory be exposed?
|
||||
|
||||
UNRESOLVED.
|
||||
|
||||
2) How should memory limitations of unified memory architecture (UMA)
|
||||
systems be exposed?
|
||||
|
||||
UNRESOLVED. Some hardware has different per-process and global
|
||||
limits for memory that can be accessed within a single draw call.
|
||||
|
||||
3) How should the renderer's API preference be advertised?
|
||||
|
||||
UNRESOLVED. The common case for desktop renderers is to prefer
|
||||
either core or compatibility. However, some renderers may actually
|
||||
prefer an ES context. This leaves the application in a tough spot
|
||||
if it can only support core or compatibility and the renderer says it
|
||||
wants ES.
|
||||
|
||||
4) Should OpenGL ES 2.0 and OpenGL ES 3.0 be treated separately?
|
||||
|
||||
RESOLVED. No. OpenGL ES 3.0 is backwards compatible with OpenGL ES
|
||||
2.0. Applications can detect OpenGL ES 3.0 support by querying
|
||||
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA.
|
||||
|
||||
5) How can applications tell the difference between different hardware
|
||||
renderers for the same device? For example, whether the renderer is the
|
||||
open-source driver or the closed-source driver.
|
||||
|
||||
RESOLVED. Assuming this extension is ever implemented outside Mesa,
|
||||
applications can query GLX_RENDERER_VENDOR_ID_MESA from
|
||||
glXQueryRendererStringMESA. This will almost certainly return
|
||||
different strings for open-source and closed-source drivers.
|
||||
|
||||
6) What is the value of GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA for
|
||||
software renderers?
|
||||
|
||||
UNRESOLVED. Video (display) memory and texture memory is not unified
|
||||
for software implementations, so it seems reasonable for this to be
|
||||
False.
|
||||
|
||||
7) How does an application determine the number of available renderers?
|
||||
|
||||
UNRESOLVED.
|
||||
|
||||
8) What happens if a fbconfig is used to create context on a renderer
|
||||
that cannot support it? For example, if a multisampled config is used
|
||||
with a software renderer that does not support multisampling.
|
||||
|
||||
RESOLVED. The language for glXCreateContextAttribsARB already covers
|
||||
this case. Context creation will fail, and BadMatch is generated.
|
||||
|
||||
9) In addition to being able to query the supported versions, should
|
||||
applications also be able to query the supported extensions?
|
||||
|
||||
RESOLVED. No. Desktop OpenGL core profiles and OpenGL ES 3.0 have
|
||||
moved away from the monolithic string returned by glGetString of
|
||||
GL_EXTENSIONS. Providing the newer indexed query would require adding
|
||||
a lot of extra infrastructure, and it would probably provide little
|
||||
benefit to applications.
|
||||
|
||||
10) What combination of values for GLX_RENDERER_PREFERRED_PROFILE_MESA,
|
||||
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA, and
|
||||
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA should be returned
|
||||
for a renderer that only supports OpenGL 3.1 without the
|
||||
GL_ARB_compatibility extension?
|
||||
|
||||
RESOLVED. The renderer will return GLX_CONTEXT_CORE_PROFILE_BIT_ARB
|
||||
for GLX_RENDERER_PREFERRED_PROFILE_MESA.
|
||||
|
||||
Further, the renderer will return <3,0> for
|
||||
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA because OpenGL
|
||||
3.1 without GL_ARB_compatibility is not backwards compatible with
|
||||
previous versions of OpenGL. The render will return <3,1> for
|
||||
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA indicating that support
|
||||
for OpenGL 3.1 is available.
|
||||
|
||||
Even though there is no OpenGL 3.1 core profile, the values
|
||||
returned for GLX_RENDERER_PREFERRED_PROFILE_MESA and
|
||||
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA can be supplied
|
||||
with the GLX_CONTEXT_PROFILE_MASK_ARB and
|
||||
GLX_CONTEXT_{MAJOR,MINOR}_VERSION_ARB attributes of
|
||||
glXCreateContextAttribsARB without error. If the requested
|
||||
OpenGL version is less than 3.2, the
|
||||
GLX_CONTEXT_PROFILE_MASK_ARB attribute is ignored by
|
||||
glXCreateContextAttribsARB.
|
||||
|
||||
11) How can application learn about multi-GPU (e.g., SLI, CrossFireX,
|
||||
etc.) configurations?
|
||||
|
||||
UNRESOLVED. Based on ISV feedback, this is important information to
|
||||
provide to the application. Given the variety of possible hardware
|
||||
configurations (e.g., Hybrid CrossFireX) and different rendering
|
||||
modes (e.g., split-frame rendering vs. alternate-frame rendering),
|
||||
it's not clear how this information can be communicated.
|
||||
|
||||
It is likely that this will be left to a layered extension.
|
||||
|
||||
12) Should capability queries similar to those in
|
||||
GL_ARB_internalformat_query or GL_ARB_internalformat_query2 be added?
|
||||
|
||||
RESOLVED. No. With the possible exception of the texture size
|
||||
queries, it seems unlikely that applications would ever use this
|
||||
information before creating a context.
|
||||
|
||||
13) Existing GL extensions (e.g., GL_ATI_meminfo and
|
||||
GL_NVX_gpu_memory_info) allow easy queries after context creation. With
|
||||
this extension it is a bit of a pain for a portable application to query
|
||||
the information after context creation.
|
||||
|
||||
RESOLVED. Add versions of the queries that implicitly take the
|
||||
display, screen, and renderer from the currently bound context.
|
||||
|
||||
14) Why not make the queries from issue #13 GL functions (instead of GLX)?
|
||||
|
||||
RESOLVED. It is fairly compelling for the post-creation queries to
|
||||
just use glGetInteger and glGetString. However, the GL enums and
|
||||
the GLX enums would have different names and would almost certainly
|
||||
have different values. It seems like this would cause more problems
|
||||
than it would solve.
|
||||
|
||||
15) Should the string queries be required to return the same values as
|
||||
glGetString(GL_VENDOR) and glGetString(GL_RENDERER)?
|
||||
|
||||
UNRESOLVED. This may be useful for applications that already do
|
||||
device detection based on these strings.
|
||||
|
||||
16) What type should the value parameter of glXQueryRendererIntegerMESA
|
||||
and glXQueryCurrentRendererIntegerMESA be?
|
||||
|
||||
UNRESOLVED. Other similar GLX query functions just use int or
|
||||
unsigned int, so that's what this extension uses for now. However,
|
||||
an expeclitly sized value, such as uint32_t or uint64_t, seems
|
||||
preferable.
|
||||
|
||||
17) What about SoCs and other systems that don't have PCI?
|
||||
|
||||
RESOLVED. The GLX_RENDERER_VENDOR_ID_MESA and
|
||||
GLX_RENDERER_DEVICE_ID_MESA integer queries may return 0xFFFFFFFF if a
|
||||
PCI ID either does not exist or is not available. Implementations
|
||||
should make every attempt to return as much information as is
|
||||
possible. For example, if the implementation is running on a non-PCI
|
||||
SoC with a Qualcomm GPU, GLX_RENDERER_VENDOR_ID_MESA should return
|
||||
0x168C, but GLX_RENDERER_DEVICE_ID_MESA will return 0x0000.
|
||||
|
||||
Revision History
|
||||
|
||||
Version 1, 2012/08/27 - Initial version
|
||||
|
||||
Version 2, 2012/09/04 - Specify behavior of implementations that
|
||||
do not support certain profiles.
|
||||
Change wording of issue #8 to be more
|
||||
clear.
|
||||
Make some wording changes to issue #10 to
|
||||
clarify the resolution a bit.
|
||||
|
||||
Version 3, 2012/09/23 - Add issue #11 regarding multi-GPU systems.
|
||||
|
||||
Version 4, 2013/02/01 - Add issue #12 regarding texture / renderbuffer
|
||||
format queries.
|
||||
|
||||
Version 5, 2013/02/14 - Add issues #13 and #14 regarding simpler queires
|
||||
after the context is created and made current.
|
||||
Add issue #15 regarding the string query.
|
||||
Add issue #16 regarding the value type returned
|
||||
by the Integer functions.
|
||||
|
||||
Version 6, 2013/10/25 - Fix a typo. Update the list of functions to
|
||||
which the new enums can be passed. The "Current"
|
||||
versions were previously missing.
|
||||
|
||||
Version 7, 2013/11/07 - Fix a couple more typos. Add issue #17 regarding
|
||||
the PCI queries on systems that don't have PCI.
|
@@ -16,7 +16,7 @@ IP Status
|
||||
|
||||
Status
|
||||
|
||||
DEPRECATED - Support removed in Mesa 10.1.
|
||||
Shipping in Mesa 7.1
|
||||
|
||||
Version
|
||||
|
||||
|
@@ -17,7 +17,7 @@ Status
|
||||
|
||||
Version
|
||||
|
||||
Version 5, July 16, 2013
|
||||
Version 1, March 1, 2011
|
||||
|
||||
Number
|
||||
|
||||
@@ -57,7 +57,7 @@ New Procedures and Functions
|
||||
struct wl_display *display);
|
||||
|
||||
EGLBoolean eglQueryWaylandBufferWL(EGLDisplay dpy,
|
||||
struct wl_resource *buffer,
|
||||
struct wl_buffer *buffer,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
New Tokens
|
||||
@@ -76,11 +76,6 @@ New Tokens
|
||||
EGL_TEXTURE_Y_UV_WL 0x31D8
|
||||
EGL_TEXTURE_Y_XUXV_WL 0x31D9
|
||||
|
||||
Accepted in the <attribute> parameter of eglQueryWaylandBufferWL:
|
||||
|
||||
EGL_TEXTURE_FORMAT 0x3080
|
||||
EGL_WAYLAND_Y_INVERTED_WL 0x31DB
|
||||
|
||||
|
||||
Additions to the EGL 1.4 Specification:
|
||||
|
||||
@@ -162,16 +157,6 @@ Additions to the EGL 1.4 Specification:
|
||||
Further, eglQueryWaylandBufferWL accepts attributes EGL_WIDTH and
|
||||
EGL_HEIGHT to query the width and height of the wl_buffer.
|
||||
|
||||
Also, eglQueryWaylandBufferWL may accept
|
||||
EGL_WAYLAND_Y_INVERTED_WL attribute to query orientation of
|
||||
wl_buffer. If EGL_WAYLAND_Y_INVERTED_WL is supported
|
||||
eglQueryWaylandBufferWL returns EGL_TRUE and value is a boolean
|
||||
that tells if wl_buffer is y-inverted or not. If
|
||||
EGL_WAYLAND_Y_INVERTED_WL is not supported
|
||||
eglQueryWaylandBufferWL returns EGL_FALSE, in that case
|
||||
wl_buffer should be treated as if value of
|
||||
EGL_WAYLAND_Y_INVERTED_WL was EGL_TRUE.
|
||||
|
||||
Issues
|
||||
|
||||
Revision History
|
||||
@@ -188,10 +173,3 @@ Revision History
|
||||
Use EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB, and EGL_TEXTURE_RGBA,
|
||||
and just define the new YUV texture formats. Add support for
|
||||
EGL_WIDTH and EGL_HEIGHT in the query attributes (Kristian Høgsberg)
|
||||
Version 5, July 16, 2013
|
||||
Change eglQueryWaylandBufferWL to take a resource pointer to the
|
||||
buffer instead of a pointer to a struct wl_buffer, as the latter has
|
||||
been deprecated. (Ander Conselvan de Oliveira)
|
||||
Version 6, September 16, 2013
|
||||
Add EGL_WAYLAND_Y_INVERTED_WL attribute to allow specifying
|
||||
wl_buffer's orientation.
|
||||
|
@@ -1,101 +0,0 @@
|
||||
Name
|
||||
|
||||
WL_create_wayland_buffer_from_image
|
||||
|
||||
Name Strings
|
||||
|
||||
EGL_WL_create_wayland_buffer_from_image
|
||||
|
||||
Contributors
|
||||
|
||||
Neil Roberts
|
||||
Axel Davy
|
||||
Daniel Stone
|
||||
|
||||
Contact
|
||||
|
||||
Neil Roberts <neil.s.roberts@intel.com>
|
||||
|
||||
Status
|
||||
|
||||
Proposal
|
||||
|
||||
Version
|
||||
|
||||
Version 2, October 25, 2013
|
||||
|
||||
Number
|
||||
|
||||
EGL Extension #not assigned
|
||||
|
||||
Dependencies
|
||||
|
||||
Requires EGL 1.4 or later. This extension is written against the
|
||||
wording of the EGL 1.4 specification.
|
||||
|
||||
EGL_KHR_base_image is required.
|
||||
|
||||
Overview
|
||||
|
||||
This extension provides an entry point to create a wl_buffer which shares
|
||||
its contents with a given EGLImage. The expected use case for this is in a
|
||||
nested Wayland compositor which is using subsurfaces to present buffers
|
||||
from its clients. Using this extension it can attach the client buffers
|
||||
directly to the subsurface without having to blit the contents into an
|
||||
intermediate buffer. The compositing can then be done in the parent
|
||||
compositor.
|
||||
|
||||
The nested compositor can create an EGLImage from a client buffer resource
|
||||
using the existing WL_bind_wayland_display extension. It should also be
|
||||
possible to create buffers using other types of images although there is
|
||||
no expected use case for that.
|
||||
|
||||
IP Status
|
||||
|
||||
Open-source; freely implementable.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy,
|
||||
EGLImageKHR image);
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to the EGL 1.4 Specification:
|
||||
|
||||
To create a client-side wl_buffer from an EGLImage call
|
||||
|
||||
struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy,
|
||||
EGLImageKHR image);
|
||||
|
||||
The returned buffer will share the contents with the given EGLImage. Any
|
||||
updates to the image will also be updated in the wl_buffer. Typically the
|
||||
EGLImage will be generated in a nested Wayland compositor using a buffer
|
||||
resource from a client via the EGL_WL_bind_wayland_display extension.
|
||||
|
||||
If there was an error then the function will return NULL. In particular it
|
||||
will generate EGL_BAD_MATCH if the implementation is not able to represent
|
||||
the image as a wl_buffer. The possible reasons for this error are
|
||||
implementation-dependant but may include problems such as an unsupported
|
||||
format or tiling mode or that the buffer is in memory that is inaccessible
|
||||
to the GPU that the given EGLDisplay is using.
|
||||
|
||||
Issues
|
||||
|
||||
1) Under what circumstances can the EGL_BAD_MATCH error be generated? Does
|
||||
this include for example unsupported tiling modes?
|
||||
|
||||
RESOLVED: Yes, the EGL_BAD_MATCH error can be generated for any reason
|
||||
which prevents the implementation from representing the image as a
|
||||
wl_buffer. For example, these problems can be but are not limited to
|
||||
unsupported tiling modes, inaccessible memory or an unsupported pixel
|
||||
format.
|
||||
|
||||
Revision History
|
||||
|
||||
Version 1, September 6, 2013
|
||||
Initial draft (Neil Roberts)
|
||||
Version 2, October 25, 2013
|
||||
Added a note about more possible reasons for returning EGL_BAD_FORMAT.
|
@@ -14,7 +14,7 @@
|
||||
<iframe src="contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Acknowledgements</h1>
|
||||
<h1>Acknowledgments</h1>
|
||||
|
||||
|
||||
The following individuals and groups are to be acknowledged for their
|
||||
|
@@ -27,10 +27,9 @@ MacOS are all supported.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Most modern Linux distros include the SVGA3D driver so end users shouldn't
|
||||
be concerned with this information.
|
||||
But if your distro lacks the driver or you want to update to the latest code
|
||||
these instructions explain what to do.
|
||||
End users shouldn't have to go through all these steps once the driver is
|
||||
included in newer Linux distributions.
|
||||
Fedora 18 and Ubuntu 12.10 include the VMware guest GL driver, for example.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -54,13 +53,6 @@ The components involved in this include:
|
||||
<li>Mesa/gallium OpenGL driver: "svga"
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
All of these components reside in the guest Linux virtual machine.
|
||||
On the host, all you're doing is running VMware
|
||||
<a href="http://www.vmware.com/products/workstation/">Workstation</a> or
|
||||
<a href="http://www.vmware.com/products/fusion/">Fusion</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Prerequisites</h2>
|
||||
|
||||
@@ -142,7 +134,7 @@ As before, if you're on a 32-bit system, you should skip the --libdir
|
||||
configure option.
|
||||
<pre>
|
||||
cd $TOP/mesa
|
||||
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa --disable-dri3
|
||||
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa
|
||||
make
|
||||
sudo make install
|
||||
</pre>
|
||||
|
@@ -107,7 +107,7 @@ for your application.
|
||||
<p>
|
||||
When using Mesa directly or with GLX, it's up to the application
|
||||
writer to create a window with an appropriate colormap. The GLUT
|
||||
toolkit tries to minimize colormap <em>flashing</em> by sharing
|
||||
toolkit tris to minimize colormap <em>flashing</em> by sharing
|
||||
colormaps when possible. Specifically, if the visual and depth of the
|
||||
window matches that of the root window, the root window's colormap
|
||||
will be shared by the Mesa window. Otherwise, a new, private colormap
|
||||
|
1
doxygen/.gitignore
vendored
1
doxygen/.gitignore
vendored
@@ -8,7 +8,6 @@ gallium
|
||||
gbm
|
||||
glapi
|
||||
glsl
|
||||
i965
|
||||
main
|
||||
math
|
||||
math_subset
|
||||
|
@@ -17,8 +17,7 @@ FULL = \
|
||||
swrast_setup.doxy \
|
||||
tnl.doxy \
|
||||
tnl_dd.doxy \
|
||||
gbm.doxy \
|
||||
i965.doxy
|
||||
gbm.doxy
|
||||
|
||||
full: $(FULL:.doxy=.tag)
|
||||
$(foreach FILE,$(FULL),doxygen $(FILE);)
|
||||
|
@@ -15,6 +15,5 @@
|
||||
<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="../i965/index.html">i965</a>
|
||||
<a class="qindex" href="../gbm/index.html">gbm</a>
|
||||
</div>
|
||||
|
@@ -1,50 +0,0 @@
|
||||
# Doxyfile 0.1
|
||||
|
||||
@INCLUDE = common.doxy
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "Intel i965 Driver"
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../src/mesa/drivers/dri/i965
|
||||
FILE_PATTERNS = *.c *.cpp *.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 = i965
|
||||
#---------------------------------------------------------------------------
|
||||
# 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::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES = glsl.tag=../glsl \
|
||||
main.tag=../main \
|
||||
math.tag=../math \
|
||||
swrast.tag=../swrast \
|
||||
swrast_setup.tag=../swrast_setup \
|
||||
tnl.tag=../tnl \
|
||||
tnl_dd.tag=../tnl_dd \
|
||||
vbo.tag=vbo
|
||||
GENERATE_TAGFILE = i965.tag
|
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2008 VMware, Inc.
|
||||
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -115,32 +115,20 @@ typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
|
||||
#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
|
||||
#define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */
|
||||
|
||||
#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB /* eglQueryWaylandBufferWL attribute */
|
||||
|
||||
#define EGL_TEXTURE_Y_U_V_WL 0x31D7
|
||||
#define EGL_TEXTURE_Y_UV_WL 0x31D8
|
||||
#define EGL_TEXTURE_Y_XUXV_WL 0x31D9
|
||||
|
||||
struct wl_display;
|
||||
struct wl_resource;
|
||||
struct wl_buffer;
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_buffer *buffer, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef EGL_WL_create_wayland_buffer_from_image
|
||||
#define EGL_WL_create_wayland_buffer_from_image 1
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif
|
||||
typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_buffer *buffer, EGLint attribute, EGLint *value);
|
||||
|
||||
#endif
|
||||
|
||||
|
107
include/GL/gl.h
107
include/GL/gl.h
@@ -33,14 +33,25 @@
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Begin system-specific stuff.
|
||||
* Begin system-specific stuff. Do not do any of this when building
|
||||
* for SciTech SNAP, as this is all done before this header file is
|
||||
* included.
|
||||
*/
|
||||
#if !defined(__SCITECH_SNAP__)
|
||||
|
||||
#if defined(__BEOS__)
|
||||
#include <stdlib.h> /* to get some BeOS-isms */
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
|
||||
#define OPENSTEP
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
|
||||
#define __WIN32__
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__) && !defined(__CYGWIN__)
|
||||
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
|
||||
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
|
||||
# define GLAPI __declspec(dllexport)
|
||||
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
||||
@@ -61,6 +72,10 @@
|
||||
# define GLAPIENTRY
|
||||
#endif /* WIN32 && !CYGWIN */
|
||||
|
||||
#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
|
||||
# define PRAGMA_EXPORT_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* WINDOWS: Include windows.h here to define APIENTRY.
|
||||
* It is also useful when applications include this file by
|
||||
@@ -76,6 +91,10 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
|
||||
#pragma import on
|
||||
#endif
|
||||
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
@@ -97,10 +116,15 @@
|
||||
#define GLAPIENTRYP GLAPIENTRY *
|
||||
#endif
|
||||
|
||||
#ifdef CENTERLINE_CLPP
|
||||
#define signed
|
||||
#endif
|
||||
|
||||
#if defined(PRAGMA_EXPORT_SUPPORTED)
|
||||
#pragma export on
|
||||
#endif
|
||||
|
||||
#endif /* !__SCITECH_SNAP__ */
|
||||
/*
|
||||
* End system-specific stuff.
|
||||
**********************************************************************/
|
||||
@@ -1712,6 +1736,8 @@ GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
|
||||
GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
|
||||
GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
|
||||
|
||||
typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||
|
||||
|
||||
|
||||
@@ -2062,6 +2088,26 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
|
||||
|
||||
|
||||
|
||||
#if GL_ARB_shader_objects
|
||||
|
||||
#ifndef GL_MESA_shader_debug
|
||||
#define GL_MESA_shader_debug 1
|
||||
|
||||
#define GL_DEBUG_OBJECT_MESA 0x8759
|
||||
#define GL_DEBUG_PRINT_MESA 0x875A
|
||||
#define GL_DEBUG_ASSERT_MESA 0x875B
|
||||
|
||||
GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
|
||||
GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
|
||||
GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
|
||||
GLsizei *length, GLcharARB *debugLog);
|
||||
GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
|
||||
|
||||
#endif /* GL_MESA_shader_debug */
|
||||
|
||||
#endif /* GL_ARB_shader_objects */
|
||||
|
||||
|
||||
/*
|
||||
* ???. GL_MESA_packed_depth_stencil
|
||||
* XXX obsolete
|
||||
@@ -2078,6 +2124,60 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
|
||||
#endif /* GL_MESA_packed_depth_stencil */
|
||||
|
||||
|
||||
#ifndef GL_MESA_program_debug
|
||||
#define GL_MESA_program_debug 1
|
||||
|
||||
#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
|
||||
#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
|
||||
#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
|
||||
#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
|
||||
#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
|
||||
#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
|
||||
#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
|
||||
#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
|
||||
|
||||
typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
|
||||
|
||||
GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
|
||||
|
||||
GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
|
||||
|
||||
#endif /* GL_MESA_program_debug */
|
||||
|
||||
|
||||
#ifndef GL_MESA_texture_array
|
||||
#define GL_MESA_texture_array 1
|
||||
|
||||
/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array.
|
||||
*/
|
||||
#ifndef GL_EXT_texture_array
|
||||
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target,
|
||||
GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
|
||||
#if 0
|
||||
/* (temporarily) disabled because of collision with typedef in glext.h
|
||||
* that happens if apps include both gl.h and glext.h
|
||||
*/
|
||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target,
|
||||
GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
#endif
|
||||
|
||||
#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
|
||||
#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
|
||||
#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
|
||||
#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
|
||||
#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
|
||||
#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
|
||||
#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef GL_ATI_blend_equation_separate
|
||||
#define GL_ATI_blend_equation_separate 1
|
||||
|
||||
@@ -2120,6 +2220,9 @@ typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum t
|
||||
#pragma export off
|
||||
#endif
|
||||
|
||||
#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
|
||||
#pragma import off
|
||||
#endif
|
||||
/*
|
||||
* End system-specific stuff
|
||||
**********************************************************************/
|
||||
|
1306
include/GL/glext.h
1306
include/GL/glext.h
File diff suppressed because it is too large
Load Diff
@@ -468,32 +468,7 @@ extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer
|
||||
#endif /* GLX_EXT_texture_from_pixmap */
|
||||
|
||||
|
||||
#ifndef GLX_MESA_query_renderer
|
||||
#define GLX_MESA_query_renderer 1
|
||||
|
||||
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
|
||||
#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
|
||||
#define GLX_RENDERER_VERSION_MESA 0x8185
|
||||
#define GLX_RENDERER_ACCELERATED_MESA 0x8186
|
||||
#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
|
||||
#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
|
||||
#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
|
||||
#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
|
||||
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
|
||||
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
|
||||
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
|
||||
#define GLX_RENDERER_ID_MESA 0x818E
|
||||
|
||||
Bool glXQueryRendererIntegerMESA(Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
Bool glXQueryCurrentRendererIntegerMESA(int attribute, unsigned int *value);
|
||||
const char *glXQueryRendererStringMESA(Display *dpy, int screen, int renderer, int attribute);
|
||||
const char *glXQueryCurrentRendererStringMESA(int attribute);
|
||||
|
||||
typedef Bool (*PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
typedef Bool (*PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
|
||||
typedef const char *(*PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
|
||||
typedef const char *(*PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
|
||||
#endif /* GLX_MESA_query_renderer */
|
||||
|
||||
/*** Should these go here, or in another header? */
|
||||
/*
|
||||
|
1585
include/GL/glxext.h
1585
include/GL/glxext.h
File diff suppressed because it is too large
Load Diff
@@ -86,10 +86,6 @@ typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension;
|
||||
typedef struct __DRI2flushExtensionRec __DRI2flushExtension;
|
||||
typedef struct __DRI2throttleExtensionRec __DRI2throttleExtension;
|
||||
|
||||
|
||||
typedef struct __DRIimageLoaderExtensionRec __DRIimageLoaderExtension;
|
||||
typedef struct __DRIimageDriverExtensionRec __DRIimageDriverExtension;
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
@@ -334,6 +330,12 @@ struct __DRI2throttleExtensionRec {
|
||||
enum __DRI2throttleReason reason);
|
||||
};
|
||||
|
||||
/**
|
||||
* XML document describing the configuration options supported by the
|
||||
* driver.
|
||||
*/
|
||||
extern const char __driConfigOptions[];
|
||||
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
@@ -437,7 +439,7 @@ struct __DRIdamageExtensionRec {
|
||||
* SWRast Loader extension.
|
||||
*/
|
||||
#define __DRI_SWRAST_LOADER "DRI_SWRastLoader"
|
||||
#define __DRI_SWRAST_LOADER_VERSION 2
|
||||
#define __DRI_SWRAST_LOADER_VERSION 1
|
||||
struct __DRIswrastLoaderExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
@@ -461,13 +463,6 @@ struct __DRIswrastLoaderExtensionRec {
|
||||
void (*getImage)(__DRIdrawable *readable,
|
||||
int x, int y, int width, int height,
|
||||
char *data, void *loaderPrivate);
|
||||
|
||||
/**
|
||||
* Put image to drawable
|
||||
*/
|
||||
void (*putImage2)(__DRIdrawable *drawable, int op,
|
||||
int x, int y, int width, int height, int stride,
|
||||
char *data, void *loaderPrivate);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -498,19 +493,6 @@ struct __DRIuseInvalidateExtensionRec {
|
||||
*/
|
||||
#define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions"
|
||||
|
||||
/**
|
||||
* This symbol replaces the __DRI_DRIVER_EXTENSIONS symbol, and will be
|
||||
* suffixed by "_drivername", allowing multiple drivers to be built into one
|
||||
* library, and also giving the driver the chance to return a variable driver
|
||||
* extensions struct depending on the driver name being loaded or any other
|
||||
* system state.
|
||||
*
|
||||
* The function prototype is:
|
||||
*
|
||||
* const __DRIextension **__driDriverGetExtensions_drivername(void);
|
||||
*/
|
||||
#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
|
||||
|
||||
/**
|
||||
* Tokens for __DRIconfig attribs. A number of attributes defined by
|
||||
* GLX or EGL standards are not in the table, as they must be provided
|
||||
@@ -724,7 +706,7 @@ struct __DRIlegacyExtensionRec {
|
||||
* conjunction with the core extension.
|
||||
*/
|
||||
#define __DRI_SWRAST "DRI_SWRast"
|
||||
#define __DRI_SWRAST_VERSION 4
|
||||
#define __DRI_SWRAST_VERSION 3
|
||||
|
||||
struct __DRIswrastExtensionRec {
|
||||
__DRIextension base;
|
||||
@@ -760,48 +742,8 @@ struct __DRIswrastExtensionRec {
|
||||
const uint32_t *attribs,
|
||||
unsigned *error,
|
||||
void *loaderPrivate);
|
||||
|
||||
/**
|
||||
* createNewScreen() with the driver extensions passed in.
|
||||
*
|
||||
* \since version 4
|
||||
*/
|
||||
__DRIscreen *(*createNewScreen2)(int screen,
|
||||
const __DRIextension **loader_extensions,
|
||||
const __DRIextension **driver_extensions,
|
||||
const __DRIconfig ***driver_configs,
|
||||
void *loaderPrivate);
|
||||
|
||||
};
|
||||
|
||||
/** Common DRI function definitions, shared among DRI2 and Image extensions
|
||||
*/
|
||||
|
||||
typedef __DRIscreen *
|
||||
(*__DRIcreateNewScreen2Func)(int screen, int fd,
|
||||
const __DRIextension **extensions,
|
||||
const __DRIextension **driver_extensions,
|
||||
const __DRIconfig ***driver_configs,
|
||||
void *loaderPrivate);
|
||||
|
||||
typedef __DRIdrawable *
|
||||
(*__DRIcreateNewDrawableFunc)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
void *loaderPrivate);
|
||||
|
||||
typedef __DRIcontext *
|
||||
(*__DRIcreateContextAttribsFunc)(__DRIscreen *screen,
|
||||
int api,
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
unsigned num_attribs,
|
||||
const uint32_t *attribs,
|
||||
unsigned *error,
|
||||
void *loaderPrivate);
|
||||
|
||||
typedef unsigned int
|
||||
(*__DRIgetAPIMaskFunc)(__DRIscreen *screen);
|
||||
|
||||
/**
|
||||
* DRI2 Loader extension.
|
||||
*/
|
||||
@@ -882,7 +824,7 @@ struct __DRIdri2LoaderExtensionRec {
|
||||
* constructors for DRI2.
|
||||
*/
|
||||
#define __DRI_DRI2 "DRI_DRI2"
|
||||
#define __DRI_DRI2_VERSION 4
|
||||
#define __DRI_DRI2_VERSION 3
|
||||
|
||||
#define __DRI_API_OPENGL 0 /**< OpenGL compatibility profile */
|
||||
#define __DRI_API_GLES 1 /**< OpenGL ES 1.x */
|
||||
@@ -949,14 +891,17 @@ struct __DRIdri2ExtensionRec {
|
||||
const __DRIconfig ***driver_configs,
|
||||
void *loaderPrivate);
|
||||
|
||||
__DRIcreateNewDrawableFunc createNewDrawable;
|
||||
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
void *loaderPrivate);
|
||||
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
void *loaderPrivate);
|
||||
|
||||
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
void *loaderPrivate);
|
||||
|
||||
/* Since version 2 */
|
||||
__DRIgetAPIMaskFunc getAPIMask;
|
||||
unsigned int (*getAPIMask)(__DRIscreen *screen);
|
||||
|
||||
__DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
|
||||
int api,
|
||||
@@ -979,14 +924,14 @@ struct __DRIdri2ExtensionRec {
|
||||
*
|
||||
* \sa __DRIswrastExtensionRec::createContextAttribs
|
||||
*/
|
||||
__DRIcreateContextAttribsFunc createContextAttribs;
|
||||
|
||||
/**
|
||||
* createNewScreen with the driver's extension list passed in.
|
||||
*
|
||||
* \since version 4
|
||||
*/
|
||||
__DRIcreateNewScreen2Func createNewScreen2;
|
||||
__DRIcontext *(*createContextAttribs)(__DRIscreen *screen,
|
||||
int api,
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
unsigned num_attribs,
|
||||
const uint32_t *attribs,
|
||||
unsigned *error,
|
||||
void *loaderPrivate);
|
||||
};
|
||||
|
||||
|
||||
@@ -995,7 +940,7 @@ struct __DRIdri2ExtensionRec {
|
||||
* extensions.
|
||||
*/
|
||||
#define __DRI_IMAGE "DRI_IMAGE"
|
||||
#define __DRI_IMAGE_VERSION 8
|
||||
#define __DRI_IMAGE_VERSION 7
|
||||
|
||||
/**
|
||||
* These formats correspond to the similarly named MESA_FORMAT_*
|
||||
@@ -1019,14 +964,10 @@ struct __DRIdri2ExtensionRec {
|
||||
#define __DRI_IMAGE_FORMAT_R8 0x1006 /* Since version 5 */
|
||||
#define __DRI_IMAGE_FORMAT_GR88 0x1007
|
||||
#define __DRI_IMAGE_FORMAT_NONE 0x1008
|
||||
#define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009
|
||||
#define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a
|
||||
#define __DRI_IMAGE_FORMAT_SARGB8 0x100b
|
||||
|
||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||
#define __DRI_IMAGE_USE_CURSOR 0x0004 /* Depricated */
|
||||
#define __DRI_IMAGE_USE_LINEAR 0x0008
|
||||
|
||||
|
||||
/**
|
||||
@@ -1041,7 +982,6 @@ struct __DRIdri2ExtensionRec {
|
||||
#define __DRI_IMAGE_FOURCC_XRGB8888 0x34325258
|
||||
#define __DRI_IMAGE_FOURCC_ABGR8888 0x34324241
|
||||
#define __DRI_IMAGE_FOURCC_XBGR8888 0x34324258
|
||||
#define __DRI_IMAGE_FOURCC_SARGB8888 0x83324258
|
||||
#define __DRI_IMAGE_FOURCC_YUV410 0x39565559
|
||||
#define __DRI_IMAGE_FOURCC_YUV411 0x31315559
|
||||
#define __DRI_IMAGE_FOURCC_YUV420 0x32315559
|
||||
@@ -1087,25 +1027,6 @@ struct __DRIdri2ExtensionRec {
|
||||
* 7+. Each query will return a
|
||||
* new fd. */
|
||||
|
||||
enum __DRIYUVColorSpace {
|
||||
__DRI_YUV_COLOR_SPACE_UNDEFINED = 0,
|
||||
__DRI_YUV_COLOR_SPACE_ITU_REC601 = 0x327F,
|
||||
__DRI_YUV_COLOR_SPACE_ITU_REC709 = 0x3280,
|
||||
__DRI_YUV_COLOR_SPACE_ITU_REC2020 = 0x3281
|
||||
};
|
||||
|
||||
enum __DRISampleRange {
|
||||
__DRI_YUV_RANGE_UNDEFINED = 0,
|
||||
__DRI_YUV_FULL_RANGE = 0x3282,
|
||||
__DRI_YUV_NARROW_RANGE = 0x3283
|
||||
};
|
||||
|
||||
enum __DRIChromaSiting {
|
||||
__DRI_YUV_CHROMA_SITING_UNDEFINED = 0,
|
||||
__DRI_YUV_CHROMA_SITING_0 = 0x3284,
|
||||
__DRI_YUV_CHROMA_SITING_0_5 = 0x3285
|
||||
};
|
||||
|
||||
/**
|
||||
* \name Reasons that __DRIimageExtensionRec::createImageFromTexture might fail
|
||||
*/
|
||||
@@ -1211,24 +1132,6 @@ struct __DRIimageExtensionRec {
|
||||
int *fds, int num_fds,
|
||||
int *strides, int *offsets,
|
||||
void *loaderPrivate);
|
||||
|
||||
/**
|
||||
* Like createImageFromFds, but takes additional attributes.
|
||||
*
|
||||
* For EGL_EXT_image_dma_buf_import.
|
||||
*
|
||||
* \since 8
|
||||
*/
|
||||
__DRIimage *(*createImageFromDmaBufs)(__DRIscreen *screen,
|
||||
int width, int height, int fourcc,
|
||||
int *fds, int num_fds,
|
||||
int *strides, int *offsets,
|
||||
enum __DRIYUVColorSpace color_space,
|
||||
enum __DRISampleRange sample_range,
|
||||
enum __DRIChromaSiting horiz_siting,
|
||||
enum __DRIChromaSiting vert_siting,
|
||||
unsigned *error,
|
||||
void *loaderPrivate);
|
||||
};
|
||||
|
||||
|
||||
@@ -1283,135 +1186,4 @@ struct __DRIrobustnessExtensionRec {
|
||||
__DRIextension base;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRI config options extension.
|
||||
*
|
||||
* This extension provides the XML string containing driver options for use by
|
||||
* the loader in supporting the driconf application.
|
||||
*/
|
||||
#define __DRI_CONFIG_OPTIONS "DRI_ConfigOptions"
|
||||
#define __DRI_CONFIG_OPTIONS_VERSION 1
|
||||
|
||||
typedef struct __DRIconfigOptionsExtensionRec {
|
||||
__DRIextension base;
|
||||
const char *xml;
|
||||
} __DRIconfigOptionsExtension;
|
||||
|
||||
/**
|
||||
* This extension provides a driver vtable to a set of common driver helper
|
||||
* functions (driCoreExtension, driDRI2Extension) within the driver
|
||||
* implementation, as opposed to having to pass them through a global
|
||||
* variable.
|
||||
*
|
||||
* It is not intended to be public API to the actual loader, and the vtable
|
||||
* layout may change at any time.
|
||||
*/
|
||||
#define __DRI_DRIVER_VTABLE "DRI_DriverVtable"
|
||||
#define __DRI_DRIVER_VTABLE_VERSION 1
|
||||
|
||||
typedef struct __DRIDriverVtableExtensionRec {
|
||||
__DRIextension base;
|
||||
const struct __DriverAPIRec *vtable;
|
||||
} __DRIDriverVtableExtension;
|
||||
|
||||
/**
|
||||
* Query renderer driver extension
|
||||
*
|
||||
* This allows the window system layer (either EGL or GLX) to query aspects of
|
||||
* hardware and driver support without creating a context.
|
||||
*/
|
||||
#define __DRI2_RENDERER_QUERY "DRI_RENDERER_QUERY"
|
||||
#define __DRI2_RENDERER_QUERY_VERSION 1
|
||||
|
||||
#define __DRI2_RENDERER_VENDOR_ID 0x0000
|
||||
#define __DRI2_RENDERER_DEVICE_ID 0x0001
|
||||
#define __DRI2_RENDERER_VERSION 0x0002
|
||||
#define __DRI2_RENDERER_ACCELERATED 0x0003
|
||||
#define __DRI2_RENDERER_VIDEO_MEMORY 0x0004
|
||||
#define __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE 0x0005
|
||||
#define __DRI2_RENDERER_PREFERRED_PROFILE 0x0006
|
||||
#define __DRI2_RENDERER_OPENGL_CORE_PROFILE_VERSION 0x0007
|
||||
#define __DRI2_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION 0x0008
|
||||
#define __DRI2_RENDERER_OPENGL_ES_PROFILE_VERSION 0x0009
|
||||
#define __DRI2_RENDERER_OPENGL_ES2_PROFILE_VERSION 0x000a
|
||||
|
||||
typedef struct __DRI2rendererQueryExtensionRec __DRI2rendererQueryExtension;
|
||||
struct __DRI2rendererQueryExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
int (*queryInteger)(__DRIscreen *screen, int attribute, unsigned int *val);
|
||||
int (*queryString)(__DRIscreen *screen, int attribute, const char **val);
|
||||
};
|
||||
|
||||
/**
|
||||
* Image Loader extension. Drivers use this to allocate color buffers
|
||||
*/
|
||||
|
||||
enum __DRIimageBufferMask {
|
||||
__DRI_IMAGE_BUFFER_BACK = (1 << 0),
|
||||
__DRI_IMAGE_BUFFER_FRONT = (1 << 1)
|
||||
};
|
||||
|
||||
struct __DRIimageList {
|
||||
uint32_t image_mask;
|
||||
__DRIimage *back;
|
||||
__DRIimage *front;
|
||||
};
|
||||
|
||||
#define __DRI_IMAGE_LOADER "DRI_IMAGE_LOADER"
|
||||
#define __DRI_IMAGE_LOADER_VERSION 1
|
||||
|
||||
struct __DRIimageLoaderExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* Allocate color buffers.
|
||||
*
|
||||
* \param driDrawable
|
||||
* \param width Width of allocated buffers
|
||||
* \param height Height of allocated buffers
|
||||
* \param format one of __DRI_IMAGE_FORMAT_*
|
||||
* \param stamp Address of variable to be updated when
|
||||
* getBuffers must be called again
|
||||
* \param loaderPrivate The loaderPrivate for driDrawable
|
||||
* \param buffer_mask Set of buffers to allocate
|
||||
* \param buffers Returned buffers
|
||||
*/
|
||||
int (*getBuffers)(__DRIdrawable *driDrawable,
|
||||
unsigned int format,
|
||||
uint32_t *stamp,
|
||||
void *loaderPrivate,
|
||||
uint32_t buffer_mask,
|
||||
struct __DRIimageList *buffers);
|
||||
|
||||
/**
|
||||
* Flush pending front-buffer rendering
|
||||
*
|
||||
* Any rendering that has been performed to the
|
||||
* fake front will be flushed to the front
|
||||
*
|
||||
* \param driDrawable Drawable whose front-buffer is to be flushed
|
||||
* \param loaderPrivate Loader's private data that was previously passed
|
||||
* into __DRIdri2ExtensionRec::createNewDrawable
|
||||
*/
|
||||
void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate);
|
||||
};
|
||||
|
||||
/**
|
||||
* DRI extension.
|
||||
*/
|
||||
|
||||
#define __DRI_IMAGE_DRIVER "DRI_IMAGE_DRIVER"
|
||||
#define __DRI_IMAGE_DRIVER_VERSION 1
|
||||
|
||||
struct __DRIimageDriverExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/* Common DRI functions, shared with DRI2 */
|
||||
__DRIcreateNewScreen2Func createNewScreen2;
|
||||
__DRIcreateNewDrawableFunc createNewDrawable;
|
||||
__DRIcreateContextAttribsFunc createContextAttribs;
|
||||
__DRIgetAPIMaskFunc getAPIMask;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SAREA definitions.
|
||||
*
|
||||
* \author Kevin E. Martin <kevin@precisioninsight.com>
|
||||
* \author Jens Owen <jowen@vmware.com>
|
||||
* \author Jens Owen <jens@tungstengraphics.com>
|
||||
* \author Rickard E. (Rik) Faith <faith@valinux.com>
|
||||
*/
|
||||
|
||||
|
@@ -60,8 +60,8 @@ extern "C" {
|
||||
#include <GL/gl.h>
|
||||
|
||||
|
||||
#define OSMESA_MAJOR_VERSION 10
|
||||
#define OSMESA_MINOR_VERSION 0
|
||||
#define OSMESA_MAJOR_VERSION 6
|
||||
#define OSMESA_MINOR_VERSION 5
|
||||
#define OSMESA_PATCH_VERSION 0
|
||||
|
||||
|
||||
@@ -101,6 +101,11 @@ extern "C" {
|
||||
typedef struct osmesa_context *OSMesaContext;
|
||||
|
||||
|
||||
#if defined(__QUICKDRAW__)
|
||||
#pragma export on
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Create an Off-Screen Mesa rendering context. The only attribute needed is
|
||||
* an RGBA vs Color-Index mode flag.
|
||||
@@ -270,21 +275,6 @@ OSMesaGetProcAddress( const char *funcName );
|
||||
GLAPI void GLAPIENTRY
|
||||
OSMesaColorClamp(GLboolean enable);
|
||||
|
||||
|
||||
/**
|
||||
* Enable/disable Gallium post-process filters.
|
||||
* This should be called after a context is created, but before it is
|
||||
* made current for the first time. After a context has been made
|
||||
* current, this function has no effect.
|
||||
* If the enable_value param is zero, the filter is disabled. Otherwise
|
||||
* the filter is enabled, and the value may control the filter's quality.
|
||||
* New in Mesa 10.0
|
||||
*/
|
||||
GLAPI void GLAPIENTRY
|
||||
OSMesaPostprocess(OSMesaContext osmesa, const char *filter,
|
||||
unsigned enable_value);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#ifndef __glext_h_
|
||||
#define __glext_h_
|
||||
|
||||
/* $Revision: 20798 $ on $Date:: 2013-03-07 01:19:34 -0800 #$ */
|
||||
/* $Revision: 19260 $ on $Date:: 2012-09-20 11:30:36 -0700 #$ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -1055,10 +1055,10 @@ typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum
|
||||
#ifndef GL_EXT_multi_draw_arrays
|
||||
#define GL_EXT_multi_draw_arrays 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei);
|
||||
GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
|
||||
GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
|
||||
#endif
|
||||
|
||||
|
@@ -1,83 +1,56 @@
|
||||
#ifndef __gl2_h_
|
||||
#define __gl2_h_ 1
|
||||
#define __gl2_h_
|
||||
|
||||
/* $Revision: 16803 $ on $Date:: 2012-02-02 09:49:18 -0800 #$ */
|
||||
|
||||
#include <GLES2/gl2platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2013 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.
|
||||
*/
|
||||
/*
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** http://www.opengl.org/registry/
|
||||
**
|
||||
** Khronos $Revision: 24614 $ on $Date: 2013-12-30 04:44:46 -0800 (Mon, 30 Dec 2013) $
|
||||
*/
|
||||
|
||||
#include <GLES2/gl2platform.h>
|
||||
|
||||
/* Generated on date 20131230 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles2
|
||||
* Profile: common
|
||||
* Versions considered: 2\.[0-9]
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: None
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
#ifndef GL_ES_VERSION_2_0
|
||||
#define GL_ES_VERSION_2_0 1
|
||||
#include <KHR/khrplatform.h>
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
typedef short GLshort;
|
||||
typedef unsigned short GLushort;
|
||||
typedef void GLvoid;
|
||||
typedef struct __GLsync *GLsync;
|
||||
typedef khronos_int64_t GLint64;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned int GLuint;
|
||||
typedef char GLchar;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
/*-------------------------------------------------------------------------
|
||||
* Data type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
typedef void GLvoid;
|
||||
typedef char GLchar;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef short GLshort;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
|
||||
/* GL types for handling large vertex buffer objects */
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef int GLint;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
|
||||
/* OpenGL ES core versions */
|
||||
#define GL_ES_VERSION_2_0 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
@@ -85,6 +58,18 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction (not supported in ES20) */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
@@ -93,15 +78,29 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* GL_ZERO */
|
||||
/* GL_ONE */
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
/* GL_SRC_ALPHA */
|
||||
/* GL_ONE_MINUS_SRC_ALPHA */
|
||||
/* GL_DST_ALPHA */
|
||||
/* GL_ONE_MINUS_DST_ALPHA */
|
||||
|
||||
/* BlendEquationSeparate */
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
|
||||
/* BlendSubtract */
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
|
||||
/* Separate Blend Functions */
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
@@ -111,19 +110,38 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
|
||||
/* Buffer Objects */
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_BLEND 0x0BE2
|
||||
@@ -134,13 +152,19 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetPName */
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
@@ -167,6 +191,7 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
/* GL_SCISSOR_TEST */
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
@@ -181,18 +206,32 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
/* GL_POLYGON_OFFSET_FILL */
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
|
||||
/* GetTextureParameter */
|
||||
/* GL_TEXTURE_MAG_FILTER */
|
||||
/* GL_TEXTURE_MIN_FILTER */
|
||||
/* GL_TEXTURE_WRAP_S */
|
||||
/* GL_TEXTURE_WRAP_T */
|
||||
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
@@ -201,35 +240,44 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
|
||||
/* PixelType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
|
||||
/* Shaders */
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_SHADER_TYPE 0x8B4F
|
||||
#define GL_DELETE_STATUS 0x8B80
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_VALIDATE_STATUS 0x8B83
|
||||
#define GL_ATTACHED_SHADERS 0x8B85
|
||||
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_SHADER_TYPE 0x8B4F
|
||||
#define GL_DELETE_STATUS 0x8B80
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_VALIDATE_STATUS 0x8B83
|
||||
#define GL_ATTACHED_SHADERS 0x8B85
|
||||
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
|
||||
/* StencilFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
@@ -238,6 +286,9 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* StencilOp */
|
||||
/* GL_ZERO */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
@@ -245,21 +296,35 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* GL_NEAREST */
|
||||
/* GL_LINEAR */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
|
||||
/* TextureTarget */
|
||||
/* GL_TEXTURE_2D */
|
||||
#define GL_TEXTURE 0x1702
|
||||
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
@@ -269,6 +334,8 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
@@ -302,9 +369,13 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
|
||||
/* Uniform Types */
|
||||
#define GL_FLOAT_VEC2 0x8B50
|
||||
#define GL_FLOAT_VEC3 0x8B51
|
||||
#define GL_FLOAT_VEC4 0x8B52
|
||||
@@ -320,34 +391,48 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_FLOAT_MAT4 0x8B5C
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLER_CUBE 0x8B60
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
|
||||
/* Vertex Arrays */
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
|
||||
/* Read Format */
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
|
||||
/* Shader Source */
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||
#define GL_SHADER_COMPILER 0x8DFA
|
||||
|
||||
/* Shader Binary */
|
||||
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||
|
||||
/* Shader Precision-Specified Types */
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
|
||||
/* Framebuffer Object. */
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
@@ -357,169 +442,179 @@ typedef khronos_uint8_t GLubyte;
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
|
||||
#define GL_NONE 0
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
|
||||
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||
GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
|
||||
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#endif /* GL_ES_VERSION_2_0 */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* GL core functions.
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
|
||||
GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
|
||||
GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
|
||||
GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
|
||||
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* __gl2_h_ */
|
||||
|
File diff suppressed because it is too large
Load Diff
1922
include/GLES3/gl3.h
1922
include/GLES3/gl3.h
File diff suppressed because it is too large
Load Diff
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006, Philippe Houdoin. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
|
||||
* This header defines BGLRenderer, the base class making up
|
||||
* the Haiku GL renderer add-ons (essentially selfcontained C++
|
||||
* shared libraries that do the actual rendering such as
|
||||
* libswpipe.so and libswrast.so)
|
||||
*/
|
||||
#ifndef GLRENDERER_H
|
||||
#define GLRENDERER_H
|
||||
|
||||
|
||||
#include <BeBuild.h>
|
||||
#include <GLView.h>
|
||||
|
||||
|
||||
class BGLDispatcher;
|
||||
class GLRendererRoster;
|
||||
|
||||
typedef unsigned long renderer_id;
|
||||
|
||||
class BGLRenderer
|
||||
{
|
||||
// Private unimplemented copy constructors
|
||||
BGLRenderer(const BGLRenderer &);
|
||||
BGLRenderer & operator=(const BGLRenderer &);
|
||||
|
||||
public:
|
||||
BGLRenderer(BGLView *view, ulong bgl_options,
|
||||
BGLDispatcher *dispatcher);
|
||||
virtual ~BGLRenderer();
|
||||
|
||||
void Acquire();
|
||||
void Release();
|
||||
|
||||
virtual void LockGL();
|
||||
virtual void UnlockGL();
|
||||
|
||||
virtual void SwapBuffers(bool VSync = false);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual status_t CopyPixelsOut(BPoint source, BBitmap *dest);
|
||||
virtual status_t CopyPixelsIn(BBitmap *source, BPoint dest);
|
||||
|
||||
virtual void FrameResized(float width, float height);
|
||||
|
||||
virtual void DirectConnected(direct_buffer_info *info);
|
||||
virtual void EnableDirectMode(bool enabled);
|
||||
|
||||
inline int32 ReferenceCount() const { return fRefCount; };
|
||||
inline ulong Options() const { return fOptions; };
|
||||
inline BGLView* GLView() { return fView; };
|
||||
inline BGLDispatcher* GLDispatcher() { return fDispatcher; };
|
||||
|
||||
private:
|
||||
friend class GLRendererRoster;
|
||||
|
||||
virtual status_t _Reserved_Renderer_0(int32, void *);
|
||||
virtual status_t _Reserved_Renderer_1(int32, void *);
|
||||
virtual status_t _Reserved_Renderer_2(int32, void *);
|
||||
virtual status_t _Reserved_Renderer_3(int32, void *);
|
||||
virtual status_t _Reserved_Renderer_4(int32, void *);
|
||||
|
||||
int32 fRefCount; // How much we're still useful
|
||||
BGLView* fView; // Never forget who is the boss!
|
||||
ulong fOptions; // Keep that tune in memory
|
||||
BGLDispatcher* fDispatcher;// Our personal GL API call dispatcher
|
||||
|
||||
GLRendererRoster* fOwningRoster;
|
||||
renderer_id fID;
|
||||
};
|
||||
|
||||
extern "C" _EXPORT BGLRenderer* instantiate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher);
|
||||
|
||||
|
||||
#endif // GLRENDERER_H
|
@@ -1,193 +0,0 @@
|
||||
/*
|
||||
* Copyright 2008-2013, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* This header defines BGLView, the base class making up
|
||||
* the Haiku GL Kit.
|
||||
*
|
||||
*/
|
||||
#ifndef BGLVIEW_H
|
||||
#define BGLVIEW_H
|
||||
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#define BGL_RGB 0
|
||||
#define BGL_INDEX 1
|
||||
#define BGL_SINGLE 0
|
||||
#define BGL_DOUBLE 2
|
||||
#define BGL_DIRECT 0
|
||||
#define BGL_INDIRECT 4
|
||||
#define BGL_ACCUM 8
|
||||
#define BGL_ALPHA 16
|
||||
#define BGL_DEPTH 32
|
||||
#define BGL_OVERLAY 64
|
||||
#define BGL_UNDERLAY 128
|
||||
#define BGL_STENCIL 512
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <AppKit.h>
|
||||
#include <Bitmap.h>
|
||||
#include <DirectWindow.h>
|
||||
#include <View.h>
|
||||
#include <Window.h>
|
||||
#include <WindowScreen.h>
|
||||
|
||||
|
||||
struct glview_direct_info;
|
||||
class BGLRenderer;
|
||||
class GLRendererRoster;
|
||||
|
||||
class BGLView : public BView {
|
||||
public:
|
||||
BGLView(BRect rect, const char* name,
|
||||
ulong resizingMode, ulong mode,
|
||||
ulong options);
|
||||
virtual ~BGLView();
|
||||
|
||||
void LockGL();
|
||||
void UnlockGL();
|
||||
void SwapBuffers();
|
||||
void SwapBuffers(bool vSync);
|
||||
|
||||
BView* EmbeddedView(); // deprecated, returns NULL
|
||||
void* GetGLProcAddress(const char* procName);
|
||||
|
||||
status_t CopyPixelsOut(BPoint source, BBitmap *dest);
|
||||
status_t CopyPixelsIn(BBitmap *source, BPoint dest);
|
||||
|
||||
// Mesa's GLenum is uint where Be's ones was ulong!
|
||||
virtual void ErrorCallback(unsigned long errorCode);
|
||||
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void AttachedToWindow();
|
||||
virtual void AllAttached();
|
||||
virtual void DetachedFromWindow();
|
||||
virtual void AllDetached();
|
||||
|
||||
virtual void FrameResized(float newWidth, float newHeight);
|
||||
virtual status_t Perform(perform_code d, void *arg);
|
||||
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
virtual void SetResizingMode(uint32 mode);
|
||||
|
||||
virtual void Show();
|
||||
virtual void Hide();
|
||||
|
||||
virtual BHandler* ResolveSpecifier(BMessage *msg, int32 index,
|
||||
BMessage *specifier, int32 form,
|
||||
const char *property);
|
||||
virtual status_t GetSupportedSuites(BMessage *data);
|
||||
|
||||
void DirectConnected(direct_buffer_info *info);
|
||||
void EnableDirectMode(bool enabled);
|
||||
|
||||
void* getGC() { return fGc; } // ???
|
||||
|
||||
virtual void GetPreferredSize(float* width, float* height);
|
||||
|
||||
private:
|
||||
|
||||
virtual void _ReservedGLView1();
|
||||
virtual void _ReservedGLView2();
|
||||
virtual void _ReservedGLView3();
|
||||
virtual void _ReservedGLView4();
|
||||
virtual void _ReservedGLView5();
|
||||
virtual void _ReservedGLView6();
|
||||
virtual void _ReservedGLView7();
|
||||
virtual void _ReservedGLView8();
|
||||
|
||||
BGLView(const BGLView &);
|
||||
BGLView &operator=(const BGLView &);
|
||||
|
||||
void _DitherFront();
|
||||
bool _ConfirmDither();
|
||||
void _Draw(BRect rect);
|
||||
void _CallDirectConnected();
|
||||
|
||||
void* fGc;
|
||||
uint32 fOptions;
|
||||
uint32 fDitherCount;
|
||||
BLocker fDrawLock;
|
||||
BLocker fDisplayLock;
|
||||
glview_direct_info* fClipInfo;
|
||||
|
||||
BGLRenderer* fRenderer;
|
||||
GLRendererRoster* fRoster;
|
||||
|
||||
BBitmap* fDitherMap;
|
||||
BRect fBounds;
|
||||
int16* fErrorBuffer[2];
|
||||
uint64 _reserved[8];
|
||||
|
||||
void _LockDraw();
|
||||
void _UnlockDraw();
|
||||
|
||||
// BeOS compatibility
|
||||
private:
|
||||
BGLView(BRect rect, char* name,
|
||||
ulong resizingMode, ulong mode,
|
||||
ulong options);
|
||||
};
|
||||
|
||||
|
||||
class BGLScreen : public BWindowScreen {
|
||||
public:
|
||||
BGLScreen(char* name,
|
||||
ulong screenMode, ulong options,
|
||||
status_t *error, bool debug=false);
|
||||
~BGLScreen();
|
||||
|
||||
void LockGL();
|
||||
void UnlockGL();
|
||||
void SwapBuffers();
|
||||
// Mesa's GLenum is uint where Be's ones was ulong!
|
||||
virtual void ErrorCallback(unsigned long errorCode);
|
||||
|
||||
virtual void ScreenConnected(bool connected);
|
||||
virtual void FrameResized(float width, float height);
|
||||
virtual status_t Perform(perform_code code, void *arg);
|
||||
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
virtual void Show();
|
||||
virtual void Hide();
|
||||
|
||||
virtual BHandler* ResolveSpecifier(BMessage *message,
|
||||
int32 index,
|
||||
BMessage *specifier,
|
||||
int32 form,
|
||||
const char *property);
|
||||
virtual status_t GetSupportedSuites(BMessage *data);
|
||||
|
||||
private:
|
||||
|
||||
virtual void _ReservedGLScreen1();
|
||||
virtual void _ReservedGLScreen2();
|
||||
virtual void _ReservedGLScreen3();
|
||||
virtual void _ReservedGLScreen4();
|
||||
virtual void _ReservedGLScreen5();
|
||||
virtual void _ReservedGLScreen6();
|
||||
virtual void _ReservedGLScreen7();
|
||||
virtual void _ReservedGLScreen8();
|
||||
|
||||
BGLScreen(const BGLScreen &);
|
||||
BGLScreen &operator=(const BGLScreen &);
|
||||
|
||||
void* fGc;
|
||||
long fOptions;
|
||||
BLocker fDrawLock;
|
||||
|
||||
int32 fColorSpace;
|
||||
uint32 fScreenMode;
|
||||
|
||||
uint64 _reserved[7];
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // BGLVIEW_H
|
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Master include file for the Haiku OpenGL Kit.
|
||||
*/
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GLView.h>
|
||||
|
||||
// Projects needing GL/glu.h and GL/glut.h should now
|
||||
// include these headers independently as glu and glut
|
||||
// are no longe core parts of mesa
|
@@ -1,28 +0,0 @@
|
||||
These headers make up the Haiku Op*nGL kit.
|
||||
|
||||
Headers in this directory preserve some BeOS™ compatibility
|
||||
compatibility, so changes should be mentioned to the Haiku
|
||||
project mailing list.
|
||||
|
||||
http://haiku-os.org
|
||||
|
||||
Normal Haiku Op*enGL layout:
|
||||
|
||||
* headers/os/OpenGLKit.h
|
||||
* headers/os/opengl/GLView.h
|
||||
* headers/os/opengl/GLRenderer.h
|
||||
* headers/os/opengl/GL/gl.h
|
||||
* headers/os/opengl/GL/gl_mangle.h
|
||||
* headers/os/opengl/GL/glext.h
|
||||
* headers/os/opengl/GL/osmesa.h (needed?)
|
||||
|
||||
Extras:
|
||||
|
||||
* headers/os/opengl/GL/glu.h
|
||||
* headers/os/opengl/GL/glut.h
|
||||
|
||||
OpenGL™ is a trademark of SGI. The usage of this trademark
|
||||
in the Haiku GL Kit is not a sign of any certification or
|
||||
endorsement by SGI or its affiliates. Usage is purely to
|
||||
allow legacy compatibility with the BeOS™ and its 3D GL
|
||||
rendering subsystem.
|
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* C11 <threads.h> emulation library
|
||||
*
|
||||
* (C) Copyright yohhoy 2012.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person or organization
|
||||
* obtaining a copy of the software and accompanying documentation covered by
|
||||
* this license (the "Software") to use, reproduce, display, distribute,
|
||||
* execute, and transmit the Software, and to prepare [[derivative work]]s of the
|
||||
* Software, and to permit third-parties to whom the Software is furnished to
|
||||
* do so, all subject to the following:
|
||||
*
|
||||
* The copyright notices in the Software and this entire statement, including
|
||||
* the above license grant, this restriction and the following disclaimer,
|
||||
* must be included in all copies of the Software, in whole or in part, and
|
||||
* all derivative works of the Software, unless such copies or derivative
|
||||
* works are solely in the form of machine-executable object code generated by
|
||||
* a source language processor.
|
||||
*
|
||||
* 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef EMULATED_THREADS_H_INCLUDED_
|
||||
#define EMULATED_THREADS_H_INCLUDED_
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef TIME_UTC
|
||||
#define TIME_UTC 1
|
||||
#endif
|
||||
|
||||
#include "c99_compat.h" /* for `inline` */
|
||||
|
||||
/*---------------------------- types ----------------------------*/
|
||||
typedef void (*tss_dtor_t)(void*);
|
||||
typedef int (*thrd_start_t)(void*);
|
||||
|
||||
struct xtime {
|
||||
time_t sec;
|
||||
long nsec;
|
||||
};
|
||||
typedef struct xtime xtime;
|
||||
|
||||
|
||||
/*-------------------- enumeration constants --------------------*/
|
||||
enum {
|
||||
mtx_plain = 0,
|
||||
mtx_try = 1,
|
||||
mtx_timed = 2,
|
||||
mtx_recursive = 4
|
||||
};
|
||||
|
||||
enum {
|
||||
thrd_success = 0, // succeeded
|
||||
thrd_timeout, // timeout
|
||||
thrd_error, // failed
|
||||
thrd_busy, // resource busy
|
||||
thrd_nomem // out of memory
|
||||
};
|
||||
|
||||
/*-------------------------- functions --------------------------*/
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
#include "threads_win32.h"
|
||||
#elif defined(HAVE_PTHREAD)
|
||||
#include "threads_posix.h"
|
||||
#else
|
||||
#error Not supported on this platform.
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /* EMULATED_THREADS_H_INCLUDED_ */
|
@@ -1,375 +0,0 @@
|
||||
/*
|
||||
* C11 <threads.h> emulation library
|
||||
*
|
||||
* (C) Copyright yohhoy 2012.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person or organization
|
||||
* obtaining a copy of the software and accompanying documentation covered by
|
||||
* this license (the "Software") to use, reproduce, display, distribute,
|
||||
* execute, and transmit the Software, and to prepare [[derivative work]]s of the
|
||||
* Software, and to permit third-parties to whom the Software is furnished to
|
||||
* do so, all subject to the following:
|
||||
*
|
||||
* The copyright notices in the Software and this entire statement, including
|
||||
* the above license grant, this restriction and the following disclaimer,
|
||||
* must be included in all copies of the Software, in whole or in part, and
|
||||
* all derivative works of the Software, unless such copies or derivative
|
||||
* works are solely in the form of machine-executable object code generated by
|
||||
* a source language processor.
|
||||
*
|
||||
* 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#ifndef assert
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
#include <stdint.h> /* for intptr_t */
|
||||
|
||||
/*
|
||||
Configuration macro:
|
||||
|
||||
EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
|
||||
Use pthread_mutex_timedlock() for `mtx_timedlock()'
|
||||
Otherwise use mtx_trylock() + *busy loop* emulation.
|
||||
*/
|
||||
#if !defined(__CYGWIN__) && !defined(__APPLE__) && !defined(__NetBSD__)
|
||||
#define EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
|
||||
#endif
|
||||
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/*---------------------------- macros ----------------------------*/
|
||||
#define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
|
||||
#ifdef INIT_ONCE_STATIC_INIT
|
||||
#define TSS_DTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS
|
||||
#else
|
||||
#define TSS_DTOR_ITERATIONS 1 // assume TSS dtor MAY be called at least once.
|
||||
#endif
|
||||
|
||||
// FIXME: temporary non-standard hack to ease transition
|
||||
#define _MTX_INITIALIZER_NP PTHREAD_MUTEX_INITIALIZER
|
||||
|
||||
/*---------------------------- types ----------------------------*/
|
||||
typedef pthread_cond_t cnd_t;
|
||||
typedef pthread_t thrd_t;
|
||||
typedef pthread_key_t tss_t;
|
||||
typedef pthread_mutex_t mtx_t;
|
||||
typedef pthread_once_t once_flag;
|
||||
|
||||
|
||||
/*
|
||||
Implementation limits:
|
||||
- Conditionally emulation for "mutex with timeout"
|
||||
(see EMULATED_THREADS_USE_NATIVE_TIMEDLOCK macro)
|
||||
*/
|
||||
struct impl_thrd_param {
|
||||
thrd_start_t func;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
static inline void *
|
||||
impl_thrd_routine(void *p)
|
||||
{
|
||||
struct impl_thrd_param pack = *((struct impl_thrd_param *)p);
|
||||
free(p);
|
||||
return (void*)(intptr_t)pack.func(pack.arg);
|
||||
}
|
||||
|
||||
|
||||
/*--------------- 7.25.2 Initialization functions ---------------*/
|
||||
// 7.25.2.1
|
||||
static inline void
|
||||
call_once(once_flag *flag, void (*func)(void))
|
||||
{
|
||||
pthread_once(flag, func);
|
||||
}
|
||||
|
||||
|
||||
/*------------- 7.25.3 Condition variable functions -------------*/
|
||||
// 7.25.3.1
|
||||
static inline int
|
||||
cnd_broadcast(cnd_t *cond)
|
||||
{
|
||||
if (!cond) return thrd_error;
|
||||
pthread_cond_broadcast(cond);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.2
|
||||
static inline void
|
||||
cnd_destroy(cnd_t *cond)
|
||||
{
|
||||
assert(cond);
|
||||
pthread_cond_destroy(cond);
|
||||
}
|
||||
|
||||
// 7.25.3.3
|
||||
static inline int
|
||||
cnd_init(cnd_t *cond)
|
||||
{
|
||||
if (!cond) return thrd_error;
|
||||
pthread_cond_init(cond, NULL);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.4
|
||||
static inline int
|
||||
cnd_signal(cnd_t *cond)
|
||||
{
|
||||
if (!cond) return thrd_error;
|
||||
pthread_cond_signal(cond);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.5
|
||||
static inline int
|
||||
cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
|
||||
{
|
||||
struct timespec abs_time;
|
||||
int rt;
|
||||
if (!cond || !mtx || !xt) return thrd_error;
|
||||
rt = pthread_cond_timedwait(cond, mtx, &abs_time);
|
||||
if (rt == ETIMEDOUT)
|
||||
return thrd_busy;
|
||||
return (rt == 0) ? thrd_success : thrd_error;
|
||||
}
|
||||
|
||||
// 7.25.3.6
|
||||
static inline int
|
||||
cnd_wait(cnd_t *cond, mtx_t *mtx)
|
||||
{
|
||||
if (!cond || !mtx) return thrd_error;
|
||||
pthread_cond_wait(cond, mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------- 7.25.4 Mutex functions --------------------*/
|
||||
// 7.25.4.1
|
||||
static inline void
|
||||
mtx_destroy(mtx_t *mtx)
|
||||
{
|
||||
assert(mtx);
|
||||
pthread_mutex_destroy(mtx);
|
||||
}
|
||||
|
||||
// 7.25.4.2
|
||||
static inline int
|
||||
mtx_init(mtx_t *mtx, int type)
|
||||
{
|
||||
pthread_mutexattr_t attr;
|
||||
if (!mtx) return thrd_error;
|
||||
if (type != mtx_plain && type != mtx_timed && type != mtx_try
|
||||
&& type != (mtx_plain|mtx_recursive)
|
||||
&& type != (mtx_timed|mtx_recursive)
|
||||
&& type != (mtx_try|mtx_recursive))
|
||||
return thrd_error;
|
||||
pthread_mutexattr_init(&attr);
|
||||
if ((type & mtx_recursive) != 0) {
|
||||
#if defined(__linux__) || defined(__linux)
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
||||
#else
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
#endif
|
||||
}
|
||||
pthread_mutex_init(mtx, &attr);
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.4.3
|
||||
static inline int
|
||||
mtx_lock(mtx_t *mtx)
|
||||
{
|
||||
if (!mtx) return thrd_error;
|
||||
pthread_mutex_lock(mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
static inline int
|
||||
mtx_trylock(mtx_t *mtx);
|
||||
|
||||
static inline void
|
||||
thrd_yield(void);
|
||||
|
||||
// 7.25.4.4
|
||||
static inline int
|
||||
mtx_timedlock(mtx_t *mtx, const xtime *xt)
|
||||
{
|
||||
if (!mtx || !xt) return thrd_error;
|
||||
{
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
|
||||
struct timespec ts;
|
||||
int rt;
|
||||
ts.tv_sec = xt->sec;
|
||||
ts.tv_nsec = xt->nsec;
|
||||
rt = pthread_mutex_timedlock(mtx, &ts);
|
||||
if (rt == 0)
|
||||
return thrd_success;
|
||||
return (rt == ETIMEDOUT) ? thrd_busy : thrd_error;
|
||||
#else
|
||||
time_t expire = time(NULL);
|
||||
expire += xt->sec;
|
||||
while (mtx_trylock(mtx) != thrd_success) {
|
||||
time_t now = time(NULL);
|
||||
if (expire < now)
|
||||
return thrd_busy;
|
||||
// busy loop!
|
||||
thrd_yield();
|
||||
}
|
||||
return thrd_success;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// 7.25.4.5
|
||||
static inline int
|
||||
mtx_trylock(mtx_t *mtx)
|
||||
{
|
||||
if (!mtx) return thrd_error;
|
||||
return (pthread_mutex_trylock(mtx) == 0) ? thrd_success : thrd_busy;
|
||||
}
|
||||
|
||||
// 7.25.4.6
|
||||
static inline int
|
||||
mtx_unlock(mtx_t *mtx)
|
||||
{
|
||||
if (!mtx) return thrd_error;
|
||||
pthread_mutex_unlock(mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
|
||||
/*------------------- 7.25.5 Thread functions -------------------*/
|
||||
// 7.25.5.1
|
||||
static inline int
|
||||
thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
|
||||
{
|
||||
struct impl_thrd_param *pack;
|
||||
if (!thr) return thrd_error;
|
||||
pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param));
|
||||
if (!pack) return thrd_nomem;
|
||||
pack->func = func;
|
||||
pack->arg = arg;
|
||||
if (pthread_create(thr, NULL, impl_thrd_routine, pack) != 0) {
|
||||
free(pack);
|
||||
return thrd_error;
|
||||
}
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.5.2
|
||||
static inline thrd_t
|
||||
thrd_current(void)
|
||||
{
|
||||
return pthread_self();
|
||||
}
|
||||
|
||||
// 7.25.5.3
|
||||
static inline int
|
||||
thrd_detach(thrd_t thr)
|
||||
{
|
||||
return (pthread_detach(thr) == 0) ? thrd_success : thrd_error;
|
||||
}
|
||||
|
||||
// 7.25.5.4
|
||||
static inline int
|
||||
thrd_equal(thrd_t thr0, thrd_t thr1)
|
||||
{
|
||||
return pthread_equal(thr0, thr1);
|
||||
}
|
||||
|
||||
// 7.25.5.5
|
||||
static inline void
|
||||
thrd_exit(int res)
|
||||
{
|
||||
pthread_exit((void*)(intptr_t)res);
|
||||
}
|
||||
|
||||
// 7.25.5.6
|
||||
static inline int
|
||||
thrd_join(thrd_t thr, int *res)
|
||||
{
|
||||
void *code;
|
||||
if (pthread_join(thr, &code) != 0)
|
||||
return thrd_error;
|
||||
if (res)
|
||||
*res = (int)(intptr_t)code;
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.5.7
|
||||
static inline void
|
||||
thrd_sleep(const xtime *xt)
|
||||
{
|
||||
struct timespec req;
|
||||
assert(xt);
|
||||
req.tv_sec = xt->sec;
|
||||
req.tv_nsec = xt->nsec;
|
||||
nanosleep(&req, NULL);
|
||||
}
|
||||
|
||||
// 7.25.5.8
|
||||
static inline void
|
||||
thrd_yield(void)
|
||||
{
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
|
||||
/*----------- 7.25.6 Thread-specific storage functions -----------*/
|
||||
// 7.25.6.1
|
||||
static inline int
|
||||
tss_create(tss_t *key, tss_dtor_t dtor)
|
||||
{
|
||||
if (!key) return thrd_error;
|
||||
return (pthread_key_create(key, dtor) == 0) ? thrd_success : thrd_error;
|
||||
}
|
||||
|
||||
// 7.25.6.2
|
||||
static inline void
|
||||
tss_delete(tss_t key)
|
||||
{
|
||||
pthread_key_delete(key);
|
||||
}
|
||||
|
||||
// 7.25.6.3
|
||||
static inline void *
|
||||
tss_get(tss_t key)
|
||||
{
|
||||
return pthread_getspecific(key);
|
||||
}
|
||||
|
||||
// 7.25.6.4
|
||||
static inline int
|
||||
tss_set(tss_t key, void *val)
|
||||
{
|
||||
return (pthread_setspecific(key, val) == 0) ? thrd_success : thrd_error;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------- 7.25.7 Time functions --------------------*/
|
||||
// 7.25.6.1
|
||||
static inline int
|
||||
xtime_get(xtime *xt, int base)
|
||||
{
|
||||
if (!xt) return 0;
|
||||
if (base == TIME_UTC) {
|
||||
xt->sec = time(NULL);
|
||||
xt->nsec = 0;
|
||||
return base;
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -1,642 +0,0 @@
|
||||
/*
|
||||
* C11 <threads.h> emulation library
|
||||
*
|
||||
* (C) Copyright yohhoy 2012.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person or organization
|
||||
* obtaining a copy of the software and accompanying documentation covered by
|
||||
* this license (the "Software") to use, reproduce, display, distribute,
|
||||
* execute, and transmit the Software, and to prepare [[derivative work]]s of the
|
||||
* Software, and to permit third-parties to whom the Software is furnished to
|
||||
* do so, all subject to the following:
|
||||
*
|
||||
* The copyright notices in the Software and this entire statement, including
|
||||
* the above license grant, this restriction and the following disclaimer,
|
||||
* must be included in all copies of the Software, in whole or in part, and
|
||||
* all derivative works of the Software, unless such copies or derivative
|
||||
* works are solely in the form of machine-executable object code generated by
|
||||
* a source language processor.
|
||||
*
|
||||
* 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef assert
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <process.h> // MSVCRT
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
Configuration macro:
|
||||
|
||||
EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
Use native WindowsAPI one-time initialization function.
|
||||
(requires WinVista or later)
|
||||
Otherwise emulate by mtx_trylock() + *busy loop* for WinXP.
|
||||
|
||||
EMULATED_THREADS_USE_NATIVE_CV
|
||||
Use native WindowsAPI condition variable object.
|
||||
(requires WinVista or later)
|
||||
Otherwise use emulated implementation for WinXP.
|
||||
|
||||
EMULATED_THREADS_TSS_DTOR_SLOTNUM
|
||||
Max registerable TSS dtor number.
|
||||
*/
|
||||
|
||||
// XXX: Retain XP compatability
|
||||
#if 0
|
||||
#if _WIN32_WINNT >= 0x0600
|
||||
// Prefer native WindowsAPI on newer environment.
|
||||
#if !defined(__MINGW32__)
|
||||
#define EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
#endif
|
||||
#define EMULATED_THREADS_USE_NATIVE_CV
|
||||
#endif
|
||||
#endif
|
||||
#define EMULATED_THREADS_TSS_DTOR_SLOTNUM 64 // see TLS_MINIMUM_AVAILABLE
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
// check configuration
|
||||
#if defined(EMULATED_THREADS_USE_NATIVE_CALL_ONCE) && (_WIN32_WINNT < 0x0600)
|
||||
#error EMULATED_THREADS_USE_NATIVE_CALL_ONCE requires _WIN32_WINNT>=0x0600
|
||||
#endif
|
||||
|
||||
#if defined(EMULATED_THREADS_USE_NATIVE_CV) && (_WIN32_WINNT < 0x0600)
|
||||
#error EMULATED_THREADS_USE_NATIVE_CV requires _WIN32_WINNT>=0x0600
|
||||
#endif
|
||||
|
||||
|
||||
/*---------------------------- macros ----------------------------*/
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
#define ONCE_FLAG_INIT INIT_ONCE_STATIC_INIT
|
||||
#else
|
||||
#define ONCE_FLAG_INIT {0}
|
||||
#endif
|
||||
#define TSS_DTOR_ITERATIONS 1
|
||||
|
||||
// FIXME: temporary non-standard hack to ease transition
|
||||
#define _MTX_INITIALIZER_NP {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}
|
||||
|
||||
/*---------------------------- types ----------------------------*/
|
||||
typedef struct cnd_t {
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CV
|
||||
CONDITION_VARIABLE condvar;
|
||||
#else
|
||||
int blocked;
|
||||
int gone;
|
||||
int to_unblock;
|
||||
HANDLE sem_queue;
|
||||
HANDLE sem_gate;
|
||||
CRITICAL_SECTION monitor;
|
||||
#endif
|
||||
} cnd_t;
|
||||
|
||||
typedef HANDLE thrd_t;
|
||||
|
||||
typedef DWORD tss_t;
|
||||
|
||||
typedef CRITICAL_SECTION mtx_t;
|
||||
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
typedef INIT_ONCE once_flag;
|
||||
#else
|
||||
typedef struct once_flag_t {
|
||||
volatile LONG status;
|
||||
} once_flag;
|
||||
#endif
|
||||
|
||||
|
||||
static inline void * tss_get(tss_t key);
|
||||
static inline void thrd_yield(void);
|
||||
static inline int mtx_trylock(mtx_t *mtx);
|
||||
static inline int mtx_lock(mtx_t *mtx);
|
||||
static inline int mtx_unlock(mtx_t *mtx);
|
||||
|
||||
/*
|
||||
Implementation limits:
|
||||
- Conditionally emulation for "Initialization functions"
|
||||
(see EMULATED_THREADS_USE_NATIVE_CALL_ONCE macro)
|
||||
- Emulated `mtx_timelock()' with mtx_trylock() + *busy loop*
|
||||
*/
|
||||
static void impl_tss_dtor_invoke(void); // forward decl.
|
||||
|
||||
struct impl_thrd_param {
|
||||
thrd_start_t func;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
static unsigned __stdcall impl_thrd_routine(void *p)
|
||||
{
|
||||
struct impl_thrd_param pack;
|
||||
int code;
|
||||
memcpy(&pack, p, sizeof(struct impl_thrd_param));
|
||||
free(p);
|
||||
code = pack.func(pack.arg);
|
||||
impl_tss_dtor_invoke();
|
||||
return (unsigned)code;
|
||||
}
|
||||
|
||||
static DWORD impl_xtime2msec(const xtime *xt)
|
||||
{
|
||||
return (DWORD)((xt->sec * 1000U) + (xt->nsec / 1000000L));
|
||||
}
|
||||
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
struct impl_call_once_param { void (*func)(void); };
|
||||
static BOOL CALLBACK impl_call_once_callback(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
|
||||
{
|
||||
struct impl_call_once_param *param = (struct impl_call_once_param*)Parameter;
|
||||
(param->func)();
|
||||
((void)InitOnce); ((void)Context); // suppress warning
|
||||
return TRUE;
|
||||
}
|
||||
#endif // ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
|
||||
#ifndef EMULATED_THREADS_USE_NATIVE_CV
|
||||
/*
|
||||
Note:
|
||||
The implementation of condition variable is ported from Boost.Interprocess
|
||||
See http://www.boost.org/boost/interprocess/sync/windows/condition.hpp
|
||||
*/
|
||||
static void impl_cond_do_signal(cnd_t *cond, int broadcast)
|
||||
{
|
||||
int nsignal = 0;
|
||||
|
||||
EnterCriticalSection(&cond->monitor);
|
||||
if (cond->to_unblock != 0) {
|
||||
if (cond->blocked == 0) {
|
||||
LeaveCriticalSection(&cond->monitor);
|
||||
return;
|
||||
}
|
||||
if (broadcast) {
|
||||
cond->to_unblock += nsignal = cond->blocked;
|
||||
cond->blocked = 0;
|
||||
} else {
|
||||
nsignal = 1;
|
||||
cond->to_unblock++;
|
||||
cond->blocked--;
|
||||
}
|
||||
} else if (cond->blocked > cond->gone) {
|
||||
WaitForSingleObject(cond->sem_gate, INFINITE);
|
||||
if (cond->gone != 0) {
|
||||
cond->blocked -= cond->gone;
|
||||
cond->gone = 0;
|
||||
}
|
||||
if (broadcast) {
|
||||
nsignal = cond->to_unblock = cond->blocked;
|
||||
cond->blocked = 0;
|
||||
} else {
|
||||
nsignal = cond->to_unblock = 1;
|
||||
cond->blocked--;
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&cond->monitor);
|
||||
|
||||
if (0 < nsignal)
|
||||
ReleaseSemaphore(cond->sem_queue, nsignal, NULL);
|
||||
}
|
||||
|
||||
static int impl_cond_do_wait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
|
||||
{
|
||||
int nleft = 0;
|
||||
int ngone = 0;
|
||||
int timeout = 0;
|
||||
DWORD w;
|
||||
|
||||
WaitForSingleObject(cond->sem_gate, INFINITE);
|
||||
cond->blocked++;
|
||||
ReleaseSemaphore(cond->sem_gate, 1, NULL);
|
||||
|
||||
mtx_unlock(mtx);
|
||||
|
||||
w = WaitForSingleObject(cond->sem_queue, xt ? impl_xtime2msec(xt) : INFINITE);
|
||||
timeout = (w == WAIT_TIMEOUT);
|
||||
|
||||
EnterCriticalSection(&cond->monitor);
|
||||
if ((nleft = cond->to_unblock) != 0) {
|
||||
if (timeout) {
|
||||
if (cond->blocked != 0) {
|
||||
cond->blocked--;
|
||||
} else {
|
||||
cond->gone++;
|
||||
}
|
||||
}
|
||||
if (--cond->to_unblock == 0) {
|
||||
if (cond->blocked != 0) {
|
||||
ReleaseSemaphore(cond->sem_gate, 1, NULL);
|
||||
nleft = 0;
|
||||
}
|
||||
else if ((ngone = cond->gone) != 0) {
|
||||
cond->gone = 0;
|
||||
}
|
||||
}
|
||||
} else if (++cond->gone == INT_MAX/2) {
|
||||
WaitForSingleObject(cond->sem_gate, INFINITE);
|
||||
cond->blocked -= cond->gone;
|
||||
ReleaseSemaphore(cond->sem_gate, 1, NULL);
|
||||
cond->gone = 0;
|
||||
}
|
||||
LeaveCriticalSection(&cond->monitor);
|
||||
|
||||
if (nleft == 1) {
|
||||
while (ngone--)
|
||||
WaitForSingleObject(cond->sem_queue, INFINITE);
|
||||
ReleaseSemaphore(cond->sem_gate, 1, NULL);
|
||||
}
|
||||
|
||||
mtx_lock(mtx);
|
||||
return timeout ? thrd_busy : thrd_success;
|
||||
}
|
||||
#endif // ifndef EMULATED_THREADS_USE_NATIVE_CV
|
||||
|
||||
static struct impl_tss_dtor_entry {
|
||||
tss_t key;
|
||||
tss_dtor_t dtor;
|
||||
} impl_tss_dtor_tbl[EMULATED_THREADS_TSS_DTOR_SLOTNUM];
|
||||
|
||||
static int impl_tss_dtor_register(tss_t key, tss_dtor_t dtor)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < EMULATED_THREADS_TSS_DTOR_SLOTNUM; i++) {
|
||||
if (!impl_tss_dtor_tbl[i].dtor)
|
||||
break;
|
||||
}
|
||||
if (i == EMULATED_THREADS_TSS_DTOR_SLOTNUM)
|
||||
return 1;
|
||||
impl_tss_dtor_tbl[i].key = key;
|
||||
impl_tss_dtor_tbl[i].dtor = dtor;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void impl_tss_dtor_invoke()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < EMULATED_THREADS_TSS_DTOR_SLOTNUM; i++) {
|
||||
if (impl_tss_dtor_tbl[i].dtor) {
|
||||
void* val = tss_get(impl_tss_dtor_tbl[i].key);
|
||||
if (val)
|
||||
(impl_tss_dtor_tbl[i].dtor)(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------- 7.25.2 Initialization functions ---------------*/
|
||||
// 7.25.2.1
|
||||
static inline void
|
||||
call_once(once_flag *flag, void (*func)(void))
|
||||
{
|
||||
assert(!flag && !func);
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
{
|
||||
struct impl_call_once_param param;
|
||||
param.func = func;
|
||||
InitOnceExecuteOnce(flag, impl_call_once_callback, (PVOID)¶m, NULL);
|
||||
}
|
||||
#else
|
||||
if (InterlockedCompareExchange(&flag->status, 1, 0) == 0) {
|
||||
(func)();
|
||||
InterlockedExchange(&flag->status, 2);
|
||||
} else {
|
||||
while (flag->status == 1) {
|
||||
// busy loop!
|
||||
thrd_yield();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*------------- 7.25.3 Condition variable functions -------------*/
|
||||
// 7.25.3.1
|
||||
static inline int
|
||||
cnd_broadcast(cnd_t *cond)
|
||||
{
|
||||
if (!cond) return thrd_error;
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CV
|
||||
WakeAllConditionVariable(&cond->condvar);
|
||||
#else
|
||||
impl_cond_do_signal(cond, 1);
|
||||
#endif
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.2
|
||||
static inline void
|
||||
cnd_destroy(cnd_t *cond)
|
||||
{
|
||||
assert(cond);
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CV
|
||||
// do nothing
|
||||
#else
|
||||
CloseHandle(cond->sem_queue);
|
||||
CloseHandle(cond->sem_gate);
|
||||
DeleteCriticalSection(&cond->monitor);
|
||||
#endif
|
||||
}
|
||||
|
||||
// 7.25.3.3
|
||||
static inline int
|
||||
cnd_init(cnd_t *cond)
|
||||
{
|
||||
if (!cond) return thrd_error;
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CV
|
||||
InitializeConditionVariable(&cond->condvar);
|
||||
#else
|
||||
cond->blocked = 0;
|
||||
cond->gone = 0;
|
||||
cond->to_unblock = 0;
|
||||
cond->sem_queue = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
|
||||
cond->sem_gate = CreateSemaphore(NULL, 1, 1, NULL);
|
||||
InitializeCriticalSection(&cond->monitor);
|
||||
#endif
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.4
|
||||
static inline int
|
||||
cnd_signal(cnd_t *cond)
|
||||
{
|
||||
if (!cond) return thrd_error;
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CV
|
||||
WakeConditionVariable(&cond->condvar);
|
||||
#else
|
||||
impl_cond_do_signal(cond, 0);
|
||||
#endif
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.5
|
||||
static inline int
|
||||
cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
|
||||
{
|
||||
if (!cond || !mtx || !xt) return thrd_error;
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CV
|
||||
if (SleepConditionVariableCS(&cond->condvar, mtx, impl_xtime2msec(xt)))
|
||||
return thrd_success;
|
||||
return (GetLastError() == ERROR_TIMEOUT) ? thrd_busy : thrd_error;
|
||||
#else
|
||||
return impl_cond_do_wait(cond, mtx, xt);
|
||||
#endif
|
||||
}
|
||||
|
||||
// 7.25.3.6
|
||||
static inline int
|
||||
cnd_wait(cnd_t *cond, mtx_t *mtx)
|
||||
{
|
||||
if (!cond || !mtx) return thrd_error;
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CV
|
||||
SleepConditionVariableCS(&cond->condvar, mtx, INFINITE);
|
||||
#else
|
||||
impl_cond_do_wait(cond, mtx, NULL);
|
||||
#endif
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------- 7.25.4 Mutex functions --------------------*/
|
||||
// 7.25.4.1
|
||||
static inline void
|
||||
mtx_destroy(mtx_t *mtx)
|
||||
{
|
||||
assert(mtx);
|
||||
DeleteCriticalSection(mtx);
|
||||
}
|
||||
|
||||
// 7.25.4.2
|
||||
static inline int
|
||||
mtx_init(mtx_t *mtx, int type)
|
||||
{
|
||||
if (!mtx) return thrd_error;
|
||||
if (type != mtx_plain && type != mtx_timed && type != mtx_try
|
||||
&& type != (mtx_plain|mtx_recursive)
|
||||
&& type != (mtx_timed|mtx_recursive)
|
||||
&& type != (mtx_try|mtx_recursive))
|
||||
return thrd_error;
|
||||
InitializeCriticalSection(mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.4.3
|
||||
static inline int
|
||||
mtx_lock(mtx_t *mtx)
|
||||
{
|
||||
if (!mtx) return thrd_error;
|
||||
EnterCriticalSection(mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.4.4
|
||||
static inline int
|
||||
mtx_timedlock(mtx_t *mtx, const xtime *xt)
|
||||
{
|
||||
time_t expire, now;
|
||||
if (!mtx || !xt) return thrd_error;
|
||||
expire = time(NULL);
|
||||
expire += xt->sec;
|
||||
while (mtx_trylock(mtx) != thrd_success) {
|
||||
now = time(NULL);
|
||||
if (expire < now)
|
||||
return thrd_busy;
|
||||
// busy loop!
|
||||
thrd_yield();
|
||||
}
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.4.5
|
||||
static inline int
|
||||
mtx_trylock(mtx_t *mtx)
|
||||
{
|
||||
if (!mtx) return thrd_error;
|
||||
return TryEnterCriticalSection(mtx) ? thrd_success : thrd_busy;
|
||||
}
|
||||
|
||||
// 7.25.4.6
|
||||
static inline int
|
||||
mtx_unlock(mtx_t *mtx)
|
||||
{
|
||||
if (!mtx) return thrd_error;
|
||||
LeaveCriticalSection(mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
|
||||
/*------------------- 7.25.5 Thread functions -------------------*/
|
||||
// 7.25.5.1
|
||||
static inline int
|
||||
thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
|
||||
{
|
||||
struct impl_thrd_param *pack;
|
||||
uintptr_t handle;
|
||||
if (!thr) return thrd_error;
|
||||
pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param));
|
||||
if (!pack) return thrd_nomem;
|
||||
pack->func = func;
|
||||
pack->arg = arg;
|
||||
handle = _beginthreadex(NULL, 0, impl_thrd_routine, pack, 0, NULL);
|
||||
if (handle == 0) {
|
||||
if (errno == EAGAIN || errno == EACCES)
|
||||
return thrd_nomem;
|
||||
return thrd_error;
|
||||
}
|
||||
*thr = (thrd_t)handle;
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// 7.25.5.2
|
||||
static inline thrd_t
|
||||
thrd_current(void)
|
||||
{
|
||||
HANDLE hCurrentThread;
|
||||
BOOL bRet;
|
||||
|
||||
/* GetCurrentThread() returns a pseudo-handle, which is useless. We need
|
||||
* to call DuplicateHandle to get a real handle. However the handle value
|
||||
* will not match the one returned by thread_create.
|
||||
*
|
||||
* Other potential solutions would be:
|
||||
* - define thrd_t as a thread Ids, but this would mean we'd need to OpenThread for many operations
|
||||
* - use malloc'ed memory for thrd_t. This would imply using TLS for current thread.
|
||||
*
|
||||
* Neither is particularly nice.
|
||||
*
|
||||
* Life would be much easier if C11 threads had different abstractions for
|
||||
* threads and thread IDs, just like C++11 threads does...
|
||||
*/
|
||||
|
||||
bRet = DuplicateHandle(GetCurrentProcess(), // source process (pseudo) handle
|
||||
GetCurrentThread(), // source (pseudo) handle
|
||||
GetCurrentProcess(), // target process
|
||||
&hCurrentThread, // target handle
|
||||
0,
|
||||
FALSE,
|
||||
DUPLICATE_SAME_ACCESS);
|
||||
assert(bRet);
|
||||
if (!bRet) {
|
||||
hCurrentThread = GetCurrentThread();
|
||||
}
|
||||
return hCurrentThread;
|
||||
}
|
||||
#endif
|
||||
|
||||
// 7.25.5.3
|
||||
static inline int
|
||||
thrd_detach(thrd_t thr)
|
||||
{
|
||||
CloseHandle(thr);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.5.4
|
||||
static inline int
|
||||
thrd_equal(thrd_t thr0, thrd_t thr1)
|
||||
{
|
||||
return GetThreadId(thr0) == GetThreadId(thr1);
|
||||
}
|
||||
|
||||
// 7.25.5.5
|
||||
static inline void
|
||||
thrd_exit(int res)
|
||||
{
|
||||
impl_tss_dtor_invoke();
|
||||
_endthreadex((unsigned)res);
|
||||
}
|
||||
|
||||
// 7.25.5.6
|
||||
static inline int
|
||||
thrd_join(thrd_t thr, int *res)
|
||||
{
|
||||
DWORD w, code;
|
||||
w = WaitForSingleObject(thr, INFINITE);
|
||||
if (w != WAIT_OBJECT_0)
|
||||
return thrd_error;
|
||||
if (res) {
|
||||
if (!GetExitCodeThread(thr, &code)) {
|
||||
CloseHandle(thr);
|
||||
return thrd_error;
|
||||
}
|
||||
*res = (int)code;
|
||||
}
|
||||
CloseHandle(thr);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.5.7
|
||||
static inline void
|
||||
thrd_sleep(const xtime *xt)
|
||||
{
|
||||
assert(xt);
|
||||
Sleep(impl_xtime2msec(xt));
|
||||
}
|
||||
|
||||
// 7.25.5.8
|
||||
static inline void
|
||||
thrd_yield(void)
|
||||
{
|
||||
SwitchToThread();
|
||||
}
|
||||
|
||||
|
||||
/*----------- 7.25.6 Thread-specific storage functions -----------*/
|
||||
// 7.25.6.1
|
||||
static inline int
|
||||
tss_create(tss_t *key, tss_dtor_t dtor)
|
||||
{
|
||||
if (!key) return thrd_error;
|
||||
*key = TlsAlloc();
|
||||
if (dtor) {
|
||||
if (impl_tss_dtor_register(*key, dtor)) {
|
||||
TlsFree(*key);
|
||||
return thrd_error;
|
||||
}
|
||||
}
|
||||
return (*key != 0xFFFFFFFF) ? thrd_success : thrd_error;
|
||||
}
|
||||
|
||||
// 7.25.6.2
|
||||
static inline void
|
||||
tss_delete(tss_t key)
|
||||
{
|
||||
TlsFree(key);
|
||||
}
|
||||
|
||||
// 7.25.6.3
|
||||
static inline void *
|
||||
tss_get(tss_t key)
|
||||
{
|
||||
return TlsGetValue(key);
|
||||
}
|
||||
|
||||
// 7.25.6.4
|
||||
static inline int
|
||||
tss_set(tss_t key, void *val)
|
||||
{
|
||||
return TlsSetValue(key, val) ? thrd_success : thrd_error;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------- 7.25.7 Time functions --------------------*/
|
||||
// 7.25.6.1
|
||||
static inline int
|
||||
xtime_get(xtime *xt, int base)
|
||||
{
|
||||
if (!xt) return 0;
|
||||
if (base == TIME_UTC) {
|
||||
xt->sec = time(NULL);
|
||||
xt->nsec = 0;
|
||||
return base;
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -35,8 +35,7 @@
|
||||
#define bool _Bool
|
||||
|
||||
/* For compilers that don't have the builtin _Bool type. */
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1800) || \
|
||||
(defined __GNUC__&& __STDC_VERSION__ < 199901L && __GNUC__ < 3)
|
||||
#if defined(_MSC_VER) || (__STDC_VERSION__ < 199901L && __GNUC__ < 3)
|
||||
typedef unsigned char _Bool;
|
||||
#endif
|
||||
|
||||
|
@@ -1,113 +1,93 @@
|
||||
CHIPSET(0x29A2, i965, "Intel(R) 965G")
|
||||
CHIPSET(0x2992, i965, "Intel(R) 965Q")
|
||||
CHIPSET(0x2982, i965, "Intel(R) 965G")
|
||||
CHIPSET(0x2972, i965, "Intel(R) 946GZ")
|
||||
CHIPSET(0x2A02, i965, "Intel(R) 965GM")
|
||||
CHIPSET(0x2A12, i965, "Intel(R) 965GME/GLE")
|
||||
CHIPSET(0x2A42, g4x, "Mobile Intel® GM45 Express Chipset")
|
||||
CHIPSET(0x2E02, g4x, "Intel(R) Integrated Graphics Device")
|
||||
CHIPSET(0x2E12, g4x, "Intel(R) Q45/Q43")
|
||||
CHIPSET(0x2E22, g4x, "Intel(R) G45/G43")
|
||||
CHIPSET(0x2E32, g4x, "Intel(R) G41")
|
||||
CHIPSET(0x2E42, g4x, "Intel(R) B43")
|
||||
CHIPSET(0x2E92, g4x, "Intel(R) B43")
|
||||
CHIPSET(0x0042, ilk, "Intel(R) Ironlake Desktop")
|
||||
CHIPSET(0x0046, ilk, "Intel(R) Ironlake Mobile")
|
||||
CHIPSET(0x0102, snb_gt1, "Intel(R) Sandybridge Desktop")
|
||||
CHIPSET(0x0112, snb_gt2, "Intel(R) Sandybridge Desktop")
|
||||
CHIPSET(0x0122, snb_gt2, "Intel(R) Sandybridge Desktop")
|
||||
CHIPSET(0x0106, snb_gt1, "Intel(R) Sandybridge Mobile")
|
||||
CHIPSET(0x0116, snb_gt2, "Intel(R) Sandybridge Mobile")
|
||||
CHIPSET(0x0126, snb_gt2, "Intel(R) Sandybridge Mobile")
|
||||
CHIPSET(0x010A, snb_gt1, "Intel(R) Sandybridge Server")
|
||||
CHIPSET(0x0152, ivb_gt1, "Intel(R) Ivybridge Desktop")
|
||||
CHIPSET(0x0162, ivb_gt2, "Intel(R) Ivybridge Desktop")
|
||||
CHIPSET(0x0156, ivb_gt1, "Intel(R) Ivybridge Mobile")
|
||||
CHIPSET(0x0166, ivb_gt2, "Intel(R) Ivybridge Mobile")
|
||||
CHIPSET(0x015a, ivb_gt1, "Intel(R) Ivybridge Server")
|
||||
CHIPSET(0x016a, ivb_gt2, "Intel(R) Ivybridge Server")
|
||||
CHIPSET(0x0402, hsw_gt1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0412, hsw_gt2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0422, hsw_gt3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0406, hsw_gt1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0416, hsw_gt2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0426, hsw_gt3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x040A, hsw_gt1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x041A, hsw_gt2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x042A, hsw_gt3, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x040B, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x041B, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x042B, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x040E, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x041E, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x042E, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C02, hsw_gt1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0C12, hsw_gt2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0C22, hsw_gt3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0C06, hsw_gt1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0C16, hsw_gt2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0C26, hsw_gt3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0C0A, hsw_gt1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0C1A, hsw_gt2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0C2A, hsw_gt3, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0C0B, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C1B, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C2B, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C0E, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C1E, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C2E, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A02, hsw_gt1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0A12, hsw_gt2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0A22, hsw_gt3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0A06, hsw_gt1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0A16, hsw_gt2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0A26, hsw_gt3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0A0A, hsw_gt1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0A1A, hsw_gt2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0A2A, hsw_gt3, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0A0B, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A1B, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A2B, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A0E, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A1E, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A2E, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D02, hsw_gt1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0D12, hsw_gt2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0D22, hsw_gt3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0D06, hsw_gt1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0D16, hsw_gt2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0D26, hsw_gt3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0D0A, hsw_gt1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0D1A, hsw_gt2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0D2A, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D0B, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D1B, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D2B, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D0E, hsw_gt1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D1E, hsw_gt2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D2E, hsw_gt3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0F31, byt, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0F32, byt, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0F33, byt, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0157, byt, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0155, byt, "Intel(R) Bay Trail")
|
||||
#ifdef INTEL_PRELIMINARY_HW_SUPPORT
|
||||
CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell")
|
||||
CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell")
|
||||
CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell")
|
||||
CHIPSET(0x160B, bdw_gt1, "Intel(R) Broadwell")
|
||||
CHIPSET(0x160D, bdw_gt1, "Intel(R) Broadwell")
|
||||
CHIPSET(0x160E, bdw_gt1, "Intel(R) Broadwell")
|
||||
CHIPSET(0x1612, bdw_gt2, "Intel(R) Broadwell")
|
||||
CHIPSET(0x1616, bdw_gt2, "Intel(R) Broadwell")
|
||||
CHIPSET(0x161A, bdw_gt2, "Intel(R) Broadwell")
|
||||
CHIPSET(0x161B, bdw_gt2, "Intel(R) Broadwell")
|
||||
CHIPSET(0x161D, bdw_gt2, "Intel(R) Broadwell")
|
||||
CHIPSET(0x161E, bdw_gt2, "Intel(R) Broadwell")
|
||||
CHIPSET(0x1622, bdw_gt3, "Intel(R) Broadwell")
|
||||
CHIPSET(0x1626, bdw_gt3, "Intel(R) Broadwell")
|
||||
CHIPSET(0x162A, bdw_gt3, "Intel(R) Broadwell")
|
||||
CHIPSET(0x162B, bdw_gt3, "Intel(R) Broadwell")
|
||||
CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell")
|
||||
CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell")
|
||||
#endif
|
||||
CHIPSET(0x29A2, I965_G, "Intel(R) 965G")
|
||||
CHIPSET(0x2992, I965_Q, "Intel(R) 965Q")
|
||||
CHIPSET(0x2982, I965_G_1, "Intel(R) 965G")
|
||||
CHIPSET(0x2972, I946_GZ, "Intel(R) 946GZ")
|
||||
CHIPSET(0x2A02, I965_GM, "Intel(R) 965GM")
|
||||
CHIPSET(0x2A12, I965_GME, "Intel(R) 965GME/GLE")
|
||||
CHIPSET(0x2A42, GM45_GM, "Mobile Intel® GM45 Express Chipset")
|
||||
CHIPSET(0x2E02, IGD_E_G, "Intel(R) Integrated Graphics Device")
|
||||
CHIPSET(0x2E12, Q45_G, "Intel(R) Q45/Q43")
|
||||
CHIPSET(0x2E22, G45_G, "Intel(R) G45/G43")
|
||||
CHIPSET(0x2E32, G41_G, "Intel(R) G41")
|
||||
CHIPSET(0x2E42, B43_G, "Intel(R) B43")
|
||||
CHIPSET(0x2E92, B43_G1, "Intel(R) B43")
|
||||
CHIPSET(0x0042, ILD_G, "Intel(R) Ironlake Desktop")
|
||||
CHIPSET(0x0046, ILM_G, "Intel(R) Ironlake Mobile")
|
||||
CHIPSET(0x0102, SANDYBRIDGE_GT1, "Intel(R) Sandybridge Desktop")
|
||||
CHIPSET(0x0112, SANDYBRIDGE_GT2, "Intel(R) Sandybridge Desktop")
|
||||
CHIPSET(0x0122, SANDYBRIDGE_GT2_PLUS, "Intel(R) Sandybridge Desktop")
|
||||
CHIPSET(0x0106, SANDYBRIDGE_M_GT1, "Intel(R) Sandybridge Mobile")
|
||||
CHIPSET(0x0116, SANDYBRIDGE_M_GT2, "Intel(R) Sandybridge Mobile")
|
||||
CHIPSET(0x0126, SANDYBRIDGE_M_GT2_PLUS, "Intel(R) Sandybridge Mobile")
|
||||
CHIPSET(0x010A, SANDYBRIDGE_S, "Intel(R) Sandybridge Server")
|
||||
CHIPSET(0x0152, IVYBRIDGE_GT1, "Intel(R) Ivybridge Desktop")
|
||||
CHIPSET(0x0162, IVYBRIDGE_GT2, "Intel(R) Ivybridge Desktop")
|
||||
CHIPSET(0x0156, IVYBRIDGE_M_GT1, "Intel(R) Ivybridge Mobile")
|
||||
CHIPSET(0x0166, IVYBRIDGE_M_GT2, "Intel(R) Ivybridge Mobile")
|
||||
CHIPSET(0x015a, IVYBRIDGE_S_GT1, "Intel(R) Ivybridge Server")
|
||||
CHIPSET(0x016a, IVYBRIDGE_S_GT2, "Intel(R) Ivybridge Server")
|
||||
CHIPSET(0x0402, HASWELL_GT1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0412, HASWELL_GT2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0422, HASWELL_GT3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0406, HASWELL_M_GT1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0416, HASWELL_M_GT2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0426, HASWELL_M_GT3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x040A, HASWELL_S_GT1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x041A, HASWELL_S_GT2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x042A, HASWELL_S_GT3, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x040B, HASWELL_B_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x041B, HASWELL_B_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x042B, HASWELL_B_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x040E, HASWELL_E_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x041E, HASWELL_E_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x042E, HASWELL_E_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C02, HASWELL_SDV_GT1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0C12, HASWELL_SDV_GT2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0C22, HASWELL_SDV_GT3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0C06, HASWELL_SDV_M_GT1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0C16, HASWELL_SDV_M_GT2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0C26, HASWELL_SDV_M_GT3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0C0A, HASWELL_SDV_S_GT1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0C1A, HASWELL_SDV_S_GT2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0C2A, HASWELL_SDV_S_GT3, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0C0B, HASWELL_SDV_B_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C1B, HASWELL_SDV_B_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C2B, HASWELL_SDV_B_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C0E, HASWELL_SDV_E_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C1E, HASWELL_SDV_E_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0C2E, HASWELL_SDV_E_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A02, HASWELL_ULT_GT1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0A12, HASWELL_ULT_GT2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0A22, HASWELL_ULT_GT3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0A06, HASWELL_ULT_M_GT1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0A16, HASWELL_ULT_M_GT2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0A26, HASWELL_ULT_M_GT3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0A0A, HASWELL_ULT_S_GT1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0A1A, HASWELL_ULT_S_GT2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0A2A, HASWELL_ULT_S_GT3, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0A0B, HASWELL_ULT_B_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A1B, HASWELL_ULT_B_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A2B, HASWELL_ULT_B_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A0E, HASWELL_ULT_E_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A1E, HASWELL_ULT_E_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0A2E, HASWELL_ULT_E_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D02, HASWELL_CRW_GT1, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0D12, HASWELL_CRW_GT2, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0D22, HASWELL_CRW_GT3, "Intel(R) Haswell Desktop")
|
||||
CHIPSET(0x0D06, HASWELL_CRW_M_GT1, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0D16, HASWELL_CRW_M_GT2, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0D26, HASWELL_CRW_M_GT3, "Intel(R) Haswell Mobile")
|
||||
CHIPSET(0x0D0A, HASWELL_CRW_S_GT1, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0D1A, HASWELL_CRW_S_GT2, "Intel(R) Haswell Server")
|
||||
CHIPSET(0x0D2A, HASWELL_CRW_S_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D0B, HASWELL_CRW_B_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D1B, HASWELL_CRW_B_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D2B, HASWELL_CRW_B_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D0E, HASWELL_CRW_E_GT1, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D1E, HASWELL_CRW_E_GT2, "Intel(R) Haswell")
|
||||
CHIPSET(0x0D2E, HASWELL_CRW_E_GT3, "Intel(R) Haswell")
|
||||
CHIPSET(0x0F31, BAYTRAIL_M_1, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0F32, BAYTRAIL_M_2, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0F33, BAYTRAIL_M_3, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0157, BAYTRAIL_M_4, "Intel(R) Bay Trail")
|
||||
CHIPSET(0x0155, BAYTRAIL_D, "Intel(R) Bay Trail")
|
||||
|
@@ -7,10 +7,6 @@
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef __IS_LOADER
|
||||
# error "Only include from loader.c"
|
||||
#endif
|
||||
|
||||
static const int i915_chip_ids[] = {
|
||||
#define CHIPSET(chip, desc, name) chip,
|
||||
#include "pci_ids/i915_pci_ids.h"
|
||||
@@ -18,11 +14,12 @@ static const int i915_chip_ids[] = {
|
||||
};
|
||||
|
||||
static const int i965_chip_ids[] = {
|
||||
#define CHIPSET(chip, family, name) chip,
|
||||
#define CHIPSET(chip, desc, name) chip,
|
||||
#include "pci_ids/i965_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
#ifndef DRIVER_MAP_GALLIUM_ONLY
|
||||
static const int r100_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/radeon_pci_ids.h"
|
||||
@@ -34,6 +31,7 @@ static const int r200_chip_ids[] = {
|
||||
#include "pci_ids/r200_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
#endif
|
||||
|
||||
static const int r300_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
@@ -59,26 +57,23 @@ static const int vmwgfx_chip_ids[] = {
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
int is_nouveau_vieux(int fd);
|
||||
|
||||
static const struct {
|
||||
int vendor_id;
|
||||
const char *driver;
|
||||
const int *chip_ids;
|
||||
int num_chips_ids;
|
||||
unsigned driver_types;
|
||||
int (*predicate)(int fd);
|
||||
} driver_map[] = {
|
||||
{ 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids), _LOADER_DRI | _LOADER_GALLIUM },
|
||||
{ 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids), _LOADER_DRI | _LOADER_GALLIUM },
|
||||
{ 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids), _LOADER_DRI },
|
||||
{ 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids), _LOADER_DRI },
|
||||
{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids), _LOADER_GALLIUM},
|
||||
{ 0x10de, "nouveau_vieux", NULL, -1, _LOADER_DRI, is_nouveau_vieux },
|
||||
{ 0x10de, "nouveau", NULL, -1, _LOADER_GALLIUM },
|
||||
{ 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
|
||||
{ 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
|
||||
#ifndef DRIVER_MAP_GALLIUM_ONLY
|
||||
{ 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
|
||||
{ 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
|
||||
#endif
|
||||
{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
|
||||
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
|
||||
{ 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 },
|
||||
};
|
||||
|
@@ -208,7 +208,7 @@ CHIPSET(0x9644, SUMO2_9644, SUMO2)
|
||||
CHIPSET(0x9645, SUMO2_9645, SUMO2)
|
||||
CHIPSET(0x9647, SUMO_9647, SUMO)
|
||||
CHIPSET(0x9648, SUMO_9648, SUMO)
|
||||
CHIPSET(0x9649, SUMO2_9649, SUMO2)
|
||||
CHIPSET(0x9649, SUMO_9649, SUMO)
|
||||
CHIPSET(0x964a, SUMO_964A, SUMO)
|
||||
CHIPSET(0x964b, SUMO_964B, SUMO)
|
||||
CHIPSET(0x964c, SUMO_964C, SUMO)
|
||||
|
@@ -96,38 +96,3 @@ CHIPSET(0x983C, KABINI_983C, KABINI)
|
||||
CHIPSET(0x983D, KABINI_983D, KABINI)
|
||||
CHIPSET(0x983E, KABINI_983E, KABINI)
|
||||
CHIPSET(0x983F, KABINI_983F, KABINI)
|
||||
|
||||
CHIPSET(0x1304, KAVERI_1304, KAVERI)
|
||||
CHIPSET(0x1305, KAVERI_1305, KAVERI)
|
||||
CHIPSET(0x1306, KAVERI_1306, KAVERI)
|
||||
CHIPSET(0x1307, KAVERI_1307, KAVERI)
|
||||
CHIPSET(0x1309, KAVERI_1309, KAVERI)
|
||||
CHIPSET(0x130A, KAVERI_130A, KAVERI)
|
||||
CHIPSET(0x130B, KAVERI_130B, KAVERI)
|
||||
CHIPSET(0x130C, KAVERI_130C, KAVERI)
|
||||
CHIPSET(0x130D, KAVERI_130D, KAVERI)
|
||||
CHIPSET(0x130E, KAVERI_130E, KAVERI)
|
||||
CHIPSET(0x130F, KAVERI_130F, KAVERI)
|
||||
CHIPSET(0x1310, KAVERI_1310, KAVERI)
|
||||
CHIPSET(0x1311, KAVERI_1311, KAVERI)
|
||||
CHIPSET(0x1312, KAVERI_1312, KAVERI)
|
||||
CHIPSET(0x1313, KAVERI_1313, KAVERI)
|
||||
CHIPSET(0x1315, KAVERI_1315, KAVERI)
|
||||
CHIPSET(0x1316, KAVERI_1316, KAVERI)
|
||||
CHIPSET(0x1317, KAVERI_1317, KAVERI)
|
||||
CHIPSET(0x131B, KAVERI_131B, KAVERI)
|
||||
CHIPSET(0x131C, KAVERI_131C, KAVERI)
|
||||
CHIPSET(0x131D, KAVERI_131D, KAVERI)
|
||||
|
||||
CHIPSET(0x67A0, HAWAII_67A0, HAWAII)
|
||||
CHIPSET(0x67A1, HAWAII_67A1, HAWAII)
|
||||
CHIPSET(0x67A2, HAWAII_67A2, HAWAII)
|
||||
CHIPSET(0x67A8, HAWAII_67A8, HAWAII)
|
||||
CHIPSET(0x67A9, HAWAII_67A9, HAWAII)
|
||||
CHIPSET(0x67AA, HAWAII_67AA, HAWAII)
|
||||
CHIPSET(0x67B0, HAWAII_67B0, HAWAII)
|
||||
CHIPSET(0x67B1, HAWAII_67B1, HAWAII)
|
||||
CHIPSET(0x67B8, HAWAII_67B8, HAWAII)
|
||||
CHIPSET(0x67B9, HAWAII_67B9, HAWAII)
|
||||
CHIPSET(0x67BA, HAWAII_67BA, HAWAII)
|
||||
CHIPSET(0x67BE, HAWAII_67BE, HAWAII)
|
||||
|
@@ -1,14 +0,0 @@
|
||||
# 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 : .libs/install-mesa-links
|
||||
|
||||
.libs/install-mesa-links : $(lib_LTLIBRARIES)
|
||||
$(MKDIR_P) $(top_builddir)/$(LIB_DIR)
|
||||
for f in $(lib_LTLIBRARIES:%.la=.libs/%.so*); do \
|
||||
if test -h .libs/$$f; then \
|
||||
cp -d $$f $(top_builddir)/$(LIB_DIR); \
|
||||
else \
|
||||
ln -f $$f $(top_builddir)/$(LIB_DIR); \
|
||||
fi; \
|
||||
done && touch $@
|
@@ -1,72 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
125
m4/ax_prog_cc_for_build.m4
Normal file
125
m4/ax_prog_cc_for_build.m4
Normal file
@@ -0,0 +1,125 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PROG_CC_FOR_BUILD
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro searches for a C compiler that generates native executables,
|
||||
# that is a C compiler that surely is not a cross-compiler. This can be
|
||||
# useful if you have to generate source code at compile-time like for
|
||||
# example GCC does.
|
||||
#
|
||||
# The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
|
||||
# needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
|
||||
# The value of these variables can be overridden by the user by specifying
|
||||
# a compiler with an environment variable (like you do for standard CC).
|
||||
#
|
||||
# It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
|
||||
# file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
|
||||
# the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
|
||||
# substituted in the Makefile.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 5
|
||||
|
||||
AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
|
||||
AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_CPP])dnl
|
||||
AC_REQUIRE([AC_EXEEXT])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
|
||||
|
||||
dnl Use the standard macros, but make them use other variable names
|
||||
dnl
|
||||
pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
|
||||
pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
|
||||
pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
|
||||
pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
|
||||
pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
|
||||
pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
|
||||
pushdef([ac_cv_objext], ac_cv_build_objext)dnl
|
||||
pushdef([ac_exeext], ac_build_exeext)dnl
|
||||
pushdef([ac_objext], ac_build_objext)dnl
|
||||
pushdef([CC], CC_FOR_BUILD)dnl
|
||||
pushdef([CPP], CPP_FOR_BUILD)dnl
|
||||
pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
|
||||
pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
|
||||
pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
|
||||
pushdef([host], build)dnl
|
||||
pushdef([host_alias], build_alias)dnl
|
||||
pushdef([host_cpu], build_cpu)dnl
|
||||
pushdef([host_vendor], build_vendor)dnl
|
||||
pushdef([host_os], build_os)dnl
|
||||
pushdef([ac_cv_host], ac_cv_build)dnl
|
||||
pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
|
||||
pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
|
||||
pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
|
||||
pushdef([ac_cv_host_os], ac_cv_build_os)dnl
|
||||
pushdef([ac_cpp], ac_build_cpp)dnl
|
||||
pushdef([ac_compile], ac_build_compile)dnl
|
||||
pushdef([ac_link], ac_build_link)dnl
|
||||
|
||||
save_cross_compiling=$cross_compiling
|
||||
save_ac_tool_prefix=$ac_tool_prefix
|
||||
cross_compiling=no
|
||||
ac_tool_prefix=
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_EXEEXT
|
||||
|
||||
ac_tool_prefix=$save_ac_tool_prefix
|
||||
cross_compiling=$save_cross_compiling
|
||||
|
||||
dnl Restore the old definitions
|
||||
dnl
|
||||
popdef([ac_link])dnl
|
||||
popdef([ac_compile])dnl
|
||||
popdef([ac_cpp])dnl
|
||||
popdef([ac_cv_host_os])dnl
|
||||
popdef([ac_cv_host_vendor])dnl
|
||||
popdef([ac_cv_host_cpu])dnl
|
||||
popdef([ac_cv_host_alias])dnl
|
||||
popdef([ac_cv_host])dnl
|
||||
popdef([host_os])dnl
|
||||
popdef([host_vendor])dnl
|
||||
popdef([host_cpu])dnl
|
||||
popdef([host_alias])dnl
|
||||
popdef([host])dnl
|
||||
popdef([LDFLAGS])dnl
|
||||
popdef([CPPFLAGS])dnl
|
||||
popdef([CFLAGS])dnl
|
||||
popdef([CPP])dnl
|
||||
popdef([CC])dnl
|
||||
popdef([ac_objext])dnl
|
||||
popdef([ac_exeext])dnl
|
||||
popdef([ac_cv_objext])dnl
|
||||
popdef([ac_cv_exeext])dnl
|
||||
popdef([ac_cv_prog_cc_g])dnl
|
||||
popdef([ac_cv_prog_cc_cross])dnl
|
||||
popdef([ac_cv_prog_cc_works])dnl
|
||||
popdef([ac_cv_prog_gcc])dnl
|
||||
popdef([ac_cv_prog_CPP])dnl
|
||||
|
||||
dnl Finally, set Makefile variables
|
||||
dnl
|
||||
BUILD_EXEEXT=$ac_build_exeext
|
||||
BUILD_OBJEXT=$ac_build_objext
|
||||
AC_SUBST(BUILD_EXEEXT)dnl
|
||||
AC_SUBST(BUILD_OBJEXT)dnl
|
||||
AC_SUBST([CFLAGS_FOR_BUILD])dnl
|
||||
AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
|
||||
AC_SUBST([LDFLAGS_FOR_BUILD])dnl
|
||||
])
|
109
m4/ax_prog_cxx_for_build.m4
Normal file
109
m4/ax_prog_cxx_for_build.m4
Normal file
@@ -0,0 +1,109 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_prog_cxx_for_build.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PROG_CXX_FOR_BUILD
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro searches for a C++ compiler that generates native executables,
|
||||
# that is a C++ compiler that surely is not a cross-compiler. This can be
|
||||
# useful if you have to generate source code at compile-time like for
|
||||
# example GCC does.
|
||||
#
|
||||
# The macro sets the CXX_FOR_BUILD and CXXCPP_FOR_BUILD macros to anything
|
||||
# needed to compile or link (CXX_FOR_BUILD) and preprocess (CXXCPP_FOR_BUILD).
|
||||
# The value of these variables can be overridden by the user by specifying
|
||||
# a compiler with an environment variable (like you do for standard CXX).
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
|
||||
# Copyright (c) 2012 Avionic Design GmbH
|
||||
#
|
||||
# Based on the AX_PROG_CC_FOR_BUILD macro by Paolo Bonzini.
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 5
|
||||
|
||||
AU_ALIAS([AC_PROG_CXX_FOR_BUILD], [AX_PROG_CXX_FOR_BUILD])
|
||||
AC_DEFUN([AX_PROG_CXX_FOR_BUILD], [dnl
|
||||
AC_REQUIRE([AX_PROG_CC_FOR_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
|
||||
|
||||
dnl Use the standard macros, but make them use other variable names
|
||||
dnl
|
||||
pushdef([ac_cv_prog_CXXCPP], ac_cv_build_prog_CXXCPP)dnl
|
||||
pushdef([ac_cv_prog_gxx], ac_cv_build_prog_gxx)dnl
|
||||
pushdef([ac_cv_prog_cxx_works], ac_cv_build_prog_cxx_works)dnl
|
||||
pushdef([ac_cv_prog_cxx_cross], ac_cv_build_prog_cxx_cross)dnl
|
||||
pushdef([ac_cv_prog_cxx_g], ac_cv_build_prog_cxx_g)dnl
|
||||
pushdef([CXX], CXX_FOR_BUILD)dnl
|
||||
pushdef([CXXCPP], CXXCPP_FOR_BUILD)dnl
|
||||
pushdef([CXXFLAGS], CXXFLAGS_FOR_BUILD)dnl
|
||||
pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
|
||||
pushdef([CXXCPPFLAGS], CXXCPPFLAGS_FOR_BUILD)dnl
|
||||
pushdef([host], build)dnl
|
||||
pushdef([host_alias], build_alias)dnl
|
||||
pushdef([host_cpu], build_cpu)dnl
|
||||
pushdef([host_vendor], build_vendor)dnl
|
||||
pushdef([host_os], build_os)dnl
|
||||
pushdef([ac_cv_host], ac_cv_build)dnl
|
||||
pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
|
||||
pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
|
||||
pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
|
||||
pushdef([ac_cv_host_os], ac_cv_build_os)dnl
|
||||
pushdef([ac_cxxcpp], ac_build_cxxcpp)dnl
|
||||
pushdef([ac_compile], ac_build_compile)dnl
|
||||
pushdef([ac_link], ac_build_link)dnl
|
||||
|
||||
save_cross_compiling=$cross_compiling
|
||||
save_ac_tool_prefix=$ac_tool_prefix
|
||||
cross_compiling=no
|
||||
ac_tool_prefix=
|
||||
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
|
||||
ac_tool_prefix=$save_ac_tool_prefix
|
||||
cross_compiling=$save_cross_compiling
|
||||
|
||||
dnl Restore the old definitions
|
||||
dnl
|
||||
popdef([ac_link])dnl
|
||||
popdef([ac_compile])dnl
|
||||
popdef([ac_cxxcpp])dnl
|
||||
popdef([ac_cv_host_os])dnl
|
||||
popdef([ac_cv_host_vendor])dnl
|
||||
popdef([ac_cv_host_cpu])dnl
|
||||
popdef([ac_cv_host_alias])dnl
|
||||
popdef([ac_cv_host])dnl
|
||||
popdef([host_os])dnl
|
||||
popdef([host_vendor])dnl
|
||||
popdef([host_cpu])dnl
|
||||
popdef([host_alias])dnl
|
||||
popdef([host])dnl
|
||||
popdef([CXXCPPFLAGS])dnl
|
||||
popdef([CPPFLAGS])dnl
|
||||
popdef([CXXFLAGS])dnl
|
||||
popdef([CXXCPP])dnl
|
||||
popdef([CXX])dnl
|
||||
popdef([ac_cv_prog_cxx_g])dnl
|
||||
popdef([ac_cv_prog_cxx_cross])dnl
|
||||
popdef([ac_cv_prog_cxx_works])dnl
|
||||
popdef([ac_cv_prog_gxx])dnl
|
||||
popdef([ac_cv_prog_CXXCPP])dnl
|
||||
|
||||
dnl Finally, set Makefile variables
|
||||
dnl
|
||||
AC_SUBST([CXXFLAGS_FOR_BUILD])dnl
|
||||
AC_SUBST([CXXCPPFLAGS_FOR_BUILD])dnl
|
||||
])
|
@@ -5,7 +5,7 @@ Custom builders and methods.
|
||||
"""
|
||||
|
||||
#
|
||||
# Copyright 2008 VMware, Inc.
|
||||
# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -23,7 +23,7 @@ Custom builders and methods.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
# IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
# IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
@@ -5,7 +5,7 @@ Frontend-tool for Gallium3D architecture.
|
||||
"""
|
||||
|
||||
#
|
||||
# Copyright 2008 VMware, Inc.
|
||||
# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -23,7 +23,7 @@ Frontend-tool for Gallium3D architecture.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
# IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
# IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -269,11 +269,6 @@ def generate(env):
|
||||
cppdefines += ['HAVE_ALIAS']
|
||||
else:
|
||||
cppdefines += ['GLX_ALIAS_UNSUPPORTED']
|
||||
if env['platform'] == 'haiku':
|
||||
cppdefines += [
|
||||
'HAVE_PTHREAD',
|
||||
'HAVE_POSIX_MEMALIGN'
|
||||
]
|
||||
if platform == 'windows':
|
||||
cppdefines += [
|
||||
'WIN32',
|
||||
@@ -300,6 +295,8 @@ 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']
|
||||
if env['texture_float']:
|
||||
@@ -509,8 +506,6 @@ def generate(env):
|
||||
libs += ['m', 'pthread', 'dl']
|
||||
if env['platform'] in ('linux',):
|
||||
libs += ['rt']
|
||||
if env['platform'] in ('haiku'):
|
||||
libs += ['root', 'be', 'network', 'translation']
|
||||
env.Append(LIBS = libs)
|
||||
|
||||
# OpenMP
|
||||
|
@@ -190,20 +190,16 @@ def generate(env):
|
||||
pass
|
||||
env.MergeFlags(cppflags)
|
||||
|
||||
# Match llvm --fno-rtti flag
|
||||
cxxflags = env.backtick('llvm-config --cxxflags').split()
|
||||
if '-fno-rtti' in cxxflags:
|
||||
env.Append(CXXFLAGS = ['-fno-rtti'])
|
||||
|
||||
components = ['engine', 'bitwriter', 'x86asmprinter']
|
||||
|
||||
if llvm_version >= distutils.version.LooseVersion('3.1'):
|
||||
components.append('mcjit')
|
||||
|
||||
if llvm_version >= distutils.version.LooseVersion('3.2'):
|
||||
env.Append(CXXFLAGS = ('-fno-rtti',))
|
||||
|
||||
env.ParseConfig('llvm-config --libs ' + ' '.join(components))
|
||||
env.ParseConfig('llvm-config --ldflags')
|
||||
if llvm_version >= distutils.version.LooseVersion('3.5'):
|
||||
env.ParseConfig('llvm-config --system-libs')
|
||||
except OSError:
|
||||
print 'scons: llvm-config version %s failed' % llvm_version
|
||||
return
|
||||
|
@@ -19,7 +19,7 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
SUBDIRS = gtest loader mapi
|
||||
SUBDIRS = gtest mapi
|
||||
|
||||
if NEED_OPENGL_COMMON
|
||||
SUBDIRS += glsl mesa
|
||||
|
@@ -11,7 +11,6 @@ if env['hostonly']:
|
||||
# compilation
|
||||
Return()
|
||||
|
||||
SConscript('loader/SConscript')
|
||||
|
||||
# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
|
||||
# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
|
||||
@@ -19,11 +18,6 @@ SConscript('loader/SConscript')
|
||||
# enable OpenGL ES support.
|
||||
SConscript('mapi/glapi/gen/SConscript')
|
||||
SConscript('mapi/glapi/SConscript')
|
||||
|
||||
# Haiku C++ libGL dispatch (renderers depend on libgl)
|
||||
if env['platform'] in ['haiku']:
|
||||
SConscript('hgl/SConscript')
|
||||
|
||||
SConscript('mesa/SConscript')
|
||||
|
||||
SConscript('mapi/vgapi/SConscript')
|
||||
|
@@ -39,12 +39,9 @@ LOCAL_CFLAGS := \
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/egl/main \
|
||||
$(MESA_TOP)/src/loader \
|
||||
$(DRM_TOP)/include/drm \
|
||||
$(DRM_GRALLOC_TOP)
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libloader
|
||||
$(DRM_GRALLOC_TOP) \
|
||||
$(DRM_TOP) \
|
||||
$(DRM_TOP)/include/drm
|
||||
|
||||
LOCAL_MODULE := libmesa_egl_dri2
|
||||
|
||||
|
@@ -22,7 +22,6 @@
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/egl/main \
|
||||
-I$(top_srcdir)/src/loader \
|
||||
-I$(top_srcdir)/src/gbm/main \
|
||||
-I$(top_srcdir)/src/gbm/backends/dri \
|
||||
-I$(top_srcdir)/src/egl/wayland/wayland-egl \
|
||||
@@ -38,10 +37,10 @@ AM_CFLAGS = \
|
||||
noinst_LTLIBRARIES = libegl_dri2.la
|
||||
|
||||
libegl_dri2_la_SOURCES = \
|
||||
egl_dri2.c
|
||||
egl_dri2.c \
|
||||
common.c
|
||||
|
||||
libegl_dri2_la_LIBADD = \
|
||||
$(top_builddir)/src/loader/libloader.la \
|
||||
$(EGL_LIB_DEPS)
|
||||
|
||||
if HAVE_SHARED_GLAPI
|
||||
|
144
src/egl/drivers/dri2/common.c
Normal file
144
src/egl/drivers/dri2/common.c
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Copyright © 2011 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Kristian Høgsberg <krh@bitplanet.net>
|
||||
* Benjamin Franzke <benjaminfranzke@googlemail.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "egl_dri2.h"
|
||||
|
||||
#ifdef HAVE_LIBUDEV
|
||||
|
||||
#define DRIVER_MAP_DRI2_ONLY
|
||||
#include "pci_ids/pci_id_driver_map.h"
|
||||
|
||||
#include <libudev.h>
|
||||
|
||||
static struct udev_device *
|
||||
dri2_udev_device_new_from_fd(struct udev *udev, int fd)
|
||||
{
|
||||
struct udev_device *device;
|
||||
struct stat buf;
|
||||
|
||||
if (fstat(fd, &buf) < 0) {
|
||||
_eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
|
||||
if (device == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"EGL-DRI2: could not create udev device for fd %d", fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
char *
|
||||
dri2_get_device_name_for_fd(int fd)
|
||||
{
|
||||
struct udev *udev;
|
||||
struct udev_device *device;
|
||||
const char *const_device_name;
|
||||
char *device_name = NULL;
|
||||
|
||||
udev = udev_new();
|
||||
device = dri2_udev_device_new_from_fd(udev, fd);
|
||||
if (device == NULL)
|
||||
return NULL;
|
||||
|
||||
const_device_name = udev_device_get_devnode(device);
|
||||
if (!const_device_name)
|
||||
goto out;
|
||||
device_name = strdup(const_device_name);
|
||||
|
||||
out:
|
||||
udev_device_unref(device);
|
||||
udev_unref(udev);
|
||||
|
||||
return device_name;
|
||||
}
|
||||
|
||||
char *
|
||||
dri2_get_driver_for_fd(int fd)
|
||||
{
|
||||
struct udev *udev;
|
||||
struct udev_device *device, *parent;
|
||||
const char *pci_id;
|
||||
char *driver = NULL;
|
||||
int vendor_id, chip_id, i, j;
|
||||
|
||||
udev = udev_new();
|
||||
device = dri2_udev_device_new_from_fd(udev, fd);
|
||||
if (device == NULL)
|
||||
return NULL;
|
||||
|
||||
parent = udev_device_get_parent(device);
|
||||
if (parent == NULL) {
|
||||
_eglLog(_EGL_WARNING, "DRI2: could not get parent device");
|
||||
goto out;
|
||||
}
|
||||
|
||||
pci_id = udev_device_get_property_value(parent, "PCI_ID");
|
||||
if (pci_id == NULL ||
|
||||
sscanf(pci_id, "%x:%x", &vendor_id, &chip_id) != 2) {
|
||||
_eglLog(_EGL_WARNING, "EGL-DRI2: malformed or no PCI ID");
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; driver_map[i].driver; i++) {
|
||||
if (vendor_id != driver_map[i].vendor_id)
|
||||
continue;
|
||||
if (driver_map[i].num_chips_ids == -1) {
|
||||
driver = strdup(driver_map[i].driver);
|
||||
_eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
|
||||
fd, vendor_id, chip_id, driver);
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (j = 0; j < driver_map[i].num_chips_ids; j++)
|
||||
if (driver_map[i].chip_ids[j] == chip_id) {
|
||||
driver = strdup(driver_map[i].driver);
|
||||
_eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
|
||||
fd, vendor_id, chip_id, driver);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
udev_device_unref(device);
|
||||
udev_unref(udev);
|
||||
|
||||
return driver;
|
||||
}
|
||||
|
||||
#endif /* HAVE_LIBUDEV */
|
@@ -33,10 +33,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
#include <xf86drm.h>
|
||||
#include <drm_fourcc.h>
|
||||
#endif
|
||||
#include <GL/gl.h>
|
||||
#include <GL/internal/dri_interface.h>
|
||||
#include <sys/types.h>
|
||||
@@ -44,10 +41,6 @@
|
||||
|
||||
#include "egl_dri2.h"
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
#include "wayland-drm.h"
|
||||
#endif
|
||||
|
||||
const __DRIuseInvalidateExtension use_invalidate = {
|
||||
{ __DRI_USE_INVALIDATE, 1 }
|
||||
};
|
||||
@@ -118,7 +111,7 @@ dri2_match_config(const _EGLConfig *conf, const _EGLConfig *criteria)
|
||||
|
||||
struct dri2_egl_config *
|
||||
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
EGLint surface_type, const EGLint *attr_list,
|
||||
int depth, EGLint surface_type, const EGLint *attr_list,
|
||||
const unsigned int *rgba_masks)
|
||||
{
|
||||
struct dri2_egl_config *conf;
|
||||
@@ -202,6 +195,16 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
for (i = 0; attr_list[i] != EGL_NONE; i += 2)
|
||||
_eglSetConfigKey(&base, attr_list[i], attr_list[i+1]);
|
||||
|
||||
/* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig. Otherwise
|
||||
* it will only match a 32-bit RGBA visual. On a composited window manager
|
||||
* on X11, this will make all of the EGLConfigs with destination alpha get
|
||||
* blended by the compositor. This is probably not what the application
|
||||
* wants... especially on drivers that only have 32-bit RGBA EGLConfigs!
|
||||
*/
|
||||
if (depth > 0 && depth != base.BufferSize
|
||||
&& !(depth == 24 && base.BufferSize == 32))
|
||||
return NULL;
|
||||
|
||||
if (rgba_masks && memcmp(rgba_masks, dri_masks, sizeof(dri_masks)))
|
||||
return NULL;
|
||||
|
||||
@@ -369,10 +372,8 @@ static const __DRIextension **
|
||||
dri2_open_driver(_EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = disp->DriverData;
|
||||
const __DRIextension **extensions = NULL;
|
||||
const __DRIextension **extensions;
|
||||
char path[PATH_MAX], *search_paths, *p, *next, *end;
|
||||
char *get_extensions_name;
|
||||
const __DRIextension **(*get_extensions)(void);
|
||||
|
||||
search_paths = NULL;
|
||||
if (geteuid() == getuid()) {
|
||||
@@ -403,9 +404,6 @@ dri2_open_driver(_EGLDisplay *disp)
|
||||
if (dri2_dpy->driver == NULL)
|
||||
_eglLog(_EGL_DEBUG, "failed to open %s: %s\n", path, dlerror());
|
||||
}
|
||||
/* not need continue to loop all paths once the driver is found */
|
||||
if (dri2_dpy->driver != NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
if (dri2_dpy->driver == NULL) {
|
||||
@@ -416,21 +414,7 @@ dri2_open_driver(_EGLDisplay *disp)
|
||||
}
|
||||
|
||||
_eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
|
||||
|
||||
if (asprintf(&get_extensions_name, "%s_%s",
|
||||
__DRI_DRIVER_GET_EXTENSIONS, dri2_dpy->driver_name) != -1) {
|
||||
get_extensions = dlsym(dri2_dpy->driver, get_extensions_name);
|
||||
if (get_extensions) {
|
||||
extensions = get_extensions();
|
||||
} else {
|
||||
_eglLog(_EGL_DEBUG, "driver does not expose %s(): %s\n",
|
||||
get_extensions_name, dlerror());
|
||||
}
|
||||
free(get_extensions_name);
|
||||
}
|
||||
|
||||
if (!extensions)
|
||||
extensions = dlsym(dri2_dpy->driver, __DRI_DRIVER_EXTENSIONS);
|
||||
extensions = dlsym(dri2_dpy->driver, __DRI_DRIVER_EXTENSIONS);
|
||||
if (extensions == NULL) {
|
||||
_eglLog(_EGL_WARNING,
|
||||
"DRI2: driver exports no extensions (%s)", dlerror());
|
||||
@@ -454,7 +438,6 @@ dri2_load_driver(_EGLDisplay *disp)
|
||||
dlclose(dri2_dpy->driver);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
dri2_dpy->driver_extensions = extensions;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
@@ -475,7 +458,6 @@ dri2_load_driver_swrast(_EGLDisplay *disp)
|
||||
dlclose(dri2_dpy->driver);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
dri2_dpy->driver_extensions = extensions;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
@@ -525,12 +507,6 @@ dri2_setup_screen(_EGLDisplay *disp)
|
||||
disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
|
||||
disp->Extensions.KHR_gl_texture_cubemap_image = EGL_TRUE;
|
||||
}
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
if (dri2_dpy->image->base.version >= 8 &&
|
||||
dri2_dpy->image->createImageFromDmaBufs) {
|
||||
disp->Extensions.EXT_image_dma_buf_import = EGL_TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,30 +519,14 @@ dri2_create_screen(_EGLDisplay *disp)
|
||||
dri2_dpy = disp->DriverData;
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
if (dri2_dpy->dri2->base.version >= 4) {
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->dri2->createNewScreen2(0, dri2_dpy->fd,
|
||||
dri2_dpy->extensions,
|
||||
dri2_dpy->driver_extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
} else {
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd,
|
||||
dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
}
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd, dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
if (dri2_dpy->swrast->base.version >= 4) {
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->swrast->createNewScreen2(0, dri2_dpy->extensions,
|
||||
dri2_dpy->driver_extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
} else {
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->swrast->createNewScreen(0, dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
}
|
||||
dri2_dpy->dri_screen =
|
||||
dri2_dpy->swrast->createNewScreen(0, dri2_dpy->extensions,
|
||||
&dri2_dpy->driver_configs, disp);
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri_screen == NULL) {
|
||||
@@ -626,6 +586,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return dri2_initialize_x11(drv, disp);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBUDEV
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
case _EGL_PLATFORM_DRM:
|
||||
if (disp->Options.TestOnly)
|
||||
@@ -638,6 +599,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return EGL_TRUE;
|
||||
return dri2_initialize_wayland(drv, disp);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
case _EGL_PLATFORM_ANDROID:
|
||||
if (disp->Options.TestOnly)
|
||||
@@ -1163,7 +1125,6 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
return dri2_create_image(disp, dri_image);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
static _EGLImage *
|
||||
dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
@@ -1208,7 +1169,6 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
|
||||
return dri2_create_image(disp, dri_image);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
|
||||
@@ -1235,7 +1195,7 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer _buffer,
|
||||
const EGLint *attr_list)
|
||||
{
|
||||
struct wl_drm_buffer *buffer;
|
||||
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) _buffer;
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
const struct wl_drm_components_descriptor *f;
|
||||
__DRIimage *dri_image;
|
||||
@@ -1243,9 +1203,7 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLint err;
|
||||
int32_t plane;
|
||||
|
||||
buffer = wayland_drm_buffer_get(dri2_dpy->wl_server_drm,
|
||||
(struct wl_resource *) _buffer);
|
||||
if (!buffer)
|
||||
if (!wayland_buffer_is_drm(&buffer->buffer))
|
||||
return NULL;
|
||||
|
||||
err = _eglParseImageAttribList(&attrs, disp, attr_list);
|
||||
@@ -1382,263 +1340,6 @@ dri2_create_image_khr_texture(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
return &dri2_img->base;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
static EGLBoolean
|
||||
dri2_check_dma_buf_attribs(const _EGLImageAttribs *attrs)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
/**
|
||||
* The spec says:
|
||||
*
|
||||
* "Required attributes and their values are as follows:
|
||||
*
|
||||
* * EGL_WIDTH & EGL_HEIGHT: The logical dimensions of the buffer in pixels
|
||||
*
|
||||
* * EGL_LINUX_DRM_FOURCC_EXT: The pixel format of the buffer, as specified
|
||||
* by drm_fourcc.h and used as the pixel_format parameter of the
|
||||
* drm_mode_fb_cmd2 ioctl."
|
||||
*
|
||||
* and
|
||||
*
|
||||
* "* If <target> is EGL_LINUX_DMA_BUF_EXT, and the list of attributes is
|
||||
* incomplete, EGL_BAD_PARAMETER is generated."
|
||||
*/
|
||||
if (attrs->Width <= 0 || attrs->Height <= 0 ||
|
||||
!attrs->DMABufFourCC.IsPresent) {
|
||||
_eglError(EGL_BAD_PARAMETER, "attribute(s) missing");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Also:
|
||||
*
|
||||
* "If <target> is EGL_LINUX_DMA_BUF_EXT and one or more of the values
|
||||
* specified for a plane's pitch or offset isn't supported by EGL,
|
||||
* EGL_BAD_ACCESS is generated."
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(attrs->DMABufPlanePitches); ++i) {
|
||||
if (attrs->DMABufPlanePitches[i].IsPresent &&
|
||||
attrs->DMABufPlanePitches[i].Value <= 0) {
|
||||
_eglError(EGL_BAD_ACCESS, "invalid pitch");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
/* Returns the total number of file descriptors. Zero indicates an error. */
|
||||
static unsigned
|
||||
dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
|
||||
{
|
||||
unsigned i, plane_n;
|
||||
|
||||
switch (attrs->DMABufFourCC.Value) {
|
||||
case DRM_FORMAT_RGB332:
|
||||
case DRM_FORMAT_BGR233:
|
||||
case DRM_FORMAT_XRGB4444:
|
||||
case DRM_FORMAT_XBGR4444:
|
||||
case DRM_FORMAT_RGBX4444:
|
||||
case DRM_FORMAT_BGRX4444:
|
||||
case DRM_FORMAT_ARGB4444:
|
||||
case DRM_FORMAT_ABGR4444:
|
||||
case DRM_FORMAT_RGBA4444:
|
||||
case DRM_FORMAT_BGRA4444:
|
||||
case DRM_FORMAT_XRGB1555:
|
||||
case DRM_FORMAT_XBGR1555:
|
||||
case DRM_FORMAT_RGBX5551:
|
||||
case DRM_FORMAT_BGRX5551:
|
||||
case DRM_FORMAT_ARGB1555:
|
||||
case DRM_FORMAT_ABGR1555:
|
||||
case DRM_FORMAT_RGBA5551:
|
||||
case DRM_FORMAT_BGRA5551:
|
||||
case DRM_FORMAT_RGB565:
|
||||
case DRM_FORMAT_BGR565:
|
||||
case DRM_FORMAT_RGB888:
|
||||
case DRM_FORMAT_BGR888:
|
||||
case DRM_FORMAT_XRGB8888:
|
||||
case DRM_FORMAT_XBGR8888:
|
||||
case DRM_FORMAT_RGBX8888:
|
||||
case DRM_FORMAT_BGRX8888:
|
||||
case DRM_FORMAT_ARGB8888:
|
||||
case DRM_FORMAT_ABGR8888:
|
||||
case DRM_FORMAT_RGBA8888:
|
||||
case DRM_FORMAT_BGRA8888:
|
||||
case DRM_FORMAT_XRGB2101010:
|
||||
case DRM_FORMAT_XBGR2101010:
|
||||
case DRM_FORMAT_RGBX1010102:
|
||||
case DRM_FORMAT_BGRX1010102:
|
||||
case DRM_FORMAT_ARGB2101010:
|
||||
case DRM_FORMAT_ABGR2101010:
|
||||
case DRM_FORMAT_RGBA1010102:
|
||||
case DRM_FORMAT_BGRA1010102:
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_YVYU:
|
||||
case DRM_FORMAT_UYVY:
|
||||
case DRM_FORMAT_VYUY:
|
||||
plane_n = 1;
|
||||
break;
|
||||
case DRM_FORMAT_NV12:
|
||||
case DRM_FORMAT_NV21:
|
||||
case DRM_FORMAT_NV16:
|
||||
case DRM_FORMAT_NV61:
|
||||
plane_n = 2;
|
||||
break;
|
||||
case DRM_FORMAT_YUV410:
|
||||
case DRM_FORMAT_YVU410:
|
||||
case DRM_FORMAT_YUV411:
|
||||
case DRM_FORMAT_YVU411:
|
||||
case DRM_FORMAT_YUV420:
|
||||
case DRM_FORMAT_YVU420:
|
||||
case DRM_FORMAT_YUV422:
|
||||
case DRM_FORMAT_YVU422:
|
||||
case DRM_FORMAT_YUV444:
|
||||
case DRM_FORMAT_YVU444:
|
||||
plane_n = 3;
|
||||
break;
|
||||
default:
|
||||
_eglError(EGL_BAD_ATTRIBUTE, "invalid format");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The spec says:
|
||||
*
|
||||
* "* If <target> is EGL_LINUX_DMA_BUF_EXT, and the list of attributes is
|
||||
* incomplete, EGL_BAD_PARAMETER is generated."
|
||||
*/
|
||||
for (i = 0; i < plane_n; ++i) {
|
||||
if (!attrs->DMABufPlaneFds[i].IsPresent ||
|
||||
!attrs->DMABufPlaneOffsets[i].IsPresent ||
|
||||
!attrs->DMABufPlanePitches[i].IsPresent) {
|
||||
_eglError(EGL_BAD_PARAMETER, "plane attribute(s) missing");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The spec also says:
|
||||
*
|
||||
* "If <target> is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT
|
||||
* attribute indicates a single-plane format, EGL_BAD_ATTRIBUTE is
|
||||
* generated if any of the EGL_DMA_BUF_PLANE1_* or EGL_DMA_BUF_PLANE2_*
|
||||
* attributes are specified."
|
||||
*/
|
||||
for (i = plane_n; i < 3; ++i) {
|
||||
if (attrs->DMABufPlaneFds[i].IsPresent ||
|
||||
attrs->DMABufPlaneOffsets[i].IsPresent ||
|
||||
attrs->DMABufPlanePitches[i].IsPresent) {
|
||||
_eglError(EGL_BAD_ATTRIBUTE, "too many plane attributes");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return plane_n;
|
||||
}
|
||||
|
||||
/**
|
||||
* The spec says:
|
||||
*
|
||||
* "If eglCreateImageKHR is successful for a EGL_LINUX_DMA_BUF_EXT target,
|
||||
* the EGL takes ownership of the file descriptor and is responsible for
|
||||
* closing it, which it may do at any time while the EGLDisplay is
|
||||
* initialized."
|
||||
*/
|
||||
static void
|
||||
dri2_take_dma_buf_ownership(const int *fds, unsigned num_fds)
|
||||
{
|
||||
int already_closed[num_fds];
|
||||
unsigned num_closed = 0;
|
||||
unsigned i, j;
|
||||
|
||||
for (i = 0; i < num_fds; ++i) {
|
||||
/**
|
||||
* The same file descriptor can be referenced multiple times in case more
|
||||
* than one plane is found in the same buffer, just with a different
|
||||
* offset.
|
||||
*/
|
||||
for (j = 0; j < num_closed; ++j) {
|
||||
if (already_closed[j] == fds[i])
|
||||
break;
|
||||
}
|
||||
|
||||
if (j == num_closed) {
|
||||
close(fds[i]);
|
||||
already_closed[num_closed++] = fds[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static _EGLImage *
|
||||
dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
_EGLImage *res;
|
||||
EGLint err;
|
||||
_EGLImageAttribs attrs;
|
||||
__DRIimage *dri_image;
|
||||
unsigned num_fds;
|
||||
unsigned i;
|
||||
int fds[3];
|
||||
int pitches[3];
|
||||
int offsets[3];
|
||||
unsigned error;
|
||||
|
||||
/**
|
||||
* The spec says:
|
||||
*
|
||||
* ""* If <target> is EGL_LINUX_DMA_BUF_EXT and <buffer> is not NULL, the
|
||||
* error EGL_BAD_PARAMETER is generated."
|
||||
*/
|
||||
if (buffer != NULL) {
|
||||
_eglError(EGL_BAD_PARAMETER, "buffer not NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
err = _eglParseImageAttribList(&attrs, disp, attr_list);
|
||||
if (err != EGL_SUCCESS) {
|
||||
_eglError(err, "bad attribute");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!dri2_check_dma_buf_attribs(&attrs))
|
||||
return NULL;
|
||||
|
||||
num_fds = dri2_check_dma_buf_format(&attrs);
|
||||
if (!num_fds)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < num_fds; ++i) {
|
||||
fds[i] = attrs.DMABufPlaneFds[i].Value;
|
||||
pitches[i] = attrs.DMABufPlanePitches[i].Value;
|
||||
offsets[i] = attrs.DMABufPlaneOffsets[i].Value;
|
||||
}
|
||||
|
||||
dri_image =
|
||||
dri2_dpy->image->createImageFromDmaBufs(dri2_dpy->dri_screen,
|
||||
attrs.Width, attrs.Height, attrs.DMABufFourCC.Value,
|
||||
fds, num_fds, pitches, offsets,
|
||||
attrs.DMABufYuvColorSpaceHint.Value,
|
||||
attrs.DMABufSampleRangeHint.Value,
|
||||
attrs.DMABufChromaHorizontalSiting.Value,
|
||||
attrs.DMABufChromaVerticalSiting.Value,
|
||||
&error,
|
||||
NULL);
|
||||
dri2_create_image_khr_texture_error(error);
|
||||
|
||||
if (!dri_image)
|
||||
return EGL_NO_IMAGE_KHR;
|
||||
|
||||
res = dri2_create_image(disp, dri_image);
|
||||
if (res)
|
||||
dri2_take_dma_buf_ownership(fds, num_fds);
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
_EGLImage *
|
||||
dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx, EGLenum target,
|
||||
@@ -1657,17 +1358,11 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
return dri2_create_image_khr_texture(disp, ctx, target, buffer, attr_list);
|
||||
case EGL_GL_RENDERBUFFER_KHR:
|
||||
return dri2_create_image_khr_renderbuffer(disp, ctx, buffer, attr_list);
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
case EGL_DRM_BUFFER_MESA:
|
||||
return dri2_create_image_mesa_drm_buffer(disp, ctx, buffer, attr_list);
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
case EGL_WAYLAND_BUFFER_WL:
|
||||
return dri2_create_image_wayland_wl_buffer(disp, ctx, buffer, attr_list);
|
||||
#endif
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
case EGL_LINUX_DMA_BUF_EXT:
|
||||
return dri2_create_image_dma_buf(disp, ctx, buffer, attr_list);
|
||||
#endif
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr");
|
||||
@@ -1689,7 +1384,6 @@ dri2_destroy_image_khr(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *image)
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
static _EGLImage *
|
||||
dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
const EGLint *attr_list)
|
||||
@@ -1800,7 +1494,6 @@ dri2_export_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
|
||||
@@ -1815,8 +1508,8 @@ dri2_wl_reference_buffer(void *user_data, uint32_t name, int fd,
|
||||
|
||||
if (fd == -1)
|
||||
img = dri2_dpy->image->createImageFromNames(dri2_dpy->dri_screen,
|
||||
buffer->width,
|
||||
buffer->height,
|
||||
buffer->buffer.width,
|
||||
buffer->buffer.height,
|
||||
buffer->format,
|
||||
(int*)&name, 1,
|
||||
buffer->stride,
|
||||
@@ -1824,8 +1517,8 @@ dri2_wl_reference_buffer(void *user_data, uint32_t name, int fd,
|
||||
NULL);
|
||||
else
|
||||
img = dri2_dpy->image->createImageFromFds(dri2_dpy->dri_screen,
|
||||
buffer->width,
|
||||
buffer->height,
|
||||
buffer->buffer.width,
|
||||
buffer->buffer.height,
|
||||
buffer->format,
|
||||
&fd, 1,
|
||||
buffer->stride,
|
||||
@@ -1892,13 +1585,6 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
if (!dri2_dpy->wl_server_drm)
|
||||
return EGL_FALSE;
|
||||
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
/* We have to share the wl_drm instance with gbm, so gbm can convert
|
||||
* wl_buffers to gbm bos. */
|
||||
if (dri2_dpy->gbm_dri)
|
||||
dri2_dpy->gbm_dri->wl_drm = dri2_dpy->wl_server_drm;
|
||||
#endif
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
@@ -1921,15 +1607,13 @@ dri2_unbind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
|
||||
static EGLBoolean
|
||||
dri2_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
struct wl_resource *buffer_resource,
|
||||
struct wl_buffer *_buffer,
|
||||
EGLint attribute, EGLint *value)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct wl_drm_buffer *buffer;
|
||||
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) _buffer;
|
||||
const struct wl_drm_components_descriptor *format;
|
||||
|
||||
buffer = wayland_drm_buffer_get(dri2_dpy->wl_server_drm, buffer_resource);
|
||||
if (!buffer)
|
||||
if (!wayland_buffer_is_drm(&buffer->buffer))
|
||||
return EGL_FALSE;
|
||||
|
||||
format = buffer->driver_format;
|
||||
@@ -1938,10 +1622,10 @@ dri2_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
*value = format->components;
|
||||
return EGL_TRUE;
|
||||
case EGL_WIDTH:
|
||||
*value = buffer->width;
|
||||
*value = buffer->buffer.width;
|
||||
return EGL_TRUE;
|
||||
case EGL_HEIGHT:
|
||||
*value = buffer->height;
|
||||
*value = buffer->buffer.height;
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
@@ -2037,10 +1721,8 @@ _eglBuiltInDriverDRI2(const char *args)
|
||||
dri2_drv->base.API.ReleaseTexImage = dri2_release_tex_image;
|
||||
dri2_drv->base.API.CreateImageKHR = dri2_create_image_khr;
|
||||
dri2_drv->base.API.DestroyImageKHR = dri2_destroy_image_khr;
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
dri2_drv->base.API.CreateDRMImageMESA = dri2_create_drm_image_mesa;
|
||||
dri2_drv->base.API.ExportDRMImageMESA = dri2_export_drm_image_mesa;
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
dri2_drv->base.API.BindWaylandDisplayWL = dri2_bind_wayland_display_wl;
|
||||
dri2_drv->base.API.UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl;
|
||||
|
@@ -37,6 +37,7 @@
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
#include <wayland-client.h>
|
||||
#include "wayland-drm.h"
|
||||
#include "wayland-egl-priv.h"
|
||||
#endif
|
||||
|
||||
@@ -117,8 +118,7 @@ struct dri2_egl_display
|
||||
|
||||
__DRIdri2LoaderExtension dri2_loader_extension;
|
||||
__DRIswrastLoaderExtension swrast_loader_extension;
|
||||
const __DRIextension *extensions[5];
|
||||
const __DRIextension **driver_extensions;
|
||||
const __DRIextension *extensions[4];
|
||||
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
xcb_connection_t *conn;
|
||||
@@ -160,6 +160,7 @@ struct dri2_egl_surface
|
||||
__DRIbuffer buffers[5];
|
||||
int buffer_count;
|
||||
int have_fake_front;
|
||||
int swap_interval;
|
||||
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
xcb_drawable_t drawable;
|
||||
@@ -174,7 +175,7 @@ struct dri2_egl_surface
|
||||
struct wl_egl_window *wl_win;
|
||||
int dx;
|
||||
int dy;
|
||||
struct wl_callback *throttle_callback;
|
||||
struct wl_callback *frame_callback;
|
||||
int format;
|
||||
#endif
|
||||
|
||||
@@ -188,13 +189,14 @@ struct dri2_egl_surface
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
struct wl_buffer *wl_buffer;
|
||||
__DRIimage *dri_image;
|
||||
int pitch, name;
|
||||
#endif
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
struct gbm_bo *bo;
|
||||
#endif
|
||||
int locked;
|
||||
int age;
|
||||
} color_buffers[4], *back, *current;
|
||||
} color_buffers[3], *back, *current;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
@@ -220,12 +222,6 @@ struct dri2_egl_image
|
||||
__DRIimage *dri_image;
|
||||
};
|
||||
|
||||
/* From xmlpool/options.h, user exposed so should be stable */
|
||||
#define DRI_CONF_VBLANK_NEVER 0
|
||||
#define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
|
||||
#define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
|
||||
#define DRI_CONF_VBLANK_ALWAYS_SYNC 3
|
||||
|
||||
/* standard typecasts */
|
||||
_EGL_DRIVER_STANDARD_TYPECASTS(dri2_egl)
|
||||
_EGL_DRIVER_TYPECAST(dri2_egl_image, _EGLImage, obj)
|
||||
@@ -251,7 +247,7 @@ dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data);
|
||||
|
||||
struct dri2_egl_config *
|
||||
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
EGLint surface_type, const EGLint *attr_list,
|
||||
int depth, EGLint surface_type, const EGLint *attr_list,
|
||||
const unsigned int *rgba_masks);
|
||||
|
||||
_EGLImage *
|
||||
@@ -271,4 +267,9 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp);
|
||||
EGLBoolean
|
||||
dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp);
|
||||
|
||||
char *
|
||||
dri2_get_driver_for_fd(int fd);
|
||||
char *
|
||||
dri2_get_device_name_for_fd(int fd);
|
||||
|
||||
#endif /* EGL_DRI2_INCLUDED */
|
||||
|
@@ -34,7 +34,11 @@
|
||||
#include <sync/sync.h>
|
||||
#endif
|
||||
|
||||
#include "loader.h"
|
||||
/* for droid_get_pci_id */
|
||||
#include <xf86drm.h>
|
||||
#include <i915_drm.h>
|
||||
#include <radeon_drm.h>
|
||||
|
||||
#include "egl_dri2.h"
|
||||
#include "gralloc_drm.h"
|
||||
|
||||
@@ -543,13 +547,14 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
|
||||
const struct {
|
||||
int format;
|
||||
int size;
|
||||
unsigned int rgba_masks[4];
|
||||
} visuals[] = {
|
||||
{ HAL_PIXEL_FORMAT_RGBA_8888, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
|
||||
{ HAL_PIXEL_FORMAT_RGBX_8888, { 0xff, 0xff00, 0xff0000, 0x0 } },
|
||||
{ HAL_PIXEL_FORMAT_RGB_888, { 0xff, 0xff00, 0xff0000, 0x0 } },
|
||||
{ HAL_PIXEL_FORMAT_RGB_565, { 0xf800, 0x7e0, 0x1f, 0x0 } },
|
||||
{ HAL_PIXEL_FORMAT_BGRA_8888, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
|
||||
{ HAL_PIXEL_FORMAT_RGBA_8888, 32, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
|
||||
{ HAL_PIXEL_FORMAT_RGBX_8888, 32, { 0xff, 0xff00, 0xff0000, 0x0 } },
|
||||
{ HAL_PIXEL_FORMAT_RGB_888, 24, { 0xff, 0xff00, 0xff0000, 0x0 } },
|
||||
{ HAL_PIXEL_FORMAT_RGB_565, 16, { 0xf800, 0x7e0, 0x1f, 0x0 } },
|
||||
{ HAL_PIXEL_FORMAT_BGRA_8888, 32, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
|
||||
{ 0, 0, { 0, 0, 0, 0 } }
|
||||
};
|
||||
int count, i, j;
|
||||
@@ -571,7 +576,8 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
continue;
|
||||
|
||||
dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[j],
|
||||
count + 1, surface_type, NULL, visuals[i].rgba_masks);
|
||||
count + 1, visuals[i].size, surface_type, NULL,
|
||||
visuals[i].rgba_masks);
|
||||
if (dri2_conf) {
|
||||
dri2_conf->base.NativeVisualID = visuals[i].format;
|
||||
dri2_conf->base.NativeVisualType = visuals[i].format;
|
||||
@@ -598,6 +604,103 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
return (count != 0);
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
droid_get_pci_id(int fd, int *vendor_id, int *chip_id)
|
||||
{
|
||||
drmVersionPtr version;
|
||||
|
||||
*chip_id = -1;
|
||||
|
||||
version = drmGetVersion(fd);
|
||||
if (!version) {
|
||||
_eglLog(_EGL_WARNING, "invalid drm fd");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
if (!version->name) {
|
||||
_eglLog(_EGL_WARNING, "unable to determine the driver name");
|
||||
drmFreeVersion(version);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (strcmp(version->name, "i915") == 0) {
|
||||
struct drm_i915_getparam gp;
|
||||
int ret;
|
||||
|
||||
*vendor_id = 0x8086;
|
||||
|
||||
memset(&gp, 0, sizeof(gp));
|
||||
gp.param = I915_PARAM_CHIPSET_ID;
|
||||
gp.value = chip_id;
|
||||
ret = drmCommandWriteRead(fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
|
||||
if (ret) {
|
||||
_eglLog(_EGL_WARNING, "failed to get param for i915");
|
||||
*chip_id = -1;
|
||||
}
|
||||
}
|
||||
else if (strcmp(version->name, "radeon") == 0) {
|
||||
struct drm_radeon_info info;
|
||||
int ret;
|
||||
|
||||
*vendor_id = 0x1002;
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.request = RADEON_INFO_DEVICE_ID;
|
||||
info.value = (unsigned long) chip_id;
|
||||
ret = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info));
|
||||
if (ret) {
|
||||
_eglLog(_EGL_WARNING, "failed to get info for radeon");
|
||||
*chip_id = -1;
|
||||
}
|
||||
}
|
||||
else if (strcmp(version->name, "nouveau") == 0) {
|
||||
*vendor_id = 0x10de;
|
||||
/* not used */
|
||||
*chip_id = 0;
|
||||
}
|
||||
else if (strcmp(version->name, "vmwgfx") == 0) {
|
||||
*vendor_id = 0x15ad;
|
||||
/* assume SVGA II */
|
||||
*chip_id = 0x0405;
|
||||
}
|
||||
|
||||
drmFreeVersion(version);
|
||||
|
||||
return (*chip_id >= 0);
|
||||
}
|
||||
|
||||
#define DRIVER_MAP_DRI2_ONLY
|
||||
#include "pci_ids/pci_id_driver_map.h"
|
||||
static const char *
|
||||
droid_get_driver_name(int fd)
|
||||
{
|
||||
int vendor_id = -1, chip_id = -1;
|
||||
int idx, i;
|
||||
char *name;
|
||||
|
||||
if (!droid_get_pci_id(fd, &vendor_id, &chip_id))
|
||||
return NULL;
|
||||
|
||||
for (idx = 0; driver_map[idx].driver; idx++) {
|
||||
if (vendor_id != driver_map[idx].vendor_id)
|
||||
continue;
|
||||
|
||||
if (driver_map[idx].num_chips_ids == -1)
|
||||
break;
|
||||
|
||||
for (i = 0; i < driver_map[idx].num_chips_ids; i++) {
|
||||
if (driver_map[idx].chip_ids[i] == chip_id)
|
||||
break;
|
||||
}
|
||||
if (i < driver_map[idx].num_chips_ids)
|
||||
break;
|
||||
}
|
||||
|
||||
_eglLog(_EGL_INFO, "pci id for fd %d: %04x:%04x, driver %s",
|
||||
fd, vendor_id, chip_id, driver_map[idx].driver);
|
||||
|
||||
return driver_map[idx].driver;
|
||||
}
|
||||
|
||||
static int
|
||||
droid_open_device(void)
|
||||
{
|
||||
@@ -660,8 +763,6 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
|
||||
_eglSetLogProc(droid_log);
|
||||
|
||||
loader_set_logger(_eglLog);
|
||||
|
||||
dri2_dpy = calloc(1, sizeof(*dri2_dpy));
|
||||
if (!dri2_dpy)
|
||||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
@@ -674,7 +775,7 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
goto cleanup_display;
|
||||
}
|
||||
|
||||
dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0);
|
||||
dri2_dpy->driver_name = (char *) droid_get_driver_name(dri2_dpy->fd);
|
||||
if (dri2_dpy->driver_name == NULL) {
|
||||
err = "DRI2: failed to get driver name";
|
||||
goto cleanup_device;
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "egl_dri2.h"
|
||||
#include "loader.h"
|
||||
|
||||
static struct gbm_bo *
|
||||
lock_front_buffer(struct gbm_surface *_surf)
|
||||
@@ -176,12 +175,13 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
}
|
||||
|
||||
static int
|
||||
get_back_bo(struct dri2_egl_surface *dri2_surf)
|
||||
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;
|
||||
int i, name, pitch;
|
||||
|
||||
if (dri2_surf->back == NULL) {
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
|
||||
@@ -201,17 +201,6 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
|
||||
if (dri2_surf->back->bo == NULL)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
back_bo_to_dri_buffer(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;
|
||||
int name, pitch;
|
||||
|
||||
bo = (struct gbm_dri_bo *) dri2_surf->back->bo;
|
||||
|
||||
dri2_dpy->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_NAME, &name);
|
||||
@@ -222,6 +211,8 @@ back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
|
||||
buffer->pitch = pitch;
|
||||
buffer->cpp = 4;
|
||||
buffer->flags = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -263,11 +254,10 @@ dri2_get_buffers_with_format(__DRIdrawable *driDrawable,
|
||||
|
||||
switch (attachments[i]) {
|
||||
case __DRI_BUFFER_BACK_LEFT:
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
if (get_back_bo(dri2_surf, &dri2_surf->buffers[j]) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "failed to allocate color buffer");
|
||||
return NULL;
|
||||
}
|
||||
back_bo_to_dri_buffer(dri2_surf, &dri2_surf->buffers[j]);
|
||||
break;
|
||||
default:
|
||||
if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1],
|
||||
@@ -322,27 +312,6 @@ dri2_get_buffers(__DRIdrawable * driDrawable,
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static int
|
||||
dri_image_get_buffers(__DRIdrawable *driDrawable,
|
||||
unsigned int format,
|
||||
uint32_t *stamp,
|
||||
void *loaderPrivate,
|
||||
uint32_t buffer_mask,
|
||||
struct __DRIimageList *buffers)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
struct gbm_dri_bo *bo;
|
||||
|
||||
if (get_back_bo(dri2_surf) < 0)
|
||||
return 0;
|
||||
|
||||
bo = (struct gbm_dri_bo *) dri2_surf->back->bo;
|
||||
buffers->image_mask = __DRI_IMAGE_BUFFER_BACK;
|
||||
buffers->back = bo->image;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
|
||||
{
|
||||
@@ -379,8 +348,9 @@ dri2_query_buffer_age(_EGLDriver *drv,
|
||||
_EGLDisplay *disp, _EGLSurface *surface)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
|
||||
__DRIbuffer buffer;
|
||||
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
if (get_back_bo(dri2_surf, &buffer) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
|
||||
return 0;
|
||||
}
|
||||
@@ -448,8 +418,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
int fd = -1;
|
||||
int i;
|
||||
|
||||
loader_set_logger(_eglLog);
|
||||
|
||||
dri2_dpy = calloc(1, sizeof *dri2_dpy);
|
||||
if (!dri2_dpy)
|
||||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
@@ -458,12 +426,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
gbm = disp->PlatformDisplay;
|
||||
if (gbm == NULL) {
|
||||
char buf[64];
|
||||
int n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, 0);
|
||||
if (n != -1 && n < sizeof(buf))
|
||||
fd = open(buf, O_RDWR);
|
||||
if (fd < 0)
|
||||
fd = open("/dev/dri/card0", O_RDWR);
|
||||
fd = open("/dev/dri/card0", O_RDWR);
|
||||
dri2_dpy->own_device = 1;
|
||||
gbm = gbm_create_device(fd);
|
||||
if (gbm == NULL)
|
||||
@@ -490,7 +453,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
}
|
||||
|
||||
dri2_dpy->fd = fd;
|
||||
dri2_dpy->device_name = loader_get_device_name_for_fd(dri2_dpy->fd);
|
||||
dri2_dpy->device_name = dri2_get_device_name_for_fd(dri2_dpy->fd);
|
||||
dri2_dpy->driver_name = dri2_dpy->gbm_dri->base.driver_name;
|
||||
|
||||
dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen;
|
||||
@@ -506,7 +469,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *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->image_get_buffers = dri_image_get_buffers;
|
||||
|
||||
dri2_dpy->gbm_dri->base.base.surface_lock_front_buffer = lock_front_buffer;
|
||||
dri2_dpy->gbm_dri->base.base.surface_release_buffer = release_buffer;
|
||||
@@ -514,28 +476,9 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
dri2_setup_screen(disp);
|
||||
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++) {
|
||||
EGLint format, attr_list[3];
|
||||
unsigned int mask;
|
||||
|
||||
dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
|
||||
__DRI_ATTRIB_RED_MASK, &mask);
|
||||
if (mask == 0x3ff00000)
|
||||
format = GBM_FORMAT_XRGB2101010;
|
||||
else if (mask == 0x00ff0000)
|
||||
format = GBM_FORMAT_XRGB8888;
|
||||
else if (mask == 0xf800)
|
||||
format = GBM_FORMAT_RGB565;
|
||||
else
|
||||
continue;
|
||||
|
||||
attr_list[0] = EGL_NATIVE_VISUAL_ID;
|
||||
attr_list[1] = format;
|
||||
attr_list[2] = EGL_NONE;
|
||||
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++)
|
||||
dri2_add_config(disp, dri2_dpy->driver_configs[i],
|
||||
i + 1, EGL_WINDOW_BIT, attr_list, NULL);
|
||||
}
|
||||
i + 1, 0, EGL_WINDOW_BIT, NULL, NULL);
|
||||
|
||||
drv->API.CreateWindowSurface = dri2_create_window_surface;
|
||||
drv->API.DestroySurface = dri2_destroy_surface;
|
||||
|
@@ -36,15 +36,13 @@
|
||||
#include <xf86drm.h>
|
||||
|
||||
#include "egl_dri2.h"
|
||||
#include "loader.h"
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include "wayland-drm-client-protocol.h"
|
||||
|
||||
enum wl_drm_format_flags {
|
||||
HAS_ARGB8888 = 1,
|
||||
HAS_XRGB8888 = 2,
|
||||
HAS_RGB565 = 4,
|
||||
HAS_XRGB8888 = 2
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -134,9 +132,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
|
||||
goto cleanup_surf;
|
||||
|
||||
if (conf->RedSize == 5)
|
||||
dri2_surf->format = WL_DRM_FORMAT_RGB565;
|
||||
else if (conf->AlphaSize == 0)
|
||||
if (conf->AlphaSize == 0)
|
||||
dri2_surf->format = WL_DRM_FORMAT_XRGB8888;
|
||||
else
|
||||
dri2_surf->format = WL_DRM_FORMAT_ARGB8888;
|
||||
@@ -184,16 +180,8 @@ dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativeWindowType window,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
_EGLSurface *surf;
|
||||
|
||||
surf = dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf,
|
||||
return dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf,
|
||||
window, attrib_list);
|
||||
|
||||
if (surf != NULL)
|
||||
drv->API.SwapInterval(drv, disp, surf, dri2_dpy->default_swap_interval);
|
||||
|
||||
return surf;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,8 +214,8 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->dri_buffers[i]);
|
||||
|
||||
if (dri2_surf->throttle_callback)
|
||||
wl_callback_destroy(dri2_surf->throttle_callback);
|
||||
if (dri2_surf->frame_callback)
|
||||
wl_callback_destroy(dri2_surf->frame_callback);
|
||||
|
||||
if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
|
||||
dri2_surf->wl_win->private = NULL;
|
||||
@@ -266,31 +254,26 @@ dri2_release_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
}
|
||||
|
||||
static int
|
||||
get_back_bo(struct dri2_egl_surface *dri2_surf)
|
||||
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);
|
||||
int i;
|
||||
__DRIimage *image;
|
||||
int i, name, pitch;
|
||||
|
||||
/* We always want to throttle to some event (either a frame callback or
|
||||
* a sync request) after the commit so that we can be sure the
|
||||
* compositor has had a chance to handle it and send us a release event
|
||||
* before we look for a free buffer */
|
||||
while (dri2_surf->throttle_callback != NULL)
|
||||
if (wl_display_dispatch_queue(dri2_dpy->wl_dpy,
|
||||
dri2_dpy->wl_queue) == -1)
|
||||
return -1;
|
||||
/* There might be a buffer release already queued that wasn't processed */
|
||||
wl_display_dispatch_queue_pending(dri2_dpy->wl_dpy, dri2_dpy->wl_queue);
|
||||
|
||||
if (dri2_surf->back == NULL) {
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
|
||||
/* Get an unlocked buffer, preferrably one with a dri_buffer
|
||||
* already allocated. */
|
||||
if (dri2_surf->color_buffers[i].locked)
|
||||
/* Get an unlocked buffer, preferrably one with a dri_buffer already
|
||||
* allocated. */
|
||||
if (dri2_surf->color_buffers[i].locked)
|
||||
continue;
|
||||
if (dri2_surf->back == NULL)
|
||||
dri2_surf->back = &dri2_surf->color_buffers[i];
|
||||
dri2_surf->back = &dri2_surf->color_buffers[i];
|
||||
else if (dri2_surf->back->dri_image == NULL)
|
||||
dri2_surf->back = &dri2_surf->color_buffers[i];
|
||||
dri2_surf->back = &dri2_surf->color_buffers[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,30 +292,23 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
|
||||
if (dri2_surf->back->dri_image == NULL)
|
||||
return -1;
|
||||
|
||||
dri2_surf->back->locked = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
__DRIimage *image;
|
||||
int name, pitch;
|
||||
|
||||
image = dri2_surf->back->dri_image;
|
||||
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_NAME, &name);
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch);
|
||||
|
||||
dri2_surf->back->name = name;
|
||||
dri2_surf->back->pitch = pitch;
|
||||
|
||||
buffer->attachment = __DRI_BUFFER_BACK_LEFT;
|
||||
buffer->name = name;
|
||||
buffer->pitch = pitch;
|
||||
buffer->cpp = 4;
|
||||
buffer->flags = 0;
|
||||
|
||||
dri2_surf->back->locked = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -358,12 +334,16 @@ get_aux_bo(struct dri2_egl_surface *dri2_surf,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
update_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
static __DRIbuffer *
|
||||
dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
int *width, int *height,
|
||||
unsigned int *attachments, int count,
|
||||
int *out_count, void *loaderPrivate)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
if (dri2_surf->base.Type == EGL_WINDOW_BIT &&
|
||||
(dri2_surf->base.Width != dri2_surf->wl_win->width ||
|
||||
@@ -377,9 +357,22 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
dri2_surf->dy = dri2_surf->wl_win->dy;
|
||||
}
|
||||
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "failed to allocate color buffer");
|
||||
return -1;
|
||||
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we have an extra unlocked buffer at this point, we had to do triple
|
||||
@@ -395,36 +388,6 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if (update_buffers(dri2_surf) < 0)
|
||||
return NULL;
|
||||
|
||||
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
|
||||
switch (attachments[i]) {
|
||||
case __DRI_BUFFER_BACK_LEFT:
|
||||
back_bo_to_dri_buffer(dri2_surf, &dri2_surf->buffers[j]);
|
||||
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;
|
||||
@@ -468,25 +431,6 @@ dri2_get_buffers(__DRIdrawable * driDrawable,
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static int
|
||||
image_get_buffers(__DRIdrawable *driDrawable,
|
||||
unsigned int format,
|
||||
uint32_t *stamp,
|
||||
void *loaderPrivate,
|
||||
uint32_t buffer_mask,
|
||||
struct __DRIimageList *buffers)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
|
||||
if (update_buffers(dri2_surf) < 0)
|
||||
return 0;
|
||||
|
||||
buffers->image_mask = __DRI_IMAGE_BUFFER_BACK;
|
||||
buffers->back = dri2_surf->back->dri_image;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
|
||||
{
|
||||
@@ -494,25 +438,17 @@ dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
|
||||
(void) loaderPrivate;
|
||||
}
|
||||
|
||||
static const __DRIimageLoaderExtension image_loader_extension = {
|
||||
{ __DRI_IMAGE_LOADER, 1 },
|
||||
image_get_buffers,
|
||||
dri2_flush_front_buffer
|
||||
};
|
||||
|
||||
static void
|
||||
wayland_throttle_callback(void *data,
|
||||
struct wl_callback *callback,
|
||||
uint32_t time)
|
||||
wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = data;
|
||||
|
||||
dri2_surf->throttle_callback = NULL;
|
||||
dri2_surf->frame_callback = NULL;
|
||||
wl_callback_destroy(callback);
|
||||
}
|
||||
|
||||
static const struct wl_callback_listener throttle_listener = {
|
||||
wayland_throttle_callback
|
||||
static const struct wl_callback_listener frame_listener = {
|
||||
wayland_frame_callback
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -520,7 +456,7 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
int fd, stride, name;
|
||||
int fd;
|
||||
|
||||
if (dri2_surf->current->wl_buffer != NULL)
|
||||
return;
|
||||
@@ -528,8 +464,6 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
|
||||
if (dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) {
|
||||
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
|
||||
__DRI_IMAGE_ATTRIB_FD, &fd);
|
||||
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
|
||||
__DRI_IMAGE_ATTRIB_STRIDE, &stride);
|
||||
|
||||
dri2_surf->current->wl_buffer =
|
||||
wl_drm_create_prime_buffer(dri2_dpy->wl_drm,
|
||||
@@ -537,22 +471,17 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
|
||||
dri2_surf->base.Width,
|
||||
dri2_surf->base.Height,
|
||||
dri2_surf->format,
|
||||
0, stride,
|
||||
0, dri2_surf->current->pitch,
|
||||
0, 0,
|
||||
0, 0);
|
||||
close(fd);
|
||||
} else {
|
||||
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
|
||||
__DRI_IMAGE_ATTRIB_NAME, &name);
|
||||
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
|
||||
__DRI_IMAGE_ATTRIB_STRIDE, &stride);
|
||||
|
||||
dri2_surf->current->wl_buffer =
|
||||
wl_drm_create_buffer(dri2_dpy->wl_drm,
|
||||
name,
|
||||
dri2_surf->current->name,
|
||||
dri2_surf->base.Width,
|
||||
dri2_surf->base.Height,
|
||||
stride,
|
||||
dri2_surf->current->pitch,
|
||||
dri2_surf->format);
|
||||
}
|
||||
|
||||
@@ -574,9 +503,19 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
struct dri2_egl_context *dri2_ctx;
|
||||
_EGLContext *ctx;
|
||||
int i;
|
||||
__DRIbuffer buffer;
|
||||
int i, ret = 0;
|
||||
|
||||
while (dri2_surf->frame_callback && ret != -1)
|
||||
ret = wl_display_dispatch_queue(dri2_dpy->wl_dpy, dri2_dpy->wl_queue);
|
||||
if (ret < 0)
|
||||
return EGL_FALSE;
|
||||
|
||||
dri2_surf->frame_callback = wl_surface_frame(dri2_surf->wl_win->surface);
|
||||
wl_callback_add_listener(dri2_surf->frame_callback,
|
||||
&frame_listener, dri2_surf);
|
||||
wl_proxy_set_queue((struct wl_proxy *) dri2_surf->frame_callback,
|
||||
dri2_dpy->wl_queue);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++)
|
||||
if (dri2_surf->color_buffers[i].age > 0)
|
||||
@@ -584,20 +523,11 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
|
||||
|
||||
/* Make sure we have a back buffer in case we're swapping without ever
|
||||
* rendering. */
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
if (get_back_bo(dri2_surf, &buffer) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_swap_buffers");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (draw->SwapInterval > 0) {
|
||||
dri2_surf->throttle_callback =
|
||||
wl_surface_frame(dri2_surf->wl_win->surface);
|
||||
wl_callback_add_listener(dri2_surf->throttle_callback,
|
||||
&throttle_listener, dri2_surf);
|
||||
wl_proxy_set_queue((struct wl_proxy *) dri2_surf->throttle_callback,
|
||||
dri2_dpy->wl_queue);
|
||||
}
|
||||
|
||||
dri2_surf->back->age = 1;
|
||||
dri2_surf->current = dri2_surf->back;
|
||||
dri2_surf->back = NULL;
|
||||
@@ -615,8 +545,8 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
|
||||
dri2_surf->dy = 0;
|
||||
|
||||
if (n_rects == 0) {
|
||||
wl_surface_damage(dri2_surf->wl_win->surface,
|
||||
0, 0, INT32_MAX, INT32_MAX);
|
||||
wl_surface_damage(dri2_surf->wl_win->surface, 0, 0,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
} else {
|
||||
for (i = 0; i < n_rects; i++) {
|
||||
const int *rect = &rects[i * 4];
|
||||
@@ -627,34 +557,10 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
|
||||
}
|
||||
}
|
||||
|
||||
if (dri2_dpy->flush->base.version >= 4) {
|
||||
ctx = _eglGetCurrentContext();
|
||||
dri2_ctx = dri2_egl_context(ctx);
|
||||
(*dri2_dpy->flush->flush_with_flags)(dri2_ctx->dri_context,
|
||||
dri2_surf->dri_drawable,
|
||||
__DRI2_FLUSH_DRAWABLE,
|
||||
__DRI2_THROTTLE_SWAPBUFFER);
|
||||
} else {
|
||||
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
|
||||
}
|
||||
|
||||
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
|
||||
|
||||
wl_surface_commit(dri2_surf->wl_win->surface);
|
||||
|
||||
/* If we're not waiting for a frame callback then we'll at least throttle
|
||||
* to a sync callback so that we always give a chance for the compositor to
|
||||
* handle the commit and send a release event before checking for a free
|
||||
* buffer */
|
||||
if (dri2_surf->throttle_callback == NULL) {
|
||||
dri2_surf->throttle_callback = wl_display_sync(dri2_dpy->wl_dpy);
|
||||
wl_callback_add_listener(dri2_surf->throttle_callback,
|
||||
&throttle_listener, dri2_surf);
|
||||
wl_proxy_set_queue((struct wl_proxy *) dri2_surf->throttle_callback,
|
||||
dri2_dpy->wl_queue);
|
||||
}
|
||||
|
||||
wl_display_flush(dri2_dpy->wl_dpy);
|
||||
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
|
||||
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
@@ -664,8 +570,9 @@ dri2_query_buffer_age(_EGLDriver *drv,
|
||||
_EGLDisplay *disp, _EGLSurface *surface)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
|
||||
__DRIbuffer buffer;
|
||||
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
if (get_back_bo(dri2_surf, &buffer) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
|
||||
return 0;
|
||||
}
|
||||
@@ -679,81 +586,6 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
return dri2_swap_buffers_with_damage (drv, disp, draw, NULL, 0);
|
||||
}
|
||||
|
||||
static struct wl_buffer *
|
||||
dri2_create_wayland_buffer_from_image_wl(_EGLDriver *drv,
|
||||
_EGLDisplay *disp,
|
||||
_EGLImage *img)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_image *dri2_img = dri2_egl_image(img);
|
||||
__DRIimage *image = dri2_img->dri_image;
|
||||
struct wl_buffer *buffer;
|
||||
int width, height, format, pitch;
|
||||
enum wl_drm_format wl_format;
|
||||
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FORMAT, &format);
|
||||
|
||||
switch (format) {
|
||||
case __DRI_IMAGE_FORMAT_ARGB8888:
|
||||
if (!(dri2_dpy->formats & HAS_ARGB8888))
|
||||
goto bad_format;
|
||||
wl_format = WL_DRM_FORMAT_ARGB8888;
|
||||
break;
|
||||
case __DRI_IMAGE_FORMAT_XRGB8888:
|
||||
if (!(dri2_dpy->formats & HAS_XRGB8888))
|
||||
goto bad_format;
|
||||
wl_format = WL_DRM_FORMAT_XRGB8888;
|
||||
break;
|
||||
default:
|
||||
goto bad_format;
|
||||
}
|
||||
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_WIDTH, &width);
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_HEIGHT, &height);
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch);
|
||||
|
||||
if (dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) {
|
||||
int fd;
|
||||
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FD, &fd);
|
||||
|
||||
buffer =
|
||||
wl_drm_create_prime_buffer(dri2_dpy->wl_drm,
|
||||
fd,
|
||||
width, height,
|
||||
wl_format,
|
||||
0, pitch,
|
||||
0, 0,
|
||||
0, 0);
|
||||
|
||||
close(fd);
|
||||
} else {
|
||||
int name;
|
||||
|
||||
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_NAME, &name);
|
||||
|
||||
buffer =
|
||||
wl_drm_create_buffer(dri2_dpy->wl_drm,
|
||||
name,
|
||||
width, height,
|
||||
pitch,
|
||||
wl_format);
|
||||
}
|
||||
|
||||
/* The buffer object will have been created with our internal event queue
|
||||
* because it is using the wl_drm object as a proxy factory. We want the
|
||||
* buffer to be used by the application so we'll reset it to the display's
|
||||
* default event queue */
|
||||
if (buffer)
|
||||
wl_proxy_set_queue((struct wl_proxy *) buffer, NULL);
|
||||
|
||||
return buffer;
|
||||
|
||||
bad_format:
|
||||
_eglError(EGL_BAD_MATCH, "unsupported image format");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||
{
|
||||
@@ -842,9 +674,6 @@ drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
|
||||
case WL_DRM_FORMAT_XRGB8888:
|
||||
dri2_dpy->formats |= HAS_XRGB8888;
|
||||
break;
|
||||
case WL_DRM_FORMAT_RGB565:
|
||||
dri2_dpy->formats |= HAS_RGB565;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,60 +726,6 @@ static const struct wl_registry_listener registry_listener = {
|
||||
registry_handle_global_remove
|
||||
};
|
||||
|
||||
static EGLBoolean
|
||||
dri2_swap_interval(_EGLDriver *drv,
|
||||
_EGLDisplay *disp,
|
||||
_EGLSurface *surf,
|
||||
EGLint interval)
|
||||
{
|
||||
if (interval > surf->Config->MaxSwapInterval)
|
||||
interval = surf->Config->MaxSwapInterval;
|
||||
else if (interval < surf->Config->MinSwapInterval)
|
||||
interval = surf->Config->MinSwapInterval;
|
||||
|
||||
surf->SwapInterval = interval;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_setup_swap_interval(struct dri2_egl_display *dri2_dpy)
|
||||
{
|
||||
GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1;
|
||||
|
||||
/* We can't use values greater than 1 on Wayland because we are using the
|
||||
* frame callback to synchronise the frame and the only way we be sure to
|
||||
* get a frame callback is to attach a new buffer. Therefore we can't just
|
||||
* sit drawing nothing to wait until the next ‘n’ frame callbacks */
|
||||
|
||||
if (dri2_dpy->config)
|
||||
dri2_dpy->config->configQueryi(dri2_dpy->dri_screen,
|
||||
"vblank_mode", &vblank_mode);
|
||||
switch (vblank_mode) {
|
||||
case DRI_CONF_VBLANK_NEVER:
|
||||
dri2_dpy->min_swap_interval = 0;
|
||||
dri2_dpy->max_swap_interval = 0;
|
||||
dri2_dpy->default_swap_interval = 0;
|
||||
break;
|
||||
case DRI_CONF_VBLANK_ALWAYS_SYNC:
|
||||
dri2_dpy->min_swap_interval = 1;
|
||||
dri2_dpy->max_swap_interval = 1;
|
||||
dri2_dpy->default_swap_interval = 1;
|
||||
break;
|
||||
case DRI_CONF_VBLANK_DEF_INTERVAL_0:
|
||||
dri2_dpy->min_swap_interval = 0;
|
||||
dri2_dpy->max_swap_interval = 1;
|
||||
dri2_dpy->default_swap_interval = 0;
|
||||
break;
|
||||
default:
|
||||
case DRI_CONF_VBLANK_DEF_INTERVAL_1:
|
||||
dri2_dpy->min_swap_interval = 0;
|
||||
dri2_dpy->max_swap_interval = 1;
|
||||
dri2_dpy->default_swap_interval = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
@@ -961,21 +736,14 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
static const unsigned int argb_masks[4] =
|
||||
{ 0xff0000, 0xff00, 0xff, 0xff000000 };
|
||||
static const unsigned int rgb_masks[4] = { 0xff0000, 0xff00, 0xff, 0 };
|
||||
static const unsigned int rgb565_masks[4] = { 0xf800, 0x07e0, 0x001f, 0 };
|
||||
|
||||
loader_set_logger(_eglLog);
|
||||
|
||||
drv->API.CreateWindowSurface = dri2_create_window_surface;
|
||||
drv->API.DestroySurface = dri2_destroy_surface;
|
||||
drv->API.SwapBuffers = dri2_swap_buffers;
|
||||
drv->API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage;
|
||||
drv->API.SwapInterval = dri2_swap_interval;
|
||||
drv->API.Terminate = dri2_terminate;
|
||||
drv->API.QueryBufferAge = dri2_query_buffer_age;
|
||||
|
||||
drv->API.CreateWaylandBufferFromImageWL =
|
||||
dri2_create_wayland_buffer_from_image_wl;
|
||||
|
||||
dri2_dpy = calloc(1, sizeof *dri2_dpy);
|
||||
if (!dri2_dpy)
|
||||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
@@ -1009,7 +777,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
if (roundtrip(dri2_dpy) < 0 || !dri2_dpy->authenticated)
|
||||
goto cleanup_fd;
|
||||
|
||||
dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0);
|
||||
dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
|
||||
if (dri2_dpy->driver_name == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name");
|
||||
goto cleanup_fd;
|
||||
@@ -1024,20 +792,15 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
|
||||
dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
|
||||
dri2_get_buffers_with_format;
|
||||
|
||||
|
||||
dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
|
||||
dri2_dpy->extensions[1] = &image_loader_extension.base;
|
||||
dri2_dpy->extensions[2] = &image_lookup_extension.base;
|
||||
dri2_dpy->extensions[3] = &use_invalidate.base;
|
||||
dri2_dpy->extensions[4] = NULL;
|
||||
|
||||
dri2_dpy->swap_available = EGL_TRUE;
|
||||
dri2_dpy->extensions[1] = &image_lookup_extension.base;
|
||||
dri2_dpy->extensions[2] = &use_invalidate.base;
|
||||
dri2_dpy->extensions[3] = NULL;
|
||||
|
||||
if (!dri2_create_screen(disp))
|
||||
goto cleanup_driver;
|
||||
|
||||
dri2_setup_swap_interval(dri2_dpy);
|
||||
|
||||
/* The server shouldn't advertise WL_DRM_CAPABILITY_PRIME if the driver
|
||||
* doesn't have createImageFromFds, since we're using the same driver on
|
||||
* both sides. We don't want crash if that happens anyway, so fall back to
|
||||
@@ -1045,21 +808,18 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
if (dri2_dpy->image->base.version < 7 ||
|
||||
dri2_dpy->image->createImageFromFds == NULL)
|
||||
dri2_dpy->capabilities &= ~WL_DRM_CAPABILITY_PRIME;
|
||||
dri2_dpy->capabilities &= WL_DRM_CAPABILITY_PRIME;
|
||||
|
||||
types = EGL_WINDOW_BIT;
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++) {
|
||||
config = dri2_dpy->driver_configs[i];
|
||||
if (dri2_dpy->formats & HAS_XRGB8888)
|
||||
dri2_add_config(disp, config, i + 1, types, NULL, rgb_masks);
|
||||
dri2_add_config(disp, config, i + 1, 0, types, NULL, rgb_masks);
|
||||
if (dri2_dpy->formats & HAS_ARGB8888)
|
||||
dri2_add_config(disp, config, i + 1, types, NULL, argb_masks);
|
||||
if (dri2_dpy->formats & HAS_RGB565)
|
||||
dri2_add_config(disp, config, i + 1, types, NULL, rgb565_masks);
|
||||
dri2_add_config(disp, config, i + 1, 0, types, NULL, argb_masks);
|
||||
}
|
||||
|
||||
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
|
||||
disp->Extensions.WL_create_wayland_buffer_from_image = EGL_TRUE;
|
||||
disp->Extensions.EXT_buffer_age = EGL_TRUE;
|
||||
dri2_dpy->authenticate = dri2_wayland_authenticate;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user