Compare commits
223 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1041bfe6dd | ||
|
ba73bea5d0 | ||
|
4d07d52e27 | ||
|
18973c7f0f | ||
|
ee30fd0ea0 | ||
|
3d80d54bc9 | ||
|
205f537b5a | ||
|
c864835b3d | ||
|
fde69f8500 | ||
|
f75b27a53e | ||
|
183a28a34a | ||
|
f84fe6aa2e | ||
|
be7048477a | ||
|
4e35ffa762 | ||
|
15693b7925 | ||
|
dddc5df519 | ||
|
e11ef54a92 | ||
|
2de8874ec3 | ||
|
d47020b6d4 | ||
|
52c711e5b2 | ||
|
71e3ee38ac | ||
|
fdfb299c22 | ||
|
2389fcc802 | ||
|
cef854dba7 | ||
|
adcf0a0cf4 | ||
|
663e41547a | ||
|
d40df80732 | ||
|
914368538e | ||
|
c760677c85 | ||
|
a1cb12c1fb | ||
|
d32aff91c1 | ||
|
d4fc90c129 | ||
|
5fdc42fb87 | ||
|
527b3b8555 | ||
|
9d4ab9a663 | ||
|
dca04373c2 | ||
|
a8f8287154 | ||
|
d2d3cd2be7 | ||
|
f4e33c551d | ||
|
8d38c72298 | ||
|
3fa0423c02 | ||
|
6b745a4e24 | ||
|
998f402af5 | ||
|
63f8589430 | ||
|
1151cdfa9e | ||
|
ffaa1c92e9 | ||
|
765221c0d5 | ||
|
c10c3eab4c | ||
|
2cde1e592e | ||
|
96c1678c3a | ||
|
af41a1d491 | ||
|
3a39c3cb67 | ||
|
938b156d82 | ||
|
cd95b67347 | ||
|
439842e434 | ||
|
3bdb758934 | ||
|
dcb6a7ccbb | ||
|
e8830f5a40 | ||
|
e6e58cfa9d | ||
|
5f8a8716b6 | ||
|
460096f5da | ||
|
25e34c3526 | ||
|
794c133dfb | ||
|
9ae069dbbd | ||
|
4a0423e1bd | ||
|
e582e35227 | ||
|
37be707f57 | ||
|
b086d9ced7 | ||
|
ce22054074 | ||
|
b7af6550b1 | ||
|
738d1ae3b5 | ||
|
3479fdef2f | ||
|
ebd4883a0c | ||
|
78222e6363 | ||
|
1e8de8437a | ||
|
d9c7fcff8f | ||
|
bc7112746d | ||
|
29bc8e7d8f | ||
|
de150e2478 | ||
|
a3d2e3e061 | ||
|
0ba14013f6 | ||
|
a474b455ac | ||
|
457eab5a9b | ||
|
871da78263 | ||
|
d02343e501 | ||
|
e479370164 | ||
|
42df904f88 | ||
|
3ebfd3f774 | ||
|
b922999a40 | ||
|
0f687f8455 | ||
|
f3374c6dda | ||
|
1c1b424408 | ||
|
2b2ab2b3ea | ||
|
81d40e66ad | ||
|
cd0e19a749 | ||
|
88258e0dfe | ||
|
d63e946587 | ||
|
4cf2be408e | ||
|
7045f222cd | ||
|
39fdab1d66 | ||
|
dfb3dc3fb8 | ||
|
320b5abda5 | ||
|
b694aa4ab9 | ||
|
6b3355c91d | ||
|
ced638e674 | ||
|
727b56b578 | ||
|
8333a7b6e3 | ||
|
7eddf86185 | ||
|
5a36510f71 | ||
|
67fb55b03d | ||
|
a096942592 | ||
|
eadadecbaa | ||
|
a00623174b | ||
|
da8876c7dd | ||
|
572889ffcb | ||
|
f05a0226b8 | ||
|
df7c634d20 | ||
|
b5d25dd849 | ||
|
c66256b484 | ||
|
65476169f3 | ||
|
8a3a76e1da | ||
|
07b505bfdf | ||
|
b683891fda | ||
|
3ec28fc976 | ||
|
ba36bd0375 | ||
|
a3f5601465 | ||
|
2d00d104b4 | ||
|
422f3bb8ab | ||
|
cc8ff5354d | ||
|
c4263ac0ba | ||
|
cb3bcb73e5 | ||
|
7e80685340 | ||
|
e6174a9fd9 | ||
|
9e1050d72f | ||
|
18a9979dc1 | ||
|
f19b7eceb0 | ||
|
05974cb8c6 | ||
|
97eed6da97 | ||
|
a908f4a754 | ||
|
f1188d4464 | ||
|
fb8d6b41d8 | ||
|
b63f8f7906 | ||
|
1b9436fb1a | ||
|
a5848562b5 | ||
|
19c1e7c664 | ||
|
070f317d99 | ||
|
409cb4fc73 | ||
|
b22de71c1b | ||
|
cb415d4df6 | ||
|
3703e9920c | ||
|
b3cd93d933 | ||
|
ddf1e620e9 | ||
|
f2da7e720f | ||
|
f9d8d0c3b5 | ||
|
b49d9338d7 | ||
|
eaf6884621 | ||
|
0ac90296a0 | ||
|
42f71b4861 | ||
|
9311e55c8a | ||
|
e1cb624a43 | ||
|
d0a9ab29b2 | ||
|
8b2922ff5a | ||
|
b55c98ea41 | ||
|
1106bbc7d6 | ||
|
7bcc228beb | ||
|
7ca75b62cd | ||
|
d1dfe4e020 | ||
|
5b007761fe | ||
|
efa6b5e42b | ||
|
492b69f3be | ||
|
de5e3774d0 | ||
|
8ff8c91893 | ||
|
94864becb0 | ||
|
23c71839e9 | ||
|
b2f18cd2b0 | ||
|
49150fd43c | ||
|
51ba1c1ae1 | ||
|
854b8099c3 | ||
|
c1534a5fdf | ||
|
ff83f29241 | ||
|
14b2c43f19 | ||
|
a138bc7c33 | ||
|
2d85170eb7 | ||
|
d4540c5f3d | ||
|
fcb9f25989 | ||
|
d0533029ce | ||
|
4510df5464 | ||
|
bf1fb345af | ||
|
2332bc26d4 | ||
|
d26890688f | ||
|
c4f392aafb | ||
|
129d9d5078 | ||
|
895a5873d1 | ||
|
4b507f809c | ||
|
94cc306e41 | ||
|
4be397e164 | ||
|
6a3c578dcd | ||
|
8d00f077c9 | ||
|
8aab8a50d3 | ||
|
cf7634d966 | ||
|
2a81037439 | ||
|
b565197c5c | ||
|
a5776ac0b8 | ||
|
79d9471efd | ||
|
0a72dbd350 | ||
|
5fe5aa8e55 | ||
|
8e01950625 | ||
|
95c47f07a1 | ||
|
77b1d2e09c | ||
|
8f772b34b0 | ||
|
3913cd19b8 | ||
|
d56ee24335 | ||
|
8dc79ae7d7 | ||
|
22b7ddc7f0 | ||
|
dc74c9d0f4 | ||
|
b4419477fb | ||
|
dee121b885 | ||
|
0c3c77ba17 | ||
|
0f5d87c3dd | ||
|
8e73273cb9 | ||
|
e75051d196 | ||
|
32faf7ab0d | ||
|
161aababc6 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -39,5 +39,6 @@ manifest.txt
|
||||
Makefile.in
|
||||
.dir-locals.el
|
||||
.deps/
|
||||
.dirstamp
|
||||
.libs/
|
||||
/Makefile
|
||||
|
15
Makefile.am
15
Makefile.am
@@ -54,13 +54,22 @@ distclean-local:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
PACKAGE_VERSION=9.0
|
||||
PACKAGE_VERSION=9.0.3
|
||||
PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
|
||||
PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
|
||||
|
||||
EXTRA_FILES = \
|
||||
aclocal.m4 \
|
||||
configure \
|
||||
bin/ar-lib \
|
||||
bin/compile \
|
||||
bin/config.sub \
|
||||
bin/config.guess \
|
||||
bin/depcomp \
|
||||
bin/install-sh \
|
||||
bin/ltmain.sh \
|
||||
bin/missing \
|
||||
bin/ylwrap \
|
||||
src/glsl/glsl_parser.cc \
|
||||
src/glsl/glsl_parser.h \
|
||||
src/glsl/glsl_lexer.cc \
|
||||
@@ -75,7 +84,9 @@ EXTRA_FILES = \
|
||||
src/mesa/main/api_exec_es2_remap_helper.h \
|
||||
src/mesa/program/lex.yy.c \
|
||||
src/mesa/program/program_parse.tab.c \
|
||||
src/mesa/program/program_parse.tab.h
|
||||
src/mesa/program/program_parse.tab.h \
|
||||
`git ls-files | grep "Makefile.am" | sed -e "s/Makefile.am/Makefile.in/"`
|
||||
|
||||
|
||||
IGNORE_FILES = \
|
||||
-x autogen.sh
|
||||
|
41
bin/.cherry-ignore
Normal file
41
bin/.cherry-ignore
Normal file
@@ -0,0 +1,41 @@
|
||||
# These commits were cherry picked without using -x.
|
||||
ca3ed3e024864e91ca3cccc59fb96950e1d079b5 egl/wayland: Don't invalidate drawable on swap buffers
|
||||
89ba4368fd86778405eea163e2b27812055f0df9 egl/wayland: Add invalidate back in eglSwapBuffers()
|
||||
60a11e295b86475ff334291a5b483e422371b21c egl/wayland: Dispatch the event queue before get_buffers
|
||||
41e105d5beb78c42993a602cc58d0f990739b088 nvc0: add missing call to map edge flag in push_vbo
|
||||
be75a9373a6d0f9e2ef35ac376a541e60d72d306 nv50/ir: wrap assertion using typeid in #ifndef NDEBUG
|
||||
7d2d450ea6d8082db14cd3f86c6c25442bf771c5 nouveau: fix undefined behaviour when testing sample_count
|
||||
|
||||
# Causes too many regressions...
|
||||
413c4914129cd26ca87960852d8c0264c0fb29e7 intel: Improve teximage perf for Google Chrome paint rects (v3)
|
||||
b1d0fe022dc4826dadce014ab8fe062a82f75a16 intel: Fix segfault in intel_texsubimage_tiled_memcpy
|
||||
b5891286202987dfc2606ac716050c0ee426de11 intel: Fix yet-another-bug in intel_texsubimage_tiled_memcpy
|
||||
|
||||
# Introduces performance regressions for other games... don't cherry-pick for now
|
||||
fa58644855e44830e0b91dc627703c236fa6712a r600g: fix abysmal performance in Reaction Quake
|
||||
|
||||
# i965 guardband clipping is disabled in 9.0, so no need to fix bugs in it
|
||||
23e7b81f2d742d292d77b53ac9cf72c3d89fc798 i965: Use fewer temporary variables in c
|
||||
lip setup.
|
||||
d411bbd5bd895617e265e023213895100e4509ef i965: Disable the GB clip test when a li
|
||||
mited viewport is set.
|
||||
|
||||
# Candidates for 9.1
|
||||
1559994cba380a4e87a5e8dbb04b0a7475711756 i965: Fix assignment instead of comparison in asserts.
|
||||
5c86a728d4f688c0fe7fbf9f4b8f88060b65c4ee r600g: fix htile buffer leak
|
||||
a06f03d795153ce060d99aafb61d10c27a47efc1 r300g: always put MSAA resources in VRAM
|
||||
a8a5055f2dea1960898763d17f28043577c3e64e radeonsi: Fix draws using user index buffer.
|
||||
257006e2a4201c11ca5f800a74ac4aaf62a7bfc1 r600g/llvm: Select the correct GPU type for RV670
|
||||
e5fb7347a72118bf06dfabaa453208578c7ad876 radeonsi: Adapt to sample intrinsics changes.
|
||||
120efeef8b51c16924dafa6bbeb017a856db911b radeonsi: Improve packing of texture address parameters.
|
||||
6bcb8238446060db665425d9f63eb0c1b3ba9f68 radeonsi: Enable texture arrays.
|
||||
6455d40b7ec09e3a3923c9b78952dc29627afed1 radeonsi: Remove spurious traces of R16G16B16 support.
|
||||
2db1f73849260cf8e5a7e390d04f5f26141a0b37 builtin_compiler/build: Don't use *_FOR_BUILD when not cross compiling
|
||||
11bd1b0f589bfeab8fcad5c70adf4c8a665eebc9 gallium/egl: Fix include dirs for VPATH build
|
||||
b92900d26a54ef997f2920d6a7371bb7c9caabf8 mesa/glsl: Separate parsing logic from _mesa_get_uniform_location.
|
||||
b4db34cc4c047427a21efb9bde03d7e125f70e55 glsl: Rename uniform_field_visitor to program_resource_visitor.
|
||||
53febac02c382fa163a9ad7280fc5f4d2707a665 glsl: Use parse_program_resource_name to parse transform feedback varyings.
|
||||
99b78337e38308480ee491493b045179f10ed579 glsl: Support transform feedback of varying structs.
|
||||
83e4407f443fb6baeccf9aefee291c82adcaa58b radeonsi: add support for Oland chips
|
||||
af0af75881ea99452086afd6907780de77af6e96 radeonsi: default PA_SC_RASTER_CONFIG to 0
|
||||
4161d70bba567e6e73d5e9e993a74d81930d0e72 radeonsi: add Oland pci ids
|
29
bin/get-pick-list.sh
Executable file
29
bin/get-pick-list.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script for generating a list of candidates for cherry-picking to a stable branch
|
||||
|
||||
# Grep for commits with "cherry picked from commit" in the commit message.
|
||||
git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
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: This is a candidate' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
if [ -f bin/.cherry-ignore ] ; then
|
||||
if grep -q ^$sha bin/.cherry-ignore ; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check to see if it has already been picked over.
|
||||
if grep -q ^$sha already_picked ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
git log -n1 --pretty=oneline $sha | cat
|
||||
done
|
||||
|
||||
rm -f already_picked
|
@@ -144,7 +144,7 @@ GLAPI_LIB_DEPS = @GLAPI_LIB_DEPS@
|
||||
DRI_LIB_DEPS = @DRI_LIB_DEPS@
|
||||
GALLIUM_DRI_LIB_DEPS = @GALLIUM_DRI_LIB_DEPS@
|
||||
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
|
||||
LIBDRM_LIB = @LIBDRM_LIBS@
|
||||
LIBDRM_LIBS = @LIBDRM_LIBS@
|
||||
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
|
||||
GLPROTO_CFLAGS = @GLPROTO_CFLAGS@
|
||||
EXPAT_INCLUDES = @EXPAT_INCLUDES@
|
||||
@@ -182,7 +182,8 @@ VA_LIB_INSTALL_DIR=@VA_LIB_INSTALL_DIR@
|
||||
XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
|
||||
|
||||
# Path to OpenCL C library libclc
|
||||
LIBCLC_PATH = @LIBCLC_PATH@
|
||||
LIBCLC_INCLUDEDIR = @LIBCLC_INCLUDEDIR@
|
||||
LIBCLC_LIBEXECDIR = @LIBCLC_LIBEXECDIR@
|
||||
|
||||
# pkg-config substitutions
|
||||
GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=9
|
||||
MESA_MINOR=0
|
||||
MESA_TINY=0
|
||||
MESA_TINY=3
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
|
61
configure.ac
61
configure.ac
@@ -6,7 +6,7 @@ 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.])
|
||||
|
||||
AC_INIT([Mesa], [9.0.0],
|
||||
AC_INIT([Mesa], [9.0.3],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||
AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@@ -50,6 +50,7 @@ AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AC_CHECK_PROGS([MAKE], [gmake make])
|
||||
AC_CHECK_PROGS([PYTHON2], [python2 python])
|
||||
AX_PYTHON_MODULE([libxml2], [needed])
|
||||
AC_PROG_SED
|
||||
AC_PROG_MKDIR_P
|
||||
AC_PATH_PROG([MKDEP], [makedepend])
|
||||
@@ -160,13 +161,13 @@ DEFINES=""
|
||||
AC_SUBST([DEFINES])
|
||||
case "$host_os" in
|
||||
linux*|*-gnu*|gnu*)
|
||||
DEFINES="$DEFINES -D_GNU_SOURCE"
|
||||
DEFINES="$DEFINES -D_GNU_SOURCE -DHAVE_PTHREAD"
|
||||
;;
|
||||
solaris*)
|
||||
DEFINES="$DEFINES -DSVR4"
|
||||
DEFINES="$DEFINES -DHAVE_PTHREAD -DSVR4"
|
||||
;;
|
||||
cygwin*)
|
||||
DEFINES="$DEFINES"
|
||||
DEFINES="$DEFINES -DHAVE_PTHREAD"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -671,6 +672,17 @@ if test "x$enable_opengl" = xno -a \
|
||||
AC_MSG_ERROR([at least one API should be enabled])
|
||||
fi
|
||||
|
||||
# Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
|
||||
if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles1" = xyes; then
|
||||
AC_MSG_ERROR([Building OpenGL ES1 without OpenGL is not supported])
|
||||
fi
|
||||
|
||||
if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles2" = xyes; then
|
||||
AC_MSG_ERROR([Building OpenGL ES2 without OpenGL is not supported])
|
||||
fi
|
||||
|
||||
API_DEFINES=""
|
||||
if test "x$enable_opengl" = xno; then
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_GL=0"
|
||||
@@ -694,6 +706,16 @@ if test "x$enable_dri$enable_xlib_glx" = xyesyes; then
|
||||
AC_MSG_ERROR([DRI and Xlib-GLX cannot be built together])
|
||||
fi
|
||||
|
||||
if test "x$enable_opengl$enable_xlib_glx" = xnoyes; then
|
||||
AC_MSG_ERROR([Xlib-GLX cannot be built without OpenGL])
|
||||
fi
|
||||
|
||||
# Disable GLX if OpenGL is not enabled
|
||||
if test "x$enable_glx$enable_opengl" = xyesno; then
|
||||
AC_MSG_WARN([OpenGL not enabled, disabling GLX])
|
||||
enable_glx=no
|
||||
fi
|
||||
|
||||
# Disable GLX if DRI and Xlib-GLX are not enabled
|
||||
if test "x$enable_glx" = xyes -a \
|
||||
"x$enable_dri" = xno -a \
|
||||
@@ -946,7 +968,7 @@ AC_ARG_ENABLE([glx-tls],
|
||||
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
|
||||
|
||||
AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
|
||||
[DEFINES="${DEFINES} -DGLX_USE_TLS"])
|
||||
[DEFINES="${DEFINES} -DGLX_USE_TLS -DHAVE_PTHREAD"])
|
||||
|
||||
dnl
|
||||
dnl More DRI setup
|
||||
@@ -1030,7 +1052,7 @@ if test "x$enable_dri" = xyes; then
|
||||
esac
|
||||
;;
|
||||
freebsd* | dragonfly* | *netbsd*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
|
||||
|
||||
if test "x$DRI_DIRS" = "xyes"; then
|
||||
@@ -1222,8 +1244,6 @@ if test "x$enable_gbm" = xyes; then
|
||||
if test "x$enable_shared_glapi" = xno; then
|
||||
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
|
||||
fi
|
||||
PKG_CHECK_MODULES([LIBKMS], [libkms], [],
|
||||
AC_MSG_ERROR([gbm needs libkms]))
|
||||
fi
|
||||
fi
|
||||
GBM_PC_REQ_PRIV="libudev"
|
||||
@@ -1435,17 +1455,27 @@ dnl
|
||||
|
||||
AC_ARG_WITH([libclc-path],
|
||||
[AS_HELP_STRING([--with-libclc-path],
|
||||
[Path to libclc builtins library. Example: --with-libclc-path=\$HOME/libclc/])],
|
||||
[DEPRECATED: See http://dri.freedesktop.org/wiki/GalliumCompute#How_to_Install])],
|
||||
[LIBCLC_PATH="$withval"],
|
||||
[LIBCLC_PATH=""])
|
||||
|
||||
if test "x$LIBCLC_PATH" != x; then
|
||||
AC_MSG_ERROR([The --with-libclc-path option has been deprecated.
|
||||
Please review the updated build instructions for clover:
|
||||
http://dri.freedesktop.org/wiki/GalliumCompute])
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_WITH([clang-libdir],
|
||||
[AS_HELP_STRING([--with-clang-libdir],
|
||||
[Path to Clang libraries @<:@default=llvm-config --libdir@:>@])],
|
||||
[CLANG_LIBDIR="$withval"],
|
||||
[CLANG_LIBDIR=""])
|
||||
|
||||
AC_SUBST([LIBCLC_PATH])
|
||||
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
|
||||
@@ -1456,6 +1486,10 @@ if test "x$enable_opencl" = xyes; then
|
||||
AC_MSG_ERROR([gcc >= 4.6 is required to build clover])
|
||||
fi
|
||||
|
||||
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
|
||||
@@ -1518,8 +1552,7 @@ for plat in $egl_platforms; do
|
||||
;;
|
||||
|
||||
wayland)
|
||||
PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \
|
||||
[AC_MSG_ERROR([cannot find libwayland-client])])
|
||||
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`
|
||||
@@ -1663,8 +1696,8 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
fi
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
|
||||
LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags`
|
||||
LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags`
|
||||
LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
|
||||
LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
|
||||
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
|
||||
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`"
|
||||
|
@@ -34,8 +34,7 @@ sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600)
|
||||
glClearBuffer commands DONE
|
||||
glGetStringi command DONE
|
||||
glTexParameterI, glGetTexParameterI commands DONE
|
||||
glVertexAttribI commands ~50% done (converts int
|
||||
values to floats)
|
||||
glVertexAttribI commands DONE
|
||||
Depth format cube textures DONE
|
||||
GLX_ARB_create_context (GLX 1.4 is required) DONE
|
||||
|
||||
|
@@ -9,6 +9,40 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>February 21, 2013</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-9.0.3.html">Mesa 9.0.3</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>January 22, 2013</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-9.0.2.html">Mesa 9.0.2</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>November 16, 2012</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-9.0.1.html">Mesa 9.0.1</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>October 8, 2012</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-9.0.html">Mesa 9.0</a> is released.
|
||||
This is the first version of Mesa to support OpenGL 3.1 and GLSL 1.40
|
||||
(with the i965 driver).
|
||||
See the release notes for more information about the release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>July 10, 2012</h2>
|
||||
|
||||
<p>
|
||||
|
159
docs/relnotes-9.0.1.html
Normal file
159
docs/relnotes-9.0.1.html
Normal file
@@ -0,0 +1,159 @@
|
||||
<!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>
|
||||
|
||||
<h1>Mesa 9.0.1 Release Notes / November 16th, 2012</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.0.1 is a bug fix release which fixes bugs found since the 9.0 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.0 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>
|
||||
97d6554c05ea7449398afe3a0ede7018 MesaLib-9.0.1.tar.bz2
|
||||
fd0fd5a6e56bc3dd210c80e42baef975 MesaLib-9.0.1.tar.gz
|
||||
c2683d957acd530a00f747f50317186f MesaLib-9.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=44912">Bug 44912</a> - [bisected] WebGL conformance/textures/texture-mips tests fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55856">Bug 55856</a> - kwin with gles window content is not updating (gen4)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56057">Bug 56057</a> - INTEL_swap_event not correctly listed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56211">Bug 56211</a> - src/mesa/state_tracker/st_cb_texture.c:1123:copy_image_data_to_texture: Assertion `u_minify(stImage->pt->height0, src_level) == stImage->base.Height' failed.</li>
|
||||
|
||||
<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>The full set of changes can be viewed by using the following GIT command:</p>
|
||||
|
||||
<pre>
|
||||
git log mesa-9.0..mesa-9.0.1
|
||||
</pre>
|
||||
|
||||
<p>Adam Jackson (1):</p>
|
||||
<ul>
|
||||
<li>glx: Add GLXBadProfileARB to the error string list</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (7):</p>
|
||||
<ul>
|
||||
<li>docs: add news item for 9.0 release</li>
|
||||
<li>mesa: add get-pick-list.sh script into bin/</li>
|
||||
<li>mesa: add initial .cherry-ignore file for the 9.0 branch</li>
|
||||
<li>mesa: use .cherry-ignore in the get-pick-list.sh script</li>
|
||||
<li>build: add config.sub and config.guess to tarballs target</li>
|
||||
<li>build: add missing Makefile.in files to tarballs target</li>
|
||||
<li>build: add missing files to tarballs target</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (2):</p>
|
||||
<ul>
|
||||
<li>mesa: don't call TexImage driver hooks for zero-sized images</li>
|
||||
<li>mesa: fix error check for zero-sized compressed subtexture</li>
|
||||
</ul>
|
||||
|
||||
<p>Fredrik Höglund (1):</p>
|
||||
<ul>
|
||||
<li>egl_dri2/x11: Fix eglPostSubBufferNV()</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (5):</p>
|
||||
<ul>
|
||||
<li>docs: Add 9.0 release md5sums</li>
|
||||
<li>i965: Fix regression in depth texture rendering on pre-SNB</li>
|
||||
<li>glx: Set sRGBCapable to a default value</li>
|
||||
<li>docs: Add 9.0.1 release notes</li>
|
||||
<li>mesa: Bump version to 9.0.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Imre Deak (7):</p>
|
||||
<ul>
|
||||
<li>mesa: glGet: fix indentation of _mesa_init_get_hash</li>
|
||||
<li>mesa: glGet: fix indentation of find_value</li>
|
||||
<li>mesa: glGet: fix indentation of print_table_stats</li>
|
||||
<li>mesa: glGet: fix API check for EGL_image_external enums</li>
|
||||
<li>glapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension section</li>
|
||||
<li>mesa: glGet: fix parameter lookup for apps using multiple APIs</li>
|
||||
<li>glget: fix make check for glGet GL_POLYGON_OFFSET_BIAS</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonas Ådahl (1):</p>
|
||||
<ul>
|
||||
<li>wayland: Destroy frame callback when destroying surface</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Allow ir_if in the linker's move_non_declarations function.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (5):</p>
|
||||
<ul>
|
||||
<li>gbm: Reject buffers that are not wl_drm buffers in gbm_bo_import()</li>
|
||||
<li>gbm: Use the kms dumb ioctls for cursor instead of libkms</li>
|
||||
<li>egl/wayland: Update to Wayland 0.99 API</li>
|
||||
<li>wayland: Remove 0.85 compatibility #ifdefs</li>
|
||||
<li>wayland: Drop support for ill-defined, unused wl_egl_pixmap</li>
|
||||
</ul>
|
||||
|
||||
<p>Marcin Slusarz (1):</p>
|
||||
<ul>
|
||||
<li>nouveau: use pre-calculated stride for resource_get_handle</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (4):</p>
|
||||
<ul>
|
||||
<li>egl: Return EGL_BAD_MATCH for invalid profile attributes</li>
|
||||
<li>Re-add HAVE_PTHREADS preprocessor macro</li>
|
||||
<li>build: Ship install-sh in the tarball</li>
|
||||
<li>ralloc: Annotate printf functions with PRINTFLIKE(...)</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (2):</p>
|
||||
<ul>
|
||||
<li>st/mesa: Fix source miptree level for copying data to finalized miptree.</li>
|
||||
<li>st/mesa: Fix assertions for copying texture image to finalized miptree.</li>
|
||||
</ul>
|
||||
|
||||
<p>Owen W. Taylor (1):</p>
|
||||
<ul>
|
||||
<li>glx: Fix listing of INTEL_swap_event in glXQueryExtensionsString()</li>
|
||||
</ul>
|
||||
|
||||
<p>Quentin Glidic (1):</p>
|
||||
<ul>
|
||||
<li>intel: Add missing #include <time.h></li>
|
||||
</ul>
|
||||
|
||||
<p>Tomeu Vizoso (1):</p>
|
||||
<ul>
|
||||
<li>mesa/es: Define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT enum for all GLs</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
282
docs/relnotes-9.0.2.html
Normal file
282
docs/relnotes-9.0.2.html
Normal file
@@ -0,0 +1,282 @@
|
||||
<!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>
|
||||
|
||||
<h1>Mesa 9.0.2 Release Notes / January 22th, 2013</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.0.2 is a bug fix release which fixes bugs found since the 9.0.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.0 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>
|
||||
5ae216ca9fecfa349f14ecb83aa3f124 MesaLib-9.0.2.tar.gz
|
||||
dc45d1192203e418163e0017640e1cfc MesaLib-9.0.2.tar.bz2
|
||||
93d40ec77d656dd04b561ba203ffbb91 MesaLib-9.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=22576">Bug 22576</a> - [KMS] mesa demo spectex broken on rv280</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26809">Bug 26809</a> - KMS/R200: Bad shading in NWN since Mesa rewrite</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45877">Bug 45877</a> - [bisected regression] Oglc fbo(negative.invalidParams3) Segmentation fault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54402">Bug 54402</a> - st_glsl_to_tgsi.cpp:4006:dst_register: Assertion `index < VERT_RESULT_MAX' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55175">Bug 55175</a> - Memoryleak with glPopAttrib only on Intel GM45</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56442">Bug 56442</a> - glcpp accepts junk after #else/#elif/#endif tokens</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56706">Bug 56706</a> - EGL sets error to EGL_SUCCESS when DRI driver fails to create context</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57622">Bug 57622</a> - Webgl conformance shader-with-non-reserved-words crash.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57842">Bug 57842</a> - r200: Culling is broken when rendering to an FBO</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57984">Bug 57984</a> - r300g: blend sfactor=GL_DST_COLOR fails with FBOs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58545">Bug 58545</a> - [llvmpipe] src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c:75:analyse_src: Assertion `src->Index < (sizeof(ctx->imm)/sizeof((ctx->imm)[0]))' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59383">Bug 59383</a> - src/glsl/tests/Makefile.am missing $(top_srcdir)/include</li>
|
||||
|
||||
<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>The full set of changes can be viewed by using the following GIT command:</p>
|
||||
|
||||
<pre>
|
||||
git log mesa-9.0.1..mesa-9.0.2
|
||||
</pre>
|
||||
|
||||
<p>Abdiel Janulgue (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix a crash in update_texture_state() for external texture type</li>
|
||||
</ul>
|
||||
|
||||
<p>Adam Jackson (4):</p>
|
||||
<ul>
|
||||
<li>glcpp: Fix visibility CFLAGS in automake</li>
|
||||
<li>glcpp: Typo fix.</li>
|
||||
<li>galahad, noop: Fix visibility CFLAGS in automake</li>
|
||||
<li>r300g: Fix visibility CFLAGS in automake</li>
|
||||
</ul>
|
||||
|
||||
<p>Alex Deucher (2):</p>
|
||||
<ul>
|
||||
<li>radeonsi: add some new SI pci ids</li>
|
||||
<li>radeonsi: add a new SI pci id</li>
|
||||
</ul>
|
||||
|
||||
<p>Ander Conselvan de Oliveira (2):</p>
|
||||
<ul>
|
||||
<li>egl/wayland: Don't invalidate drawable on swap buffers</li>
|
||||
<li>egl/wayland: Dispatch the event queue before get_buffers</li>
|
||||
<li>egl/wayland: Destroy the pending buffer callback with the egl surface</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (9):</p>
|
||||
<ul>
|
||||
<li>docs: fix release date of 9.0.1</li>
|
||||
<li>docs: add news item for 9.0.1 release</li>
|
||||
<li>Add .dirstamp to toplevel .gitignore</li>
|
||||
<li>build: use git ls-files for adding all Makefile.in into the release tarball</li>
|
||||
<li>build: Fix GLES linkage without libglapi</li>
|
||||
<li>Revert "r600g: try to fix streamout for the cases where BURST_COUNT > 0"</li>
|
||||
<li>mesa: update .cherry-ignore list</li>
|
||||
<li>mesa: Bump version to 9.0.2</li>
|
||||
<li>docs: Add 9.0.2 release notes</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (2):</p>
|
||||
<ul>
|
||||
<li>mesa: Generate invalid operation in glGenerateMipMap for integer textures</li>
|
||||
<li>meta: Remove redundant code in _mesa_meta_GenerateMipmap</li>
|
||||
</ul>
|
||||
|
||||
<p>Ben Skeggs (3):</p>
|
||||
<ul>
|
||||
<li>nvc0: fix missing permanent bo reference on poly cache</li>
|
||||
<li>nvc0: point vertex runout at a valid address</li>
|
||||
<li>nv50: point vertex runout at a valid address</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (5):</p>
|
||||
<ul>
|
||||
<li>svga: don't use uninitialized framebuffer state</li>
|
||||
<li>st/mesa: replace REALLOC() with realloc()</li>
|
||||
<li>st/mesa: free TGSI tokens with ureg_free_tokens()</li>
|
||||
<li>util: added pipe_surface_release() function</li>
|
||||
<li>gallivm: support more immediates in lp_build_tgsi_info()</li>
|
||||
</ul>
|
||||
|
||||
<p>Bryan Cain (1):</p>
|
||||
<ul>
|
||||
<li>glsl_to_tgsi: set correct register type for array and structure elements</li>
|
||||
</ul>
|
||||
|
||||
<p>Chad Versace (2):</p>
|
||||
<ul>
|
||||
<li>i965: Validate requested GLES context version in brwCreateContext</li>
|
||||
<li>egl/dri2: Set error code when dri2CreateContextAttribs fails</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Fester (1):</p>
|
||||
<ul>
|
||||
<li>util: null-out the node's prev/next pointers in list_del()</li>
|
||||
</ul>
|
||||
|
||||
<p>Christoph Bumiller (5):</p>
|
||||
<ul>
|
||||
<li>nv50/ir/tgsi: fix srcMask for TXP with SHADOW1D</li>
|
||||
<li>nvc0: add missing call to map edge flag in push_vbo</li>
|
||||
<li>nv50/ir: wrap assertion using typeid in #ifndef NDEBUG</li>
|
||||
<li>nouveau: fix undefined behaviour when testing sample_count</li>
|
||||
<li>nv50/ir: restore use of long immediate encodings</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (5):</p>
|
||||
<ul>
|
||||
<li>r600g: fix lod bias/explicit lod with cube maps.</li>
|
||||
<li>glsl_to_tgsi: fix dst register for texturing fetches.</li>
|
||||
<li>glsl: fix cut-n-paste error in error handling. (v2)</li>
|
||||
<li>glsl: initialise killed_all field.</li>
|
||||
<li>glsl: fix uninitialised variable from constructor</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (4):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix the core GL genned-name handling for glBindBufferBase()/Range().</li>
|
||||
<li>mesa: Fix core GL genned-name handling for glBeginQuery().</li>
|
||||
<li>mesa: Fix segfault on reading from a missing color read buffer.</li>
|
||||
<li>i965/gen4: Fix memory leak each time compile_gs_prog() is called.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (2):</p>
|
||||
<ul>
|
||||
<li>docs: Add 9.0.1 release md5sums</li>
|
||||
<li>glsl: Don't add structure fields to the symbol table</li>
|
||||
</ul>
|
||||
|
||||
<p>Johannes Obermayr (4):</p>
|
||||
<ul>
|
||||
<li>clover: Install CL headers.</li>
|
||||
<li>gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM >= 3.2.</li>
|
||||
<li>clover: Adapt libclc's INCLUDEDIR and LIBEXECDIR to make use of the new introduced libclc.pc.</li>
|
||||
<li>tests: AM_CPPFLAGS must include $(top_srcdir) instead of $(top_builddir).</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonas Ådahl (1):</p>
|
||||
<ul>
|
||||
<li>wayland: Don't cancel a roundtrip when any event is received</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>llvmpipe: Obey back writemask.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (8):</p>
|
||||
<ul>
|
||||
<li>i965/vs: Fix unit mismatch in scratch base_offset parameter.</li>
|
||||
<li>i965/vs: Implement register spilling.</li>
|
||||
<li>mesa: Don't flatten IF statements by default.</li>
|
||||
<li>glcpp: Don't use infinite lookhead for #define differentiation.</li>
|
||||
<li>i965/vs: Don't lose the MRF writemask when doing compute-to-MRF.</li>
|
||||
<li>i965/vs: Preserve the type when copy propagating into an instruction.</li>
|
||||
<li>mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.</li>
|
||||
<li>i965: Fix AA Line Distance Mode in 3DSTATE_SF on Ivybridge.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (1):</p>
|
||||
<ul>
|
||||
<li>egl/wayland: Add invalidate back in eglSwapBuffers()</li>
|
||||
</ul>
|
||||
|
||||
<p>Maarten Lankhorst (2):</p>
|
||||
<ul>
|
||||
<li>makefiles: use configured name for -ldrm* where possible</li>
|
||||
<li>automake: strip LLVM_CXXFLAGS and LLVM_CPPFLAGS too</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (17):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix integer texture border color for some formats (v2)</li>
|
||||
<li>r300g: fix texture border color for sRGB formats</li>
|
||||
<li>mesa: bump MAX_VARYING to 32</li>
|
||||
<li>draw: fix assertion failure in draw_emit_vertex_attr</li>
|
||||
<li>vbo: fix glVertexAttribI* functions</li>
|
||||
<li>mesa: add MaxNumLevels to gl_texture_image, remove MaxLog2</li>
|
||||
<li>mesa: fix error checking of TexStorage(levels) for array and rect textures</li>
|
||||
<li>st/mesa: fix guessing the base level size</li>
|
||||
<li>st/mesa: fix computation of last_level during texture creation</li>
|
||||
<li>st/mesa: fix computation of last_level in GenerateMipmap</li>
|
||||
<li>r600g: fix streamout on RS780 and RS880</li>
|
||||
<li>r600g: advertise 32 streamout vec4 outputs</li>
|
||||
<li>r600g: fix broken streamout if streamout_begin caused a context flush</li>
|
||||
<li>mesa: fix BlitFramebuffer between linear and sRGB formats</li>
|
||||
<li>r600g: try to fix streamout for the cases where BURST_COUNT > 0</li>
|
||||
<li>r600g: always use a tiled resource as the destination of MSAA resolve</li>
|
||||
<li>mesa: add MaxNumLevels to gl_texture_image, remove MaxLog2</li>
|
||||
</ul>
|
||||
|
||||
<p>Mario Kleiner (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>glcpp: Reject garbage after #else and #endif tokens</li>
|
||||
</ul>
|
||||
|
||||
<p>Stefan Dösinger (1):</p>
|
||||
<ul>
|
||||
<li>r300: Don't disable destination read if the src blend factor needs it</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (1):</p>
|
||||
<ul>
|
||||
<li>android: generate matching remap_helper to dispatch table</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (1):</p>
|
||||
<ul>
|
||||
<li>r600g: Use LOOP_START_DX10 for loops</li>
|
||||
</ul>
|
||||
|
||||
<p>Vinson Lee (1):</p>
|
||||
<ul>
|
||||
<li>i915: Fix wrong sizeof argument in i915_update_tex_unit.</li>
|
||||
</ul>
|
||||
|
||||
<p>smoki (2):</p>
|
||||
<ul>
|
||||
<li>r200: fix broken tcl lighting</li>
|
||||
<li>radeon/r200: Fix tcl culling</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
239
docs/relnotes-9.0.3.html
Normal file
239
docs/relnotes-9.0.3.html
Normal file
@@ -0,0 +1,239 @@
|
||||
<!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>
|
||||
|
||||
<h1>Mesa 9.0.3 Release Notes / February 21th, 2013</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.0.3 is a bug fix release which fixes bugs found since the 9.0.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.0 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>
|
||||
168384ac0101f4600a15edd3561acdc7 MesaLib-9.0.3.tar.gz
|
||||
d7515cc5116c72ac63d735655bd63689 MesaLib-9.0.3.tar.bz2
|
||||
a2e1c794572440fd0d839a7d7dfea00c MesaLib-9.0.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=25201">Bug 25201</a> - Pink artifacts on objects in the distance in ETQW/Quake 4</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31598">Bug 31598</a> - configure: Doesn't check for python libxml2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=40404">Bug 40404</a> - [softpipe] piglit glsl-max-varyings regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47220">Bug 47220</a> - [bisected] Oglc pxconv-gettex(basic.allCases) regressed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=48629">Bug 48629</a> - [bisected i965]Oglc shad-compiler(advanced.TestLessThani) regressed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54240">Bug 54240</a> - [swrast] piglit fbo-generatemipmap-filtering regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56920">Bug 56920</a> - [sandybridge][uxa] graphics very glitchy and always flickering</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57166">Bug 57166</a> - [GM45] Chrome experiment "Stars" crash: brw_fs_emit.cpp:708: brw_reg brw_reg_from_fs_reg(fs_reg*): Assertion „!"not reached"“ failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57746">Bug 57746</a> - build test failure: nouveau_fbo.c:198:3: error: too few arguments to function 'nouveau_renderbuffer_del'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57754">Bug 57754</a> - [swrast] Mesa 9.1-devel implementation error: Unable to delete renderbuffer, no context</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58680">Bug 58680</a> - [IVB] Graphical glitches in 0 A.D</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58972">Bug 58972</a> - [softpipe] util/u_tile.c:795:pipe_put_tile_z: Assertion `0' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59364">Bug 59364</a> - [bisected] Mesa build fails: clientattrib.c:33:22: fatal error: indirect.h: No such file or directory</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59700">Bug 59700</a> - [ILK/SNB/IVB Bisected]Oglc vertexshader(advanced.TestLightsTwoSided) causes GPU hung</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59873">Bug 59873</a> - [swrast] piglit ext_framebuffer_multisample-interpolation 0 centroid-edges regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60052">Bug 60052</a> - [Bisected]Piglit glx_extension_string_sanity fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60172">Bug 60172</a> - Planeshift: triangles where grass would be</li>
|
||||
|
||||
<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>The full set of changes can be viewed by using the following GIT command:</p>
|
||||
|
||||
<pre>
|
||||
git log mesa-9.0.2..mesa-9.0.3
|
||||
</pre>
|
||||
|
||||
<p>Adam Jackson (1):</p>
|
||||
<ul>
|
||||
<li>r200: Fix probable thinko in r200EmitArrays</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (7):</p>
|
||||
<ul>
|
||||
<li>docs: Add 9.0.2 release md5sums</li>
|
||||
<li>docs: add news item for 9.0.2 release</li>
|
||||
<li>configure.ac: Allow OpenGL ES1 and ES2 only with enabled OpenGL</li>
|
||||
<li>build: require python module libxml2</li>
|
||||
<li>cherry-ignore: Ignore candidates for the 9.1 branch.</li>
|
||||
<li>mesa: Bump version to 9.0.3</li>
|
||||
<li>docs: Add 9.0.3 release notes</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix GL_LUMINANCE handling for textures in glGetTexImage</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (29):</p>
|
||||
<ul>
|
||||
<li>st/glx: accept GLX_SAMPLE_BUFFERS/SAMPLES_ARB == 0</li>
|
||||
<li>draw: set precalc_flat flag for AA lines too</li>
|
||||
<li>softpipe: fix up FS variant unbinding / deletion</li>
|
||||
<li>softpipe: fix unreliable FS variant binding bug</li>
|
||||
<li>xlib: handle _mesa_initialize_visual()'s return value</li>
|
||||
<li>xlib: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values</li>
|
||||
<li>st/glx: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values</li>
|
||||
<li>util: fix addressing bug in pipe_put_tile_z() for PIPE_FORMAT_Z32_FLOAT</li>
|
||||
<li>util: add get/put_tile_z() support for PIPE_FORMAT_Z32_FLOAT_S8X24_UINT</li>
|
||||
<li>mesa: use GLbitfield64 when copying program inputs</li>
|
||||
<li>svga: add NULL pointer check in svga_create_sampler_state()</li>
|
||||
<li>vbo: add a null pointer check to handle OOM instead of crashing</li>
|
||||
<li>osmesa: use _mesa_generate_mipmap() for mipmap generation, not meta</li>
|
||||
<li>xlib: use _mesa_generate_mipmap() for mipmap generation, not meta</li>
|
||||
<li>st/mesa: set ctx->Const.MaxSamples = 0, not 1</li>
|
||||
<li>mesa: fix-up and use _mesa_delete_renderbuffer()</li>
|
||||
<li>mesa: pass context parameter to gl_renderbuffer::Delete()</li>
|
||||
<li>st/mesa: fix context use-after-free problem in st_renderbuffer_delete()</li>
|
||||
<li>dri_glx: fix use after free report</li>
|
||||
<li>mesa: remove warning message in _mesa_reference_renderbuffer_()</li>
|
||||
<li>st/mesa: add null pointer check in st_renderbuffer_delete()</li>
|
||||
<li>util: add some defensive coding in u_upload_alloc()</li>
|
||||
<li>st/mesa: do proper error checking for u_upload_alloc() calls</li>
|
||||
<li>util: add new error checking code in vbuf helper</li>
|
||||
<li>mesa: don't enable GL_EXT_framebuffer_multisample for software drivers</li>
|
||||
<li>st/mesa: only enable GL_EXT_framebuffer_multisample if GL_MAX_SAMPLES >= 2</li>
|
||||
<li>mesa: don't expose IBM_rasterpos_clip in a core context</li>
|
||||
<li>svga: fix sRGB rendering</li>
|
||||
<li>nouveau: Fix build.</li>
|
||||
</ul>
|
||||
|
||||
<p>Chad Versace (1):</p>
|
||||
<ul>
|
||||
<li>i965/disasm: Fix horizontal stride of dest registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (5):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Fix the gen6-specific if handling for 80ecb8f15b9ad7d6edc</li>
|
||||
<li>i965/fs: Don't generate saturates over existing variable values.</li>
|
||||
<li>i965: Actually add support for GL_ANY_SAMPLES_PASSED from GL_ARB_oq2.</li>
|
||||
<li>i965/vs: Try again when we've successfully spilled a reg.</li>
|
||||
<li>i965/gen7: Set up all samplers even if samplers are sparsely used.</li>
|
||||
</ul>
|
||||
|
||||
<p>Frank Henigman (1):</p>
|
||||
<ul>
|
||||
<li>mesa: add bounds checking for uniform array access</li>
|
||||
</ul>
|
||||
|
||||
<p>Jerome Glisse (1):</p>
|
||||
<ul>
|
||||
<li>r600g: add cs memory usage accounting and limit it v3 (backport for mesa 9.0)</li>
|
||||
</ul>
|
||||
|
||||
<p>Jordan Justen (1):</p>
|
||||
<ul>
|
||||
<li>unpack: support unpacking MESA_FORMAT_ARGB2101010</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (2):</p>
|
||||
<ul>
|
||||
<li>mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV)</li>
|
||||
<li>draw: Properly limit vertex buffer fetches on draw arrays.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (19):</p>
|
||||
<ul>
|
||||
<li>i965: Fix primitive restart on Haswell.</li>
|
||||
<li>i965: Refactor texture swizzle generation into a helper.</li>
|
||||
<li>i965: Do texture swizzling in hardware on Haswell.</li>
|
||||
<li>i965: Lower textureGrad() with samplerCubeShadow.</li>
|
||||
<li>i965: Use Haswell's sample_d_c for textureGrad with shadow samplers.</li>
|
||||
<li>i965: Add chipset limits for Haswell GT1/GT2.</li>
|
||||
<li>cherry-ignore: Ignore i965 guardband bug fixes.</li>
|
||||
<li>i965: Add missing _NEW_BUFFERS dirty bit in Gen7 SBE state.</li>
|
||||
<li>i965/vs: Create a 'lod_type' temporary for ir->lod_info.lod->type.</li>
|
||||
<li>i965/vs: Set LOD to 0 for ordinary texture() calls.</li>
|
||||
<li>i965/vs: Store texturing results into a vec4 temporary.</li>
|
||||
<li>cherry-ignore: Ignore candidates for the 9.1 branch.</li>
|
||||
<li>mesa: Disable GL_NV_primitive_restart extension in core contexts.</li>
|
||||
<li>glsl: Track UBO block names in the symbol table.</li>
|
||||
<li>build: Fix build on systems where /usr/bin/python isn't python 2.</li>
|
||||
<li>i965: Refactor Gen6+ SF attribute override code.</li>
|
||||
<li>i965: Compute the maximum SF source attribute.</li>
|
||||
<li>i965: Fix the SF Vertex URB Read Length calculation for Sandybridge.</li>
|
||||
<li>i965: Fix the SF Vertex URB Read Length calculation for Gen7 platforms.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>r600g: fix int->bool conversion in fence_signalled</li>
|
||||
<li>gallium/u_upload_mgr: fix a serious memory leak</li>
|
||||
<li>r300g: fix blending with blend color and RGBA formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Return 0 for XFB_VARYING_MAX_LENGTH if no varyings</li>
|
||||
<li>mesa: Set transform feedback's default buffer mode to INTERLEAVED_ATTRIBS</li>
|
||||
<li>mesa/uniform_query: Don't write to *params if there is an error</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: GLX cannot work without OpenGL</li>
|
||||
</ul>
|
||||
|
||||
<p>Paul Berry (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Allow glReadBuffer(GL_NONE) for winsys framebuffers.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>softpipe: fix using optimized filter function</li>
|
||||
</ul>
|
||||
|
||||
<p>Stefan Dösinger (3):</p>
|
||||
<ul>
|
||||
<li>meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADER</li>
|
||||
<li>radeon: Initialize swrast before setting limits</li>
|
||||
<li>r200: Initialize swrast before setting limits</li>
|
||||
</ul>
|
||||
|
||||
<p>Zack Rusin (2):</p>
|
||||
<ul>
|
||||
<li>glx: only advertise GLX_INTEL_swap_event if it's supported</li>
|
||||
<li>DRI2: Don't disable GLX_INTEL_swap_event unconditionally</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -26,7 +26,9 @@ because GL_ARB_compatibility is not supported.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
be4cd34c6599a7cb9d254b05c48bdb1f MesaLib-9.0.tar.gz
|
||||
60e557ce407be3732711da484ab3db6c MesaLib-9.0.tar.bz2
|
||||
16b128544cd3f7e237927bb9f8aab7ce MesaLib-9.0.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
@@ -14,6 +14,9 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes-9.0.3.html">9.0.3 release notes</a>
|
||||
<li><a href="relnotes-9.0.2.html">9.0.2 release notes</a>
|
||||
<li><a href="relnotes-9.0.1.html">9.0.1 release notes</a>
|
||||
<li><a href="relnotes-9.0.html">9.0 release notes</a>
|
||||
<li><a href="relnotes-8.0.4.html">8.0.4 release notes</a>
|
||||
<li><a href="relnotes-8.0.3.html">8.0.3 release notes</a>
|
||||
|
@@ -3,9 +3,12 @@ CHIPSET(0x6784, TAHITI_6784, TAHITI)
|
||||
CHIPSET(0x6788, TAHITI_6788, TAHITI)
|
||||
CHIPSET(0x678A, TAHITI_678A, TAHITI)
|
||||
CHIPSET(0x6790, TAHITI_6790, TAHITI)
|
||||
CHIPSET(0x6791, TAHITI_6791, TAHITI)
|
||||
CHIPSET(0x6792, TAHITI_6792, TAHITI)
|
||||
CHIPSET(0x6798, TAHITI_6798, TAHITI)
|
||||
CHIPSET(0x6799, TAHITI_6799, TAHITI)
|
||||
CHIPSET(0x679A, TAHITI_679A, TAHITI)
|
||||
CHIPSET(0x679B, TAHITI_679B, TAHITI)
|
||||
CHIPSET(0x679E, TAHITI_679E, TAHITI)
|
||||
CHIPSET(0x679F, TAHITI_679F, TAHITI)
|
||||
|
||||
@@ -16,6 +19,7 @@ CHIPSET(0x6806, PITCAIRN_6806, PITCAIRN)
|
||||
CHIPSET(0x6808, PITCAIRN_6808, PITCAIRN)
|
||||
CHIPSET(0x6809, PITCAIRN_6809, PITCAIRN)
|
||||
CHIPSET(0x6810, PITCAIRN_6810, PITCAIRN)
|
||||
CHIPSET(0x6811, PITCAIRN_6811, PITCAIRN)
|
||||
CHIPSET(0x6816, PITCAIRN_6816, PITCAIRN)
|
||||
CHIPSET(0x6817, PITCAIRN_6817, PITCAIRN)
|
||||
CHIPSET(0x6818, PITCAIRN_6818, PITCAIRN)
|
||||
|
49
m4/ax_python_module.m4
Normal file
49
m4/ax_python_module.m4
Normal file
@@ -0,0 +1,49 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_python_module.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PYTHON_MODULE(modname[, fatal])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Checks for Python module.
|
||||
#
|
||||
# If fatal is non-empty then absence of a module will trigger an error.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Andrew Collier
|
||||
#
|
||||
# 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 6
|
||||
|
||||
AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])
|
||||
AC_DEFUN([AX_PYTHON_MODULE],[
|
||||
if test -z $PYTHON2;
|
||||
then
|
||||
PYTHON2="python"
|
||||
fi
|
||||
PYTHON_NAME=`basename $PYTHON2`
|
||||
AC_MSG_CHECKING($PYTHON_NAME module: $1)
|
||||
$PYTHON2 -c "import $1" 2>/dev/null
|
||||
if test $? -eq 0;
|
||||
then
|
||||
AC_MSG_RESULT(yes)
|
||||
eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
eval AS_TR_CPP(HAVE_PYMOD_$1)=no
|
||||
#
|
||||
if test -n "$2"
|
||||
then
|
||||
AC_MSG_ERROR(failed to find required module $1)
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
])
|
@@ -639,6 +639,69 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the error code after a call to
|
||||
* dri2_egl_display::dri2::createContextAttribs.
|
||||
*/
|
||||
static void
|
||||
dri2_create_context_attribs_error(int dri_error)
|
||||
{
|
||||
EGLint egl_error;
|
||||
|
||||
switch (dri_error) {
|
||||
case __DRI_CTX_ERROR_SUCCESS:
|
||||
return;
|
||||
|
||||
case __DRI_CTX_ERROR_NO_MEMORY:
|
||||
egl_error = EGL_BAD_ALLOC;
|
||||
break;
|
||||
|
||||
/* From the EGL_KHR_create_context spec, section "Errors":
|
||||
*
|
||||
* * If <config> does not support a client API context compatible
|
||||
* with the requested API major and minor version, [...] context flags,
|
||||
* and context reset notification behavior (for client API types where
|
||||
* these attributes are supported), then an EGL_BAD_MATCH error is
|
||||
* generated.
|
||||
*
|
||||
* * If an OpenGL ES context is requested and the values for
|
||||
* attributes EGL_CONTEXT_MAJOR_VERSION_KHR and
|
||||
* EGL_CONTEXT_MINOR_VERSION_KHR specify an OpenGL ES version that
|
||||
* is not defined, than an EGL_BAD_MATCH error is generated.
|
||||
*
|
||||
* * If an OpenGL context is requested, the requested version is
|
||||
* greater than 3.2, and the value for attribute
|
||||
* EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR has no bits set; has any
|
||||
* bits set other than EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR and
|
||||
* EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR; has more than
|
||||
* one of these bits set; or if the implementation does not support
|
||||
* the requested profile, then an EGL_BAD_MATCH error is generated.
|
||||
*/
|
||||
case __DRI_CTX_ERROR_BAD_API:
|
||||
case __DRI_CTX_ERROR_BAD_VERSION:
|
||||
case __DRI_CTX_ERROR_BAD_FLAG:
|
||||
egl_error = EGL_BAD_MATCH;
|
||||
break;
|
||||
|
||||
/* From the EGL_KHR_create_context spec, section "Errors":
|
||||
*
|
||||
* * If an attribute name or attribute value in <attrib_list> is not
|
||||
* recognized (including unrecognized bits in bitmask attributes),
|
||||
* then an EGL_BAD_ATTRIBUTE error is generated."
|
||||
*/
|
||||
case __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE:
|
||||
case __DRI_CTX_ERROR_UNKNOWN_FLAG:
|
||||
egl_error = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
egl_error = EGL_BAD_MATCH;
|
||||
break;
|
||||
}
|
||||
|
||||
_eglError(egl_error, "dri2_create_context");
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglCreateContext(), drv->API.CreateContext().
|
||||
@@ -769,6 +832,7 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
ctx_attribs,
|
||||
& error,
|
||||
dri2_ctx);
|
||||
dri2_create_context_attribs_error(error);
|
||||
} else {
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->dri2->createNewContextForAPI(dri2_dpy->dri_screen,
|
||||
|
@@ -122,8 +122,10 @@ struct dri2_egl_display
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
struct wl_display *wl_dpy;
|
||||
struct wl_registry *wl_registry;
|
||||
struct wl_drm *wl_server_drm;
|
||||
struct wl_drm *wl_drm;
|
||||
struct wl_event_queue *wl_queue;
|
||||
int authenticated;
|
||||
int formats;
|
||||
#endif
|
||||
@@ -174,7 +176,8 @@ struct dri2_egl_surface
|
||||
__DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
|
||||
__DRIbuffer *third_buffer;
|
||||
__DRIbuffer *pending_buffer;
|
||||
EGLBoolean block_swap_buffers;
|
||||
struct wl_callback *frame_callback;
|
||||
struct wl_callback *pending_buffer_callback;
|
||||
int format;
|
||||
#endif
|
||||
|
||||
|
@@ -45,6 +45,37 @@ enum wl_drm_format_flags {
|
||||
HAS_XRGB8888 = 2
|
||||
};
|
||||
|
||||
static void
|
||||
sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
|
||||
{
|
||||
int *done = data;
|
||||
|
||||
*done = 1;
|
||||
wl_callback_destroy(callback);
|
||||
}
|
||||
|
||||
static const struct wl_callback_listener sync_listener = {
|
||||
sync_callback
|
||||
};
|
||||
|
||||
static int
|
||||
roundtrip(struct dri2_egl_display *dri2_dpy)
|
||||
{
|
||||
struct wl_callback *callback;
|
||||
int done = 0, ret = 0;
|
||||
|
||||
callback = wl_display_sync(dri2_dpy->wl_dpy);
|
||||
wl_callback_add_listener(callback, &sync_listener, &done);
|
||||
wl_proxy_set_queue((struct wl_proxy *) callback, dri2_dpy->wl_queue);
|
||||
while (ret != -1 && !done)
|
||||
ret = wl_display_dispatch_queue(dri2_dpy->wl_dpy, dri2_dpy->wl_queue);
|
||||
|
||||
if (!done)
|
||||
wl_callback_destroy(callback);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
wl_buffer_release(void *data, struct wl_buffer *buffer)
|
||||
{
|
||||
@@ -69,6 +100,16 @@ static struct wl_buffer_listener wl_buffer_listener = {
|
||||
wl_buffer_release
|
||||
};
|
||||
|
||||
static void
|
||||
resize_callback(struct wl_egl_window *wl_win, void *data)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = data;
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
|
||||
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
|
||||
*/
|
||||
@@ -80,7 +121,6 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
|
||||
struct dri2_egl_surface *dri2_surf;
|
||||
struct dri2_egl_buffer *dri2_buf;
|
||||
int i;
|
||||
|
||||
(void) drv;
|
||||
@@ -104,7 +144,8 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
|
||||
dri2_surf->pending_buffer = NULL;
|
||||
dri2_surf->third_buffer = NULL;
|
||||
dri2_surf->block_swap_buffers = EGL_FALSE;
|
||||
dri2_surf->frame_callback = NULL;
|
||||
dri2_surf->pending_buffer_callback = NULL;
|
||||
|
||||
if (conf->AlphaSize == 0)
|
||||
dri2_surf->format = WL_DRM_FORMAT_XRGB8888;
|
||||
@@ -115,20 +156,12 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
case EGL_WINDOW_BIT:
|
||||
dri2_surf->wl_win = (struct wl_egl_window *) window;
|
||||
|
||||
dri2_surf->wl_win->private = dri2_surf;
|
||||
dri2_surf->wl_win->resize_callback = resize_callback;
|
||||
|
||||
dri2_surf->base.Width = -1;
|
||||
dri2_surf->base.Height = -1;
|
||||
break;
|
||||
case EGL_PIXMAP_BIT:
|
||||
dri2_surf->wl_pix = (struct wl_egl_pixmap *) window;
|
||||
|
||||
dri2_surf->base.Width = dri2_surf->wl_pix->width;
|
||||
dri2_surf->base.Height = dri2_surf->wl_pix->height;
|
||||
|
||||
if (dri2_surf->wl_pix->driver_private) {
|
||||
dri2_buf = dri2_surf->wl_pix->driver_private;
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] = dri2_buf->dri_buffer;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto cleanup_surf;
|
||||
}
|
||||
@@ -166,15 +199,6 @@ dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
window, attrib_list);
|
||||
}
|
||||
|
||||
static _EGLSurface *
|
||||
dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, EGLNativePixmapType pixmap,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
return dri2_create_surface(drv, disp, EGL_PIXMAP_BIT, conf,
|
||||
pixmap, attrib_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglDestroySurface(), drv->API.DestroySurface().
|
||||
*/
|
||||
@@ -197,8 +221,7 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
wl_buffer_destroy(dri2_surf->wl_drm_buffer[i]);
|
||||
|
||||
for (i = 0; i < __DRI_BUFFER_COUNT; ++i)
|
||||
if (dri2_surf->dri_buffers[i] && !(i == __DRI_BUFFER_FRONT_LEFT &&
|
||||
dri2_surf->base.Type == EGL_PIXMAP_BIT))
|
||||
if (dri2_surf->dri_buffers[i])
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
dri2_surf->dri_buffers[i]);
|
||||
|
||||
@@ -207,27 +230,23 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||
dri2_surf->third_buffer);
|
||||
}
|
||||
|
||||
if (dri2_surf->frame_callback)
|
||||
wl_callback_destroy(dri2_surf->frame_callback);
|
||||
|
||||
if (dri2_surf->pending_buffer_callback)
|
||||
wl_callback_destroy(dri2_surf->pending_buffer_callback);
|
||||
|
||||
|
||||
if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
|
||||
dri2_surf->wl_win->private = NULL;
|
||||
dri2_surf->wl_win->resize_callback = NULL;
|
||||
}
|
||||
|
||||
free(surf);
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
struct dri2_egl_buffer *dri2_buf = egl_pixmap->driver_private;
|
||||
|
||||
assert(dri2_buf);
|
||||
|
||||
dri2_buf->dri2_dpy->dri2->releaseBuffer(dri2_buf->dri2_dpy->dri_screen,
|
||||
dri2_buf->dri_buffer);
|
||||
|
||||
free(dri2_buf);
|
||||
|
||||
egl_pixmap->driver_private = NULL;
|
||||
egl_pixmap->destroy = NULL;
|
||||
}
|
||||
|
||||
static struct wl_buffer *
|
||||
wayland_create_buffer(struct dri2_egl_surface *dri2_surf,
|
||||
__DRIbuffer *buffer)
|
||||
@@ -267,30 +286,6 @@ dri2_process_back_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_process_front_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy =
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
struct dri2_egl_buffer *dri2_buf;
|
||||
|
||||
switch (dri2_surf->base.Type) {
|
||||
case EGL_PIXMAP_BIT:
|
||||
dri2_buf = malloc(sizeof *dri2_buf);
|
||||
if (!dri2_buf)
|
||||
return;
|
||||
|
||||
dri2_buf->dri_buffer = dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT];
|
||||
dri2_buf->dri2_dpy = dri2_dpy;
|
||||
|
||||
dri2_surf->wl_pix->driver_private = dri2_buf;
|
||||
dri2_surf->wl_pix->destroy = dri2_wl_egl_pixmap_destroy;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_release_pending_buffer(void *data,
|
||||
struct wl_callback *callback, uint32_t time)
|
||||
@@ -308,6 +303,7 @@ dri2_release_pending_buffer(void *data,
|
||||
dri2_surf->pending_buffer = NULL;
|
||||
|
||||
wl_callback_destroy(callback);
|
||||
dri2_surf->pending_buffer_callback = NULL;
|
||||
}
|
||||
|
||||
static const struct wl_callback_listener release_buffer_listener = {
|
||||
@@ -333,11 +329,14 @@ dri2_release_buffers(struct dri2_egl_surface *dri2_surf)
|
||||
switch (i) {
|
||||
case __DRI_BUFFER_FRONT_LEFT:
|
||||
if (dri2_surf->pending_buffer)
|
||||
wl_display_roundtrip(dri2_dpy->wl_dpy);
|
||||
roundtrip(dri2_dpy);
|
||||
dri2_surf->pending_buffer = dri2_surf->dri_buffers[i];
|
||||
callback = wl_display_sync(dri2_dpy->wl_dpy);
|
||||
wl_callback_add_listener(callback,
|
||||
&release_buffer_listener, dri2_surf);
|
||||
wl_proxy_set_queue((struct wl_proxy *) callback,
|
||||
dri2_dpy->wl_queue);
|
||||
dri2_surf->pending_buffer_callback = callback;
|
||||
break;
|
||||
default:
|
||||
dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
|
||||
@@ -430,6 +429,9 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
int i;
|
||||
|
||||
/* 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->base.Type == EGL_WINDOW_BIT &&
|
||||
(dri2_surf->base.Width != dri2_surf->wl_win->width ||
|
||||
dri2_surf->base.Height != dri2_surf->wl_win->height)) {
|
||||
@@ -466,9 +468,7 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
if (!dri2_surf->dri_buffers[attachments[i]])
|
||||
continue;
|
||||
|
||||
if (attachments[i] == __DRI_BUFFER_FRONT_LEFT)
|
||||
dri2_process_front_buffer(dri2_surf, attachments[i+1]);
|
||||
else if (attachments[i] == __DRI_BUFFER_BACK_LEFT)
|
||||
if (attachments[i] == __DRI_BUFFER_BACK_LEFT)
|
||||
dri2_process_back_buffer(dri2_surf, attachments[i+1]);
|
||||
}
|
||||
|
||||
@@ -479,13 +479,7 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
|
||||
dri2_surf->buffer_count++;
|
||||
}
|
||||
|
||||
assert(dri2_surf->base.Type == EGL_PIXMAP_BIT ||
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
|
||||
|
||||
if (dri2_surf->base.Type == EGL_PIXMAP_BIT && !dri2_surf->wl_pix->buffer)
|
||||
dri2_surf->wl_pix->buffer =
|
||||
wayland_create_buffer(dri2_surf,
|
||||
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]);
|
||||
assert(dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
|
||||
|
||||
*out_count = dri2_surf->buffer_count;
|
||||
if (dri2_surf->buffer_count == 0)
|
||||
@@ -552,7 +546,7 @@ wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
|
||||
{
|
||||
struct dri2_egl_surface *dri2_surf = data;
|
||||
|
||||
dri2_surf->block_swap_buffers = EGL_FALSE;
|
||||
dri2_surf->frame_callback = NULL;
|
||||
wl_callback_destroy(callback);
|
||||
}
|
||||
|
||||
@@ -569,17 +563,18 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
|
||||
struct wl_callback *callback;
|
||||
int ret = 0;
|
||||
|
||||
if (dri2_surf->block_swap_buffers) {
|
||||
wl_display_flush(dri2_dpy->wl_dpy);
|
||||
while (dri2_surf->block_swap_buffers)
|
||||
wl_display_iterate(dri2_dpy->wl_dpy, WL_DISPLAY_READABLE);
|
||||
}
|
||||
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->block_swap_buffers = EGL_TRUE;
|
||||
callback = wl_surface_frame(dri2_surf->wl_win->surface);
|
||||
wl_callback_add_listener(callback, &frame_listener, dri2_surf);
|
||||
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);
|
||||
|
||||
if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
|
||||
pointer_swap(
|
||||
@@ -611,6 +606,8 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
|
||||
wl_surface_damage(dri2_surf->wl_win->surface, 0, 0,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
|
||||
wl_surface_commit(dri2_surf->wl_win->surface);
|
||||
}
|
||||
|
||||
_EGLContext *ctx;
|
||||
@@ -626,71 +623,6 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglCreateImageKHR(), drv->API.CreateImageKHR().
|
||||
*/
|
||||
static _EGLImage *
|
||||
dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct wl_egl_pixmap *wl_egl_pixmap = (struct wl_egl_pixmap *) buffer;
|
||||
struct dri2_egl_buffer *dri2_buf;
|
||||
EGLint wl_attr_list[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_DRM_BUFFER_STRIDE_MESA, 0,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
dri2_buf = malloc(sizeof *dri2_buf);
|
||||
if (!dri2_buf)
|
||||
return NULL;
|
||||
|
||||
dri2_buf->dri2_dpy = dri2_dpy;
|
||||
dri2_buf->dri_buffer =
|
||||
dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
|
||||
__DRI_BUFFER_FRONT_LEFT, 32,
|
||||
wl_egl_pixmap->width,
|
||||
wl_egl_pixmap->height);
|
||||
|
||||
wl_egl_pixmap->destroy = dri2_wl_egl_pixmap_destroy;
|
||||
wl_egl_pixmap->driver_private = dri2_buf;
|
||||
|
||||
/* FIXME: Get buffer format from attr_list somehow... or from the
|
||||
wl_egl_piaxmap. */
|
||||
wl_egl_pixmap->buffer =
|
||||
wl_drm_create_buffer(dri2_dpy->wl_drm,
|
||||
dri2_buf->dri_buffer->name,
|
||||
wl_egl_pixmap->width,
|
||||
wl_egl_pixmap->height,
|
||||
dri2_buf->dri_buffer->pitch,
|
||||
WL_DRM_FORMAT_ARGB8888);
|
||||
|
||||
wl_attr_list[1] = wl_egl_pixmap->width;
|
||||
wl_attr_list[3] = wl_egl_pixmap->height;
|
||||
wl_attr_list[5] = dri2_buf->dri_buffer->pitch / 4;
|
||||
|
||||
return dri2_create_image_khr(disp->Driver, disp, ctx, EGL_DRM_BUFFER_MESA,
|
||||
(EGLClientBuffer)(intptr_t) dri2_buf->dri_buffer->name, wl_attr_list);
|
||||
}
|
||||
|
||||
static _EGLImage *
|
||||
dri2_wayland_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx, EGLenum target,
|
||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||
{
|
||||
(void) drv;
|
||||
|
||||
switch (target) {
|
||||
case EGL_NATIVE_PIXMAP_KHR:
|
||||
return dri2_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
|
||||
default:
|
||||
return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||
{
|
||||
@@ -700,7 +632,8 @@ dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||
dri2_dpy->authenticated = 0;
|
||||
|
||||
wl_drm_authenticate(dri2_dpy->wl_drm, id);
|
||||
wl_display_roundtrip(dri2_dpy->wl_dpy);
|
||||
if (roundtrip(dri2_dpy) < 0)
|
||||
ret = -1;
|
||||
|
||||
if (!dri2_dpy->authenticated)
|
||||
ret = -1;
|
||||
@@ -795,22 +728,37 @@ static const struct wl_drm_listener drm_listener = {
|
||||
drm_handle_authenticated
|
||||
};
|
||||
|
||||
static void
|
||||
registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
|
||||
const char *interface, uint32_t version)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = data;
|
||||
|
||||
if (strcmp(interface, "wl_drm") == 0) {
|
||||
dri2_dpy->wl_drm =
|
||||
wl_registry_bind(registry, name, &wl_drm_interface, 1);
|
||||
wl_drm_add_listener(dri2_dpy->wl_drm, &drm_listener, dri2_dpy);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener registry_listener = {
|
||||
registry_handle_global
|
||||
};
|
||||
|
||||
EGLBoolean
|
||||
dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy;
|
||||
const __DRIconfig *config;
|
||||
uint32_t id, types;
|
||||
uint32_t types;
|
||||
int i;
|
||||
static const unsigned int argb_masks[4] =
|
||||
{ 0xff0000, 0xff00, 0xff, 0xff000000 };
|
||||
static const unsigned int rgb_masks[4] = { 0xff0000, 0xff00, 0xff, 0 };
|
||||
|
||||
drv->API.CreateWindowSurface = dri2_create_window_surface;
|
||||
drv->API.CreatePixmapSurface = dri2_create_pixmap_surface;
|
||||
drv->API.DestroySurface = dri2_destroy_surface;
|
||||
drv->API.SwapBuffers = dri2_swap_buffers;
|
||||
drv->API.CreateImageKHR = dri2_wayland_create_image_khr;
|
||||
drv->API.Terminate = dri2_terminate;
|
||||
|
||||
dri2_dpy = malloc(sizeof *dri2_dpy);
|
||||
@@ -829,22 +777,19 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
dri2_dpy->wl_dpy = disp->PlatformDisplay;
|
||||
}
|
||||
|
||||
id = wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
|
||||
if (id == 0)
|
||||
wl_display_roundtrip(dri2_dpy->wl_dpy);
|
||||
id = wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
|
||||
if (id == 0)
|
||||
dri2_dpy->wl_queue = wl_display_create_queue(dri2_dpy->wl_dpy);
|
||||
dri2_dpy->wl_registry = wl_display_get_registry(dri2_dpy->wl_dpy);
|
||||
wl_proxy_set_queue((struct wl_proxy *) dri2_dpy->wl_registry,
|
||||
dri2_dpy->wl_queue);
|
||||
wl_registry_add_listener(dri2_dpy->wl_registry,
|
||||
®istry_listener, dri2_dpy);
|
||||
if (roundtrip(dri2_dpy) < 0 || dri2_dpy->wl_drm == NULL)
|
||||
goto cleanup_dpy;
|
||||
dri2_dpy->wl_drm = wl_display_bind(dri2_dpy->wl_dpy, id, &wl_drm_interface);
|
||||
if (!dri2_dpy->wl_drm)
|
||||
goto cleanup_dpy;
|
||||
wl_drm_add_listener(dri2_dpy->wl_drm, &drm_listener, dri2_dpy);
|
||||
wl_display_roundtrip(dri2_dpy->wl_dpy);
|
||||
if (dri2_dpy->fd == -1)
|
||||
|
||||
if (roundtrip(dri2_dpy) < 0 || dri2_dpy->fd == -1)
|
||||
goto cleanup_drm;
|
||||
|
||||
wl_display_roundtrip(dri2_dpy->wl_dpy);
|
||||
if (!dri2_dpy->authenticated)
|
||||
if (roundtrip(dri2_dpy) < 0 || !dri2_dpy->authenticated)
|
||||
goto cleanup_fd;
|
||||
|
||||
dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
|
||||
@@ -871,7 +816,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
if (!dri2_create_screen(disp))
|
||||
goto cleanup_driver;
|
||||
|
||||
types = EGL_WINDOW_BIT | EGL_PIXMAP_BIT;
|
||||
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)
|
||||
@@ -880,8 +825,6 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
dri2_add_config(disp, config, i + 1, 0, types, NULL, argb_masks);
|
||||
}
|
||||
|
||||
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
|
||||
|
||||
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
|
||||
dri2_dpy->authenticate = dri2_wayland_authenticate;
|
||||
|
||||
|
@@ -797,7 +797,7 @@ static EGLBoolean
|
||||
dri2_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
|
||||
EGLint x, EGLint y, EGLint width, EGLint height)
|
||||
{
|
||||
const EGLint rect[4] = { x, draw->Height - y - height, width, height };
|
||||
const EGLint rect[4] = { x, y, width, height };
|
||||
|
||||
if (x < 0 || y < 0 || width < 0 || height < 0)
|
||||
_eglError(EGL_BAD_PARAMETER, "eglPostSubBufferNV");
|
||||
|
@@ -229,17 +229,14 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
|
||||
*
|
||||
* "* If an OpenGL context is requested, the requested version
|
||||
* is greater than 3.2, and the value for attribute
|
||||
* EGL_CONTEXT_PROFILE_MASK_KHR has no bits set; has any
|
||||
* bits set other than EGL_CONTEXT_CORE_PROFILE_BIT_KHR and
|
||||
* EGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_KHR; has more than
|
||||
* one of these bits set; or if the implementation does not
|
||||
* support the requested profile, then an
|
||||
* EGL_BAD_PROFILE_KHR error is generated."
|
||||
*
|
||||
* However, it does not define EGL_BAD_PROFILE_KHR. For now use
|
||||
* EGL_BAD_ATTRIBUTE.
|
||||
* EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR has no bits set; has
|
||||
* any bits set other than EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR
|
||||
* and EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR; has
|
||||
* more than one of these bits set; or if the implementation does
|
||||
* not support the requested profile, then an EGL_BAD_MATCH error
|
||||
* is generated."
|
||||
*/
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
err = EGL_BAD_MATCH;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -36,17 +36,6 @@
|
||||
#include "wayland-drm.h"
|
||||
#include "wayland-drm-server-protocol.h"
|
||||
|
||||
/* Git master of Wayland is moving towards a stable version of the
|
||||
* protocol, but breaking from 0.85 in the process. For the time
|
||||
* being, it's convenient to be able to build Mesa against both master
|
||||
* and 0.85.x of Wayland. To make this work we'll do a compile-time
|
||||
* version check and work around the difference in API and protocol */
|
||||
#if defined (WAYLAND_VERSION_MAJOR) && \
|
||||
WAYLAND_VERSION_MAJOR == 0 && \
|
||||
WAYLAND_VERSION_MINOR == 85
|
||||
#define HAS_WAYLAND_0_85
|
||||
#endif
|
||||
|
||||
struct wl_drm {
|
||||
struct wl_display *display;
|
||||
|
||||
@@ -69,25 +58,10 @@ destroy_buffer(struct wl_resource *resource)
|
||||
static void
|
||||
buffer_destroy(struct wl_client *client, struct wl_resource *resource)
|
||||
{
|
||||
#ifdef HAS_WAYLAND_0_85
|
||||
wl_resource_destroy(resource, 0);
|
||||
#else
|
||||
wl_resource_destroy(resource);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAS_WAYLAND_0_85
|
||||
static void
|
||||
buffer_damage(struct wl_client *client, struct wl_resource *buffer,
|
||||
int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
const static struct wl_buffer_interface drm_buffer_interface = {
|
||||
#ifdef HAS_WAYLAND_0_85
|
||||
buffer_damage,
|
||||
#endif
|
||||
buffer_destroy
|
||||
};
|
||||
|
||||
|
@@ -24,17 +24,9 @@ struct wl_egl_window {
|
||||
|
||||
int attached_width;
|
||||
int attached_height;
|
||||
};
|
||||
|
||||
struct wl_egl_pixmap {
|
||||
struct wl_buffer *buffer;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
||||
void (*destroy) (struct wl_egl_pixmap *egl_pixmap);
|
||||
|
||||
void *driver_private;
|
||||
void *private;
|
||||
void (*resize_callback)(struct wl_egl_window *, void *);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -13,6 +13,9 @@ wl_egl_window_resize(struct wl_egl_window *egl_window,
|
||||
egl_window->height = height;
|
||||
egl_window->dx = dx;
|
||||
egl_window->dy = dy;
|
||||
|
||||
if (egl_window->resize_callback)
|
||||
egl_window->resize_callback(egl_window, egl_window->private);
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_egl_window *
|
||||
@@ -26,6 +29,8 @@ wl_egl_window_create(struct wl_surface *surface,
|
||||
return NULL;
|
||||
|
||||
egl_window->surface = surface;
|
||||
egl_window->private = NULL;
|
||||
egl_window->resize_callback = NULL;
|
||||
wl_egl_window_resize(egl_window, width, height, 0, 0);
|
||||
egl_window->attached_width = 0;
|
||||
egl_window->attached_height = 0;
|
||||
@@ -48,36 +53,3 @@ wl_egl_window_get_attached_size(struct wl_egl_window *egl_window,
|
||||
if (height)
|
||||
*height = egl_window->attached_height;
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_egl_pixmap *
|
||||
wl_egl_pixmap_create(int width, int height, uint32_t flags)
|
||||
{
|
||||
struct wl_egl_pixmap *egl_pixmap;
|
||||
|
||||
egl_pixmap = malloc(sizeof *egl_pixmap);
|
||||
if (egl_pixmap == NULL)
|
||||
return NULL;
|
||||
|
||||
egl_pixmap->width = width;
|
||||
egl_pixmap->height = height;
|
||||
|
||||
egl_pixmap->destroy = NULL;
|
||||
egl_pixmap->buffer = NULL;
|
||||
egl_pixmap->driver_private = NULL;
|
||||
|
||||
return egl_pixmap;
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT void
|
||||
wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
if (egl_pixmap->destroy)
|
||||
egl_pixmap->destroy(egl_pixmap);
|
||||
free(egl_pixmap);
|
||||
}
|
||||
|
||||
WL_EGL_EXPORT struct wl_buffer *
|
||||
wl_egl_pixmap_create_buffer(struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
return egl_pixmap->buffer;
|
||||
}
|
||||
|
@@ -13,6 +13,11 @@ C_SOURCES += \
|
||||
$(GALLIVM_SOURCES)
|
||||
CPP_SOURCES += \
|
||||
$(GALLIVM_CPP_SOURCES)
|
||||
|
||||
# LLVM >= 3.2 requires -fno-rtti
|
||||
ifeq ($(shell expr `echo $(LLVM_VERSION) | sed -e 's/\([0-9]\)\.\([0-9]\)/\10\2/g'` \>= 302),1)
|
||||
CXXFLAGS += -fno-rtti
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
@@ -195,6 +195,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
|
||||
if (rast->line_smooth && draw->pipeline.aaline) {
|
||||
draw->pipeline.aaline->next = next;
|
||||
next = draw->pipeline.aaline;
|
||||
precalc_flat = TRUE;
|
||||
}
|
||||
|
||||
if (rast->point_smooth && draw->pipeline.aapoint) {
|
||||
|
@@ -189,7 +189,7 @@ draw_pt_fetch_run_linear(struct pt_fetch *fetch,
|
||||
((char *)draw->pt.user.vbuffer[i] +
|
||||
draw->pt.vertex_buffer[i].buffer_offset),
|
||||
draw->pt.vertex_buffer[i].stride,
|
||||
draw->pt.user.max_index + draw->pt.user.eltBias);
|
||||
draw->pt.max_index);
|
||||
}
|
||||
|
||||
translate->run( translate,
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
|
||||
/**
|
||||
@@ -87,7 +88,7 @@ struct vertex_info
|
||||
unsigned interp_mode:4; /**< INTERP_x */
|
||||
unsigned emit:4; /**< EMIT_x */
|
||||
unsigned src_index:8; /**< map to post-xform attribs */
|
||||
} attrib[PIPE_MAX_SHADER_INPUTS];
|
||||
} attrib[PIPE_MAX_SHADER_OUTPUTS];
|
||||
};
|
||||
|
||||
static INLINE size_t
|
||||
@@ -127,7 +128,7 @@ draw_emit_vertex_attr(struct vertex_info *vinfo,
|
||||
uint src_index)
|
||||
{
|
||||
const uint n = vinfo->num_attribs;
|
||||
assert(n < PIPE_MAX_SHADER_INPUTS);
|
||||
assert(n < Elements(vinfo->attrib));
|
||||
vinfo->attrib[n].emit = emit;
|
||||
vinfo->attrib[n].interp_mode = interp;
|
||||
vinfo->attrib[n].src_index = src_index;
|
||||
|
@@ -47,7 +47,7 @@ struct analysis_context
|
||||
struct lp_tgsi_info *info;
|
||||
|
||||
unsigned num_imms;
|
||||
float imm[32][4];
|
||||
float imm[128][4];
|
||||
|
||||
struct lp_tgsi_channel_info temp[32][4];
|
||||
};
|
||||
|
@@ -73,7 +73,7 @@ struct ureg_tokens {
|
||||
|
||||
#define UREG_MAX_INPUT PIPE_MAX_ATTRIBS
|
||||
#define UREG_MAX_SYSTEM_VALUE PIPE_MAX_ATTRIBS
|
||||
#define UREG_MAX_OUTPUT PIPE_MAX_ATTRIBS
|
||||
#define UREG_MAX_OUTPUT PIPE_MAX_SHADER_OUTPUTS
|
||||
#define UREG_MAX_CONSTANT_RANGE 32
|
||||
#define UREG_MAX_IMMEDIATE 256
|
||||
#define UREG_MAX_ADDR 2
|
||||
|
@@ -82,6 +82,7 @@ static INLINE void list_del(struct list_head *item)
|
||||
{
|
||||
item->prev->next = item->next;
|
||||
item->next->prev = item->prev;
|
||||
item->prev = item->next = NULL;
|
||||
}
|
||||
|
||||
static INLINE void list_delinit(struct list_head *item)
|
||||
|
@@ -114,6 +114,22 @@ pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf)
|
||||
*ptr = surf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to pipe_surface_reference() but always set the pointer to NULL
|
||||
* and pass in an explicit context. The explicit context avoids the problem
|
||||
* of using a deleted context's surface_destroy() method when freeing a surface
|
||||
* that's shared by multiple contexts.
|
||||
*/
|
||||
static INLINE void
|
||||
pipe_surface_release(struct pipe_context *pipe, struct pipe_surface **ptr)
|
||||
{
|
||||
if (pipe_reference_described(&(*ptr)->reference, NULL,
|
||||
(debug_reference_descriptor)debug_describe_surface))
|
||||
pipe->surface_destroy(pipe, *ptr);
|
||||
*ptr = NULL;
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
pipe_resource_reference(struct pipe_resource **ptr, struct pipe_resource *tex)
|
||||
{
|
||||
|
@@ -701,6 +701,28 @@ pipe_get_tile_z(struct pipe_context *pipe,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
{
|
||||
const float *ptrc = (const float *)(map + y * pt->stride + x*8);
|
||||
for (i = 0; i < h; i++) {
|
||||
for (j = 0; j < w; j++) {
|
||||
/* convert float Z to 32-bit Z */
|
||||
if (ptrc[j] <= 0.0) {
|
||||
pDest[j*2] = 0;
|
||||
}
|
||||
else if (ptrc[j] >= 1.0) {
|
||||
pDest[j*2] = 0xffffffff;
|
||||
}
|
||||
else {
|
||||
double z = ptrc[j] * 0xffffffff;
|
||||
pDest[j*2] = (uint) z;
|
||||
}
|
||||
}
|
||||
pDest += dstStride;
|
||||
ptrc += pt->stride/4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
@@ -810,7 +832,7 @@ pipe_put_tile_z(struct pipe_context *pipe,
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT:
|
||||
{
|
||||
float *pDest = (float *) (map + y * pt->stride + x*2);
|
||||
float *pDest = (float *) (map + y * pt->stride + x*4);
|
||||
for (i = 0; i < h; i++) {
|
||||
for (j = 0; j < w; j++) {
|
||||
/* convert 32-bit integer Z to float Z */
|
||||
@@ -822,6 +844,20 @@ pipe_put_tile_z(struct pipe_context *pipe,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
{
|
||||
float *pDest = (float *) (map + y * pt->stride + x*8);
|
||||
for (i = 0; i < h; i++) {
|
||||
for (j = 0; j < w; j++) {
|
||||
/* convert 32-bit integer Z to float Z */
|
||||
const double scale = 1.0 / 0xffffffffU;
|
||||
pDest[j*2] = ptrc[j] * scale;
|
||||
}
|
||||
pDest += pt->stride/4;
|
||||
ptrc += srcStride;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
@@ -164,6 +164,13 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
||||
unsigned alloc_offset = align(min_out_offset, upload->alignment);
|
||||
unsigned offset;
|
||||
|
||||
/* Init these return values here in case we fail below to make
|
||||
* sure the caller doesn't get garbage values.
|
||||
*/
|
||||
*out_offset = ~0;
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
|
||||
/* Make sure we have enough space in the upload buffer
|
||||
* for the sub-allocation. */
|
||||
if (MAX2(upload->offset, alloc_offset) + alloc_size > upload->size) {
|
||||
@@ -183,8 +190,7 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
||||
PIPE_TRANSFER_UNSYNCHRONIZED,
|
||||
&upload->transfer);
|
||||
if (!upload->map) {
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
upload->transfer = NULL;
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
@@ -256,7 +256,7 @@ void u_vbuf_destroy(struct u_vbuf *mgr)
|
||||
FREE(mgr);
|
||||
}
|
||||
|
||||
static void
|
||||
static enum pipe_error
|
||||
u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
unsigned vb_mask, unsigned out_vb,
|
||||
int start_vertex, unsigned num_vertices,
|
||||
@@ -267,7 +267,8 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0};
|
||||
struct pipe_resource *out_buffer = NULL;
|
||||
uint8_t *out_map;
|
||||
unsigned i, out_offset;
|
||||
unsigned out_offset, i;
|
||||
enum pipe_error err;
|
||||
|
||||
/* Get a translate object. */
|
||||
tr = translate_cache_find(mgr->translate_cache, key);
|
||||
@@ -311,6 +312,14 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
|
||||
assert((ib->buffer || ib->user_buffer) && ib->index_size);
|
||||
|
||||
/* Create and map the output buffer. */
|
||||
err = u_upload_alloc(mgr->uploader, 0,
|
||||
key->output_stride * num_indices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
if (ib->user_buffer) {
|
||||
map = (uint8_t*)ib->user_buffer + offset;
|
||||
} else {
|
||||
@@ -319,12 +328,6 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
PIPE_TRANSFER_READ, &transfer);
|
||||
}
|
||||
|
||||
/* Create and map the output buffer. */
|
||||
u_upload_alloc(mgr->uploader, 0,
|
||||
key->output_stride * num_indices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
|
||||
switch (ib->index_size) {
|
||||
case 4:
|
||||
tr->run_elts(tr, (unsigned*)map, num_indices, 0, out_map);
|
||||
@@ -342,11 +345,13 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
}
|
||||
} else {
|
||||
/* Create and map the output buffer. */
|
||||
u_upload_alloc(mgr->uploader,
|
||||
key->output_stride * start_vertex,
|
||||
key->output_stride * num_vertices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
err = u_upload_alloc(mgr->uploader,
|
||||
key->output_stride * start_vertex,
|
||||
key->output_stride * num_vertices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
out_offset -= key->output_stride * start_vertex;
|
||||
|
||||
@@ -368,6 +373,8 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
pipe_resource_reference(
|
||||
&mgr->real_vertex_buffer[out_vb].buffer, NULL);
|
||||
mgr->real_vertex_buffer[out_vb].buffer = out_buffer;
|
||||
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
static boolean
|
||||
@@ -512,11 +519,14 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
|
||||
/* Translate buffers. */
|
||||
for (type = 0; type < VB_NUM; type++) {
|
||||
if (key[type].nr_elements) {
|
||||
u_vbuf_translate_buffers(mgr, &key[type], mask[type],
|
||||
mgr->fallback_vbs[type],
|
||||
start[type], num[type],
|
||||
start_index, num_indices, min_index,
|
||||
unroll_indices && type == VB_VERTEX);
|
||||
enum pipe_error err;
|
||||
err = u_vbuf_translate_buffers(mgr, &key[type], mask[type],
|
||||
mgr->fallback_vbs[type],
|
||||
start[type], num[type],
|
||||
start_index, num_indices, min_index,
|
||||
unroll_indices && type == VB_VERTEX);
|
||||
if (err != PIPE_OK)
|
||||
return FALSE;
|
||||
|
||||
/* Fixup the stride for constant attribs. */
|
||||
if (type == VB_CONST) {
|
||||
@@ -775,7 +785,7 @@ void u_vbuf_set_index_buffer(struct u_vbuf *mgr,
|
||||
pipe->set_index_buffer(pipe, ib);
|
||||
}
|
||||
|
||||
static void
|
||||
static enum pipe_error
|
||||
u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
int start_vertex, unsigned num_vertices,
|
||||
int start_instance, unsigned num_instances)
|
||||
@@ -840,6 +850,7 @@ u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
unsigned start, end = end_offset[i];
|
||||
struct pipe_vertex_buffer *real_vb;
|
||||
const uint8_t *ptr;
|
||||
enum pipe_error err;
|
||||
|
||||
if (!end) {
|
||||
continue;
|
||||
@@ -851,11 +862,15 @@ u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
real_vb = &mgr->real_vertex_buffer[i];
|
||||
ptr = mgr->vertex_buffer[i].user_buffer;
|
||||
|
||||
u_upload_data(mgr->uploader, start, end - start, ptr + start,
|
||||
&real_vb->buffer_offset, &real_vb->buffer);
|
||||
err = u_upload_data(mgr->uploader, start, end - start, ptr + start,
|
||||
&real_vb->buffer_offset, &real_vb->buffer);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
real_vb->buffer_offset -= start;
|
||||
}
|
||||
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
static boolean u_vbuf_need_minmax_index(struct u_vbuf *mgr)
|
||||
@@ -1048,11 +1063,13 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info)
|
||||
if (unroll_indices ||
|
||||
mgr->incompatible_vb_mask ||
|
||||
mgr->ve->incompatible_elem_mask) {
|
||||
/* XXX check the return value */
|
||||
u_vbuf_translate_begin(mgr, start_vertex, num_vertices,
|
||||
info->start_instance, info->instance_count,
|
||||
info->start, info->count, min_index,
|
||||
unroll_indices);
|
||||
if (!u_vbuf_translate_begin(mgr, start_vertex, num_vertices,
|
||||
info->start_instance, info->instance_count,
|
||||
info->start, info->count, min_index,
|
||||
unroll_indices)) {
|
||||
debug_warn_once("u_vbuf_translate_begin() failed");
|
||||
return;
|
||||
}
|
||||
|
||||
user_vb_mask &= ~(mgr->incompatible_vb_mask |
|
||||
mgr->ve->incompatible_vb_mask_all);
|
||||
@@ -1060,8 +1077,12 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info)
|
||||
|
||||
/* Upload user buffers. */
|
||||
if (user_vb_mask) {
|
||||
u_vbuf_upload_buffers(mgr, start_vertex, num_vertices,
|
||||
info->start_instance, info->instance_count);
|
||||
if (u_vbuf_upload_buffers(mgr, start_vertex, num_vertices,
|
||||
info->start_instance,
|
||||
info->instance_count) != PIPE_OK) {
|
||||
debug_warn_once("u_vbuf_upload_buffers() failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -7,6 +7,8 @@ AM_CPPFLAGS = \
|
||||
$(DEFINES) \
|
||||
$(PIC_FLAGS)
|
||||
|
||||
AM_CFLAGS = $(VISIBILITY_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES =
|
||||
|
||||
SUBDIRS =
|
||||
|
@@ -273,11 +273,17 @@ lp_build_stencil_op(struct lp_build_context *bld,
|
||||
res = lp_build_select(bld, front_facing, res, back_res);
|
||||
}
|
||||
|
||||
/* XXX what about the back-face writemask? */
|
||||
if (stencil[0].writemask != 0xff) {
|
||||
if (stencil[0].writemask != 0xff ||
|
||||
(stencil[1].enabled && front_facing != NULL && stencil[1].writemask != 0xff)) {
|
||||
/* mask &= stencil[0].writemask */
|
||||
LLVMValueRef writemask = lp_build_const_int_vec(bld->gallivm, bld->type,
|
||||
stencil[0].writemask);
|
||||
if (stencil[1].enabled && stencil[1].writemask != stencil[0].writemask && front_facing != NULL) {
|
||||
LLVMValueRef back_writemask = lp_build_const_int_vec(bld->gallivm, bld->type,
|
||||
stencil[1].writemask);
|
||||
writemask = lp_build_select(bld, front_facing, writemask, back_writemask);
|
||||
}
|
||||
|
||||
mask = LLVMBuildAnd(builder, mask, writemask, "");
|
||||
/* res = (res & mask) | (stencilVals & ~mask) */
|
||||
res = lp_build_select_bitwise(bld, mask, res, stencilVals);
|
||||
|
@@ -56,8 +56,7 @@ nv30_miptree_get_handle(struct pipe_screen *pscreen,
|
||||
if (!mt || !mt->base.bo)
|
||||
return FALSE;
|
||||
|
||||
stride = util_format_get_stride(mt->base.base.format,
|
||||
mt->base.base.width0);
|
||||
stride = mt->level[0].pitch;
|
||||
|
||||
return nouveau_screen_bo_get_handle(pscreen, mt->base.bo, stride, handle);
|
||||
}
|
||||
|
@@ -241,6 +241,8 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||
unsigned sample_count,
|
||||
unsigned bindings)
|
||||
{
|
||||
if (sample_count > 4)
|
||||
return FALSE;
|
||||
if (!(0x00000017 & (1 << sample_count)))
|
||||
return FALSE;
|
||||
|
||||
|
@@ -715,7 +715,9 @@ Instruction::clone(ClonePolicy<Function>& pol, Instruction *i) const
|
||||
{
|
||||
if (!i)
|
||||
i = new_Instruction(pol.context(), op, dType);
|
||||
#ifndef NDEBUG // non-conformant assert, so this is required
|
||||
assert(typeid(*i) == typeid(*this));
|
||||
#endif
|
||||
|
||||
pol.set<Instruction>(this, i);
|
||||
|
||||
|
@@ -1284,6 +1284,9 @@ CodeEmitterNV50::emitLogicOp(const Instruction *i)
|
||||
assert(i->op == OP_AND);
|
||||
break;
|
||||
}
|
||||
if (i->src(0).mod & Modifier(NV50_IR_MOD_NOT))
|
||||
code[0] |= 1 << 22;
|
||||
|
||||
emitForm_IMM(i);
|
||||
} else {
|
||||
switch (i->op) {
|
||||
|
@@ -257,7 +257,7 @@ unsigned int Instruction::srcMask(unsigned int s) const
|
||||
mask &= 0x9;
|
||||
break;
|
||||
case TGSI_TEXTURE_SHADOW1D:
|
||||
mask &= 0x5;
|
||||
mask &= 0xd;
|
||||
break;
|
||||
case TGSI_TEXTURE_1D_ARRAY:
|
||||
case TGSI_TEXTURE_2D:
|
||||
|
@@ -323,6 +323,12 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
|
||||
ldSize = typeSizeof(ld->dType);
|
||||
}
|
||||
|
||||
if (sf == FILE_IMMEDIATE)
|
||||
return true;
|
||||
|
||||
|
||||
// Check if memory access is encodable:
|
||||
|
||||
if (ldSize < 4 && sf == FILE_SHADER_INPUT) // no < 4-byte aligned a[] access
|
||||
return false;
|
||||
if (ld->getSrc(0)->reg.data.offset > (int32_t)(127 * ldSize))
|
||||
|
@@ -133,8 +133,7 @@ nv50_miptree_get_handle(struct pipe_screen *pscreen,
|
||||
if (!mt || !mt->base.bo)
|
||||
return FALSE;
|
||||
|
||||
stride = util_format_get_stride(mt->base.base.format,
|
||||
mt->base.base.width0);
|
||||
stride = mt->level[0].pitch;
|
||||
|
||||
return nouveau_screen_bo_get_handle(pscreen,
|
||||
mt->base.bo,
|
||||
|
@@ -50,6 +50,8 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||
unsigned sample_count,
|
||||
unsigned bindings)
|
||||
{
|
||||
if (sample_count > 8)
|
||||
return FALSE;
|
||||
if (!(0x117 & (1 << sample_count))) /* 0, 1, 2, 4 or 8 */
|
||||
return FALSE;
|
||||
if (sample_count == 8 && util_format_get_blocksizebits(format) >= 128)
|
||||
@@ -454,6 +456,18 @@ nv50_screen_init_hwctx(struct nv50_screen *screen)
|
||||
PUSH_DATA (push, (NV50_CB_AUX << 12) | 0xf21);
|
||||
PUSH_DATA (push, (NV50_CB_AUX << 12) | 0xf31);
|
||||
|
||||
/* return { 0.0, 0.0, 0.0, 0.0 } on out-of-bounds vtxbuf access */
|
||||
BEGIN_NV04(push, NV50_3D(CB_ADDR), 1);
|
||||
PUSH_DATA (push, ((1 << 9) << 6) | NV50_CB_AUX);
|
||||
BEGIN_NI04(push, NV50_3D(CB_DATA(0)), 4);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
BEGIN_NV04(push, NV50_3D(VERTEX_RUNOUT_ADDRESS_HIGH), 2);
|
||||
PUSH_DATAh(push, screen->uniforms->offset + (3 << 16) + (1 << 9));
|
||||
PUSH_DATA (push, screen->uniforms->offset + (3 << 16) + (1 << 9));
|
||||
|
||||
/* max TIC (bits 4:8) & TSC bindings, per program type */
|
||||
for (i = 0; i < 3; ++i) {
|
||||
BEGIN_NV04(push, NV50_3D(TEX_LIMITS(i)), 1);
|
||||
|
@@ -183,6 +183,7 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
|
||||
BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->text);
|
||||
BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->uniform_bo);
|
||||
BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->txc);
|
||||
BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->poly_cache);
|
||||
|
||||
flags = NOUVEAU_BO_GART | NOUVEAU_BO_WR;
|
||||
|
||||
|
@@ -39,6 +39,8 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||
unsigned sample_count,
|
||||
unsigned bindings)
|
||||
{
|
||||
if (sample_count > 8)
|
||||
return FALSE;
|
||||
if (!(0x117 & (1 << sample_count))) /* 0, 1, 2, 4 or 8 */
|
||||
return FALSE;
|
||||
|
||||
@@ -428,6 +430,7 @@ nvc0_screen_create(struct nouveau_device *dev)
|
||||
chan = screen->base.channel;
|
||||
push = screen->base.pushbuf;
|
||||
push->user_priv = screen;
|
||||
push->rsvd_kick = 5;
|
||||
|
||||
screen->base.vidmem_bindings |= PIPE_BIND_CONSTANT_BUFFER |
|
||||
PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER;
|
||||
@@ -589,7 +592,7 @@ nvc0_screen_create(struct nouveau_device *dev)
|
||||
|
||||
for (i = 0; i < 5; ++i) {
|
||||
/* TIC and TSC entries for each unit (nve4+ only) */
|
||||
/* auxiliary constants (6 user clip planes, base instance id */
|
||||
/* auxiliary constants (6 user clip planes, base instance id) */
|
||||
BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 3);
|
||||
PUSH_DATA (push, 512);
|
||||
PUSH_DATAh(push, screen->uniform_bo->offset + (5 << 16) + (i << 9));
|
||||
@@ -610,6 +613,21 @@ nvc0_screen_create(struct nouveau_device *dev)
|
||||
BEGIN_NVC0(push, NVC0_3D(LINKED_TSC), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
|
||||
/* return { 0.0, 0.0, 0.0, 0.0 } for out-of-bounds vtxbuf access */
|
||||
BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 3);
|
||||
PUSH_DATA (push, 256);
|
||||
PUSH_DATAh(push, screen->uniform_bo->offset + (5 << 16) + (6 << 9));
|
||||
PUSH_DATA (push, screen->uniform_bo->offset + (5 << 16) + (6 << 9));
|
||||
BEGIN_1IC0(push, NVC0_3D(CB_POS), 5);
|
||||
PUSH_DATA (push, 0);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
BEGIN_NVC0(push, NVC0_3D(VERTEX_RUNOUT_ADDRESS_HIGH), 2);
|
||||
PUSH_DATAh(push, screen->uniform_bo->offset + (5 << 16) + (6 << 9));
|
||||
PUSH_DATA (push, screen->uniform_bo->offset + (5 << 16) + (6 << 9));
|
||||
|
||||
/* max MPs * max warps per MP (TODO: ask kernel) */
|
||||
if (screen->eng3d->oclass >= NVE4_3D_CLASS)
|
||||
screen->tls_size = 8 * 64;
|
||||
@@ -734,10 +752,6 @@ nvc0_screen_create(struct nouveau_device *dev)
|
||||
|
||||
IMMED_NVC0(push, NVC0_3D(EDGEFLAG), 1);
|
||||
|
||||
BEGIN_NVC0(push, NVC0_3D(VERTEX_RUNOUT_ADDRESS_HIGH), 2);
|
||||
PUSH_DATA (push, 0xab);
|
||||
PUSH_DATA (push, 0x00000000);
|
||||
|
||||
PUSH_KICK (push);
|
||||
|
||||
screen->tic.entries = CALLOC(4096, sizeof(void *));
|
||||
|
@@ -439,6 +439,9 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
|
||||
|
||||
nvc0_vertex_configure_translate(nvc0, info->index_bias);
|
||||
|
||||
if (unlikely(ctx.edgeflag.enabled))
|
||||
nvc0_push_map_edgeflag(&ctx, nvc0, info->index_bias);
|
||||
|
||||
ctx.prim_restart = info->primitive_restart;
|
||||
ctx.restart_index = info->restart_index;
|
||||
|
||||
|
@@ -13,6 +13,7 @@ AM_CFLAGS = \
|
||||
-I$(top_srcdir)/src/mesa \
|
||||
-I$(top_srcdir)/src/glsl \
|
||||
-I$(top_srcdir)/src/mapi \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
$(LLVM_CFLAGS) \
|
||||
$(RADEON_CFLAGS) \
|
||||
$(DEFINES) \
|
||||
|
@@ -287,7 +287,11 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
|
||||
dstRGB == PIPE_BLENDFACTOR_ZERO) &&
|
||||
(dstA == PIPE_BLENDFACTOR_SRC_COLOR ||
|
||||
dstA == PIPE_BLENDFACTOR_SRC_ALPHA ||
|
||||
dstA == PIPE_BLENDFACTOR_ZERO)) {
|
||||
dstA == PIPE_BLENDFACTOR_ZERO) &&
|
||||
(srcRGB != PIPE_BLENDFACTOR_DST_COLOR &&
|
||||
srcRGB != PIPE_BLENDFACTOR_DST_ALPHA &&
|
||||
srcRGB != PIPE_BLENDFACTOR_INV_DST_COLOR &&
|
||||
srcRGB != PIPE_BLENDFACTOR_INV_DST_ALPHA)) {
|
||||
blend_control |= R500_SRC_ALPHA_0_NO_READ;
|
||||
}
|
||||
|
||||
@@ -296,7 +300,11 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
|
||||
dstRGB == PIPE_BLENDFACTOR_ZERO) &&
|
||||
(dstA == PIPE_BLENDFACTOR_INV_SRC_COLOR ||
|
||||
dstA == PIPE_BLENDFACTOR_INV_SRC_ALPHA ||
|
||||
dstA == PIPE_BLENDFACTOR_ZERO)) {
|
||||
dstA == PIPE_BLENDFACTOR_ZERO) &&
|
||||
(srcRGB != PIPE_BLENDFACTOR_DST_COLOR &&
|
||||
srcRGB != PIPE_BLENDFACTOR_DST_ALPHA &&
|
||||
srcRGB != PIPE_BLENDFACTOR_INV_DST_COLOR &&
|
||||
srcRGB != PIPE_BLENDFACTOR_INV_DST_ALPHA)) {
|
||||
blend_control |= R500_SRC_ALPHA_1_NO_READ;
|
||||
}
|
||||
}
|
||||
@@ -459,6 +467,7 @@ static void r300_set_blend_color(struct pipe_context* pipe,
|
||||
(struct r300_blend_color_state*)r300->blend_color_state.state;
|
||||
struct pipe_blend_color c;
|
||||
enum pipe_format format = fb->nr_cbufs ? fb->cbufs[0]->format : 0;
|
||||
float tmp;
|
||||
CB_LOCALS;
|
||||
|
||||
state->state = *color; /* Save it, so that we can reuse it in set_fb_state */
|
||||
@@ -485,6 +494,13 @@ static void r300_set_blend_color(struct pipe_context* pipe,
|
||||
c.color[2] = c.color[3];
|
||||
break;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
||||
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
||||
tmp = c.color[0];
|
||||
c.color[0] = c.color[2];
|
||||
c.color[2] = tmp;
|
||||
break;
|
||||
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -895,6 +911,9 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
/* Need to reset clamping or colormask. */
|
||||
r300_mark_atom_dirty(r300, &r300->blend_state);
|
||||
|
||||
/* Re-swizzle the blend color. */
|
||||
r300_set_blend_color(pipe, &((struct r300_blend_color_state*)r300->blend_color_state.state)->state);
|
||||
|
||||
/* If zsbuf is set from NULL to non-NULL or vice versa.. */
|
||||
if (!!old_state->zsbuf != !!state->zsbuf) {
|
||||
r300_mark_atom_dirty(r300, &r300->dsa_state);
|
||||
|
@@ -655,6 +655,12 @@ static uint32_t r300_get_border_color(enum pipe_format format,
|
||||
case PIPE_FORMAT_LATC2_UNORM:
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_UNORM, &uc);
|
||||
return uc.ui;
|
||||
case PIPE_FORMAT_DXT1_SRGB:
|
||||
case PIPE_FORMAT_DXT1_SRGBA:
|
||||
case PIPE_FORMAT_DXT3_SRGBA:
|
||||
case PIPE_FORMAT_DXT5_SRGBA:
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_B8G8R8A8_SRGB, &uc);
|
||||
return uc.ui;
|
||||
default:
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
|
||||
return uc.ui;
|
||||
@@ -685,10 +691,18 @@ static uint32_t r300_get_border_color(enum pipe_format format,
|
||||
|
||||
default:
|
||||
case 8:
|
||||
if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED)
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_SNORM, &uc);
|
||||
else
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_UNORM, &uc);
|
||||
if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) {
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_SNORM, &uc);
|
||||
} else if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
|
||||
if (desc->nr_channels == 2) {
|
||||
border_swizzled[3] = border_swizzled[1];
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_L8A8_SRGB, &uc);
|
||||
} else {
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_SRGB, &uc);
|
||||
}
|
||||
} else {
|
||||
util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_UNORM, &uc);
|
||||
}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
@@ -121,6 +121,7 @@ int eg_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf)
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_ELSE:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_POP:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
|
||||
|
@@ -1721,6 +1721,8 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
rtex = (struct r600_texture*)res;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->cbufs[i]->texture);
|
||||
|
||||
if (!surf->color_initialized) {
|
||||
evergreen_init_color_surface(rctx, surf);
|
||||
}
|
||||
@@ -1787,6 +1789,8 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
|
||||
surf = (struct r600_surface*)state->zsbuf;
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->zsbuf->texture);
|
||||
|
||||
if (!surf->depth_initialized) {
|
||||
evergreen_init_depth_surface(rctx, surf);
|
||||
}
|
||||
|
@@ -1878,6 +1878,7 @@ static int r600_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_ELSE:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_POP:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
|
||||
@@ -1952,6 +1953,7 @@ int r600_bytecode_build(struct r600_bytecode *bc)
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_ELSE:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_POP:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
|
||||
@@ -1986,7 +1988,7 @@ int r600_bytecode_build(struct r600_bytecode *bc)
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_JUMP:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_ELSE:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_POP:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
|
||||
@@ -2089,6 +2091,7 @@ int r600_bytecode_build(struct r600_bytecode *bc)
|
||||
case EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3_BUF1:
|
||||
case EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3_BUF2:
|
||||
case EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3_BUF3:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
@@ -2172,6 +2175,7 @@ int r600_bytecode_build(struct r600_bytecode *bc)
|
||||
case V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM2:
|
||||
case V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
|
||||
@@ -2360,6 +2364,7 @@ void r600_bytecode_dump(struct r600_bytecode *bc)
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_ELSE:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_POP:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
case EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
|
||||
@@ -2454,6 +2459,7 @@ void r600_bytecode_dump(struct r600_bytecode *bc)
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_ELSE:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_POP:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
|
||||
case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
|
||||
|
@@ -387,6 +387,8 @@ static boolean is_simple_resolve(const struct pipe_resolve_info *info)
|
||||
{
|
||||
unsigned dst_width = u_minify(info->dst.res->width0, info->dst.level);
|
||||
unsigned dst_height = u_minify(info->dst.res->height0, info->dst.level);
|
||||
struct r600_texture *dst = (struct r600_texture*)info->dst.res;
|
||||
unsigned dst_tile_mode = dst->surface.level[info->dst.level].mode;
|
||||
|
||||
return info->dst.res->format == info->src.res->format &&
|
||||
dst_width == info->src.res->width0 &&
|
||||
@@ -398,7 +400,10 @@ static boolean is_simple_resolve(const struct pipe_resolve_info *info)
|
||||
info->src.x0 == 0 &&
|
||||
info->src.y0 == 0 &&
|
||||
info->src.x1 == dst_width &&
|
||||
info->src.y1 == dst_height;
|
||||
info->src.y1 == dst_height &&
|
||||
/* Dst must be tiled. If it's not, we have to use a temporary
|
||||
* resource which is tiled. */
|
||||
dst_tile_mode >= RADEON_SURF_MODE_1D;
|
||||
}
|
||||
|
||||
static void r600_color_resolve(struct pipe_context *ctx,
|
||||
@@ -434,7 +439,7 @@ static void r600_color_resolve(struct pipe_context *ctx,
|
||||
templ.nr_samples = 0;
|
||||
templ.usage = PIPE_USAGE_STATIC;
|
||||
templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
|
||||
templ.flags = 0;
|
||||
templ.flags = R600_RESOURCE_FLAG_FORCE_TILING; /* dst must not have a linear layout */
|
||||
|
||||
tmp = screen->resource_create(screen, &templ);
|
||||
|
||||
|
@@ -635,6 +635,16 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw,
|
||||
{
|
||||
struct r600_atom *state;
|
||||
|
||||
if (!ctx->ws->cs_memory_below_limit(ctx->cs, ctx->vram, ctx->gtt)) {
|
||||
ctx->gtt = 0;
|
||||
ctx->vram = 0;
|
||||
r600_flush(&ctx->context, NULL, RADEON_FLUSH_ASYNC);
|
||||
return;
|
||||
}
|
||||
/* all will be accounted once relocation are emited */
|
||||
ctx->gtt = 0;
|
||||
ctx->vram = 0;
|
||||
|
||||
/* The number of dwords we already used in the CS so far. */
|
||||
num_dw += ctx->cs->cdw;
|
||||
|
||||
@@ -953,6 +963,8 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags)
|
||||
|
||||
ctx->pm4_dirty_cdwords = 0;
|
||||
ctx->flags = 0;
|
||||
ctx->gtt = 0;
|
||||
ctx->vram = 0;
|
||||
|
||||
/* Begin a new CS. */
|
||||
r600_emit_atom(ctx, &ctx->start_cs_cmd.atom);
|
||||
@@ -1080,13 +1092,14 @@ void r600_context_streamout_begin(struct r600_context *ctx)
|
||||
unsigned *stride_in_dw = ctx->vs_shader->so.stride;
|
||||
unsigned buffer_en, i, update_flags = 0;
|
||||
uint64_t va;
|
||||
unsigned num_cs_dw_streamout_end;
|
||||
|
||||
buffer_en = (ctx->num_so_targets >= 1 && t[0] ? 1 : 0) |
|
||||
(ctx->num_so_targets >= 2 && t[1] ? 2 : 0) |
|
||||
(ctx->num_so_targets >= 3 && t[2] ? 4 : 0) |
|
||||
(ctx->num_so_targets >= 4 && t[3] ? 8 : 0);
|
||||
|
||||
ctx->num_cs_dw_streamout_end =
|
||||
num_cs_dw_streamout_end =
|
||||
12 + /* flush_vgt_streamout */
|
||||
util_bitcount(buffer_en) * 8 + /* STRMOUT_BUFFER_UPDATE */
|
||||
3 /* set_streamout_enable(0) */;
|
||||
@@ -1095,11 +1108,15 @@ void r600_context_streamout_begin(struct r600_context *ctx)
|
||||
12 + /* flush_vgt_streamout */
|
||||
6 + /* set_streamout_enable */
|
||||
util_bitcount(buffer_en) * 7 + /* SET_CONTEXT_REG */
|
||||
(ctx->chip_class == R700 ? util_bitcount(buffer_en) * 5 : 0) + /* STRMOUT_BASE_UPDATE */
|
||||
(ctx->family >= CHIP_RS780 &&
|
||||
ctx->family <= CHIP_RV740 ? util_bitcount(buffer_en) * 5 : 0) + /* STRMOUT_BASE_UPDATE */
|
||||
util_bitcount(buffer_en & ctx->streamout_append_bitmask) * 8 + /* STRMOUT_BUFFER_UPDATE */
|
||||
util_bitcount(buffer_en & ~ctx->streamout_append_bitmask) * 6 + /* STRMOUT_BUFFER_UPDATE */
|
||||
(ctx->family > CHIP_R600 && ctx->family < CHIP_RV770 ? 2 : 0) + /* SURFACE_BASE_UPDATE */
|
||||
ctx->num_cs_dw_streamout_end, TRUE);
|
||||
(ctx->family > CHIP_R600 && ctx->family < CHIP_RS780 ? 2 : 0) + /* SURFACE_BASE_UPDATE */
|
||||
num_cs_dw_streamout_end, TRUE);
|
||||
|
||||
/* This must be set after r600_need_cs_space. */
|
||||
ctx->num_cs_dw_streamout_end = num_cs_dw_streamout_end;
|
||||
|
||||
if (ctx->chip_class >= EVERGREEN) {
|
||||
evergreen_flush_vgt_streamout(ctx);
|
||||
@@ -1133,7 +1150,7 @@ void r600_context_streamout_begin(struct r600_context *ctx)
|
||||
|
||||
/* R7xx requires this packet after updating BUFFER_BASE.
|
||||
* Without this, R7xx locks up. */
|
||||
if (ctx->chip_class == R700) {
|
||||
if (ctx->family >= CHIP_RS780 && ctx->family <= CHIP_RV740) {
|
||||
cs->buf[cs->cdw++] = PKT3(PKT3_STRMOUT_BASE_UPDATE, 1, 0);
|
||||
cs->buf[cs->cdw++] = i;
|
||||
cs->buf[cs->cdw++] = va >> 8;
|
||||
@@ -1173,7 +1190,7 @@ void r600_context_streamout_begin(struct r600_context *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->family > CHIP_R600 && ctx->family < CHIP_RV770) {
|
||||
if (ctx->family > CHIP_R600 && ctx->family < CHIP_RS780) {
|
||||
cs->buf[cs->cdw++] = PKT3(PKT3_SURFACE_BASE_UPDATE, 0, 0);
|
||||
cs->buf[cs->cdw++] = update_flags;
|
||||
}
|
||||
|
@@ -443,7 +443,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
||||
return rscreen->has_streamout ? 1 : 0;
|
||||
case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
|
||||
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
|
||||
return 16*4;
|
||||
return 32*4;
|
||||
|
||||
/* Texturing. */
|
||||
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
|
||||
@@ -725,7 +725,7 @@ static boolean r600_fence_signalled(struct pipe_screen *pscreen,
|
||||
struct r600_screen *rscreen = (struct r600_screen *)pscreen;
|
||||
struct r600_fence *rfence = (struct r600_fence*)fence;
|
||||
|
||||
return rscreen->fences.data[rfence->index];
|
||||
return rscreen->fences.data[rfence->index] != 0;
|
||||
}
|
||||
|
||||
static boolean r600_fence_finish(struct pipe_screen *pscreen,
|
||||
@@ -933,13 +933,19 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
|
||||
/* Figure out streamout kernel support. */
|
||||
switch (rscreen->chip_class) {
|
||||
case R600:
|
||||
case EVERGREEN:
|
||||
case CAYMAN:
|
||||
rscreen->has_streamout = rscreen->info.drm_minor >= 14;
|
||||
if (rscreen->family < CHIP_RS780) {
|
||||
rscreen->has_streamout = rscreen->info.drm_minor >= 14;
|
||||
} else {
|
||||
rscreen->has_streamout = rscreen->info.drm_minor >= 23;
|
||||
}
|
||||
break;
|
||||
case R700:
|
||||
rscreen->has_streamout = rscreen->info.drm_minor >= 17;
|
||||
break;
|
||||
case EVERGREEN:
|
||||
case CAYMAN:
|
||||
rscreen->has_streamout = rscreen->info.drm_minor >= 14;
|
||||
break;
|
||||
}
|
||||
|
||||
if (r600_init_tiling(rscreen)) {
|
||||
|
@@ -371,6 +371,10 @@ struct r600_context {
|
||||
|
||||
unsigned default_ps_gprs, default_vs_gprs;
|
||||
|
||||
/* current unaccounted memory usage */
|
||||
uint64_t vram;
|
||||
uint64_t gtt;
|
||||
|
||||
/* States based on r600_atom. */
|
||||
struct list_head dirty_states;
|
||||
struct r600_command_buffer start_cs_cmd; /* invariant state mostly */
|
||||
@@ -886,4 +890,28 @@ static INLINE uint64_t r600_resource_va(struct pipe_screen *screen, struct pipe_
|
||||
return rscreen->ws->buffer_get_virtual_address(rresource->cs_buf);
|
||||
}
|
||||
|
||||
static INLINE void r600_context_add_resource_size(struct pipe_context *ctx, struct pipe_resource *r)
|
||||
{
|
||||
struct r600_context *rctx = (struct r600_context *)ctx;
|
||||
struct r600_resource *rr = (struct r600_resource *)r;
|
||||
|
||||
if (r == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The idea is to compute a gross estimate of memory requirement of
|
||||
* each draw call. After each draw call, memory will be precisely
|
||||
* accounted. So the uncertainty is only on the current draw call.
|
||||
* In practice this gave very good estimate (+/- 10% of the target
|
||||
* memory limit).
|
||||
*/
|
||||
if (rr->domains & RADEON_DOMAIN_GTT) {
|
||||
rctx->gtt += rr->buf->size;
|
||||
}
|
||||
if (rr->domains & RADEON_DOMAIN_VRAM) {
|
||||
rctx->vram += rr->buf->size;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -28,6 +28,7 @@
|
||||
/* flag to indicate a resource is to be used as a transfer so should not be tiled */
|
||||
#define R600_RESOURCE_FLAG_TRANSFER PIPE_RESOURCE_FLAG_DRV_PRIV
|
||||
#define R600_RESOURCE_FLAG_FLUSHED_DEPTH (PIPE_RESOURCE_FLAG_DRV_PRIV << 1)
|
||||
#define R600_RESOURCE_FLAG_FORCE_TILING (PIPE_RESOURCE_FLAG_DRV_PRIV << 2)
|
||||
|
||||
struct r600_transfer {
|
||||
struct pipe_transfer transfer;
|
||||
|
@@ -4012,6 +4012,23 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* for cube forms of lod and bias we need to route the lod
|
||||
value into Z */
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_TXB ||
|
||||
inst->Instruction.Opcode == TGSI_OPCODE_TXL) {
|
||||
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
|
||||
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
|
||||
r600_bytecode_src(&alu.src[0], &ctx->src[0], 3);
|
||||
alu.dst.sel = ctx->temp_reg;
|
||||
alu.dst.chan = 2;
|
||||
alu.last = 1;
|
||||
alu.dst.write = 1;
|
||||
r = r600_bytecode_add_alu(ctx->bc, &alu);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
src_loaded = TRUE;
|
||||
src_gpr = ctx->temp_reg;
|
||||
}
|
||||
@@ -4087,17 +4104,12 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
|
||||
tex.src_rel = ctx->src[0].rel;
|
||||
}
|
||||
|
||||
if (inst->Texture.Texture == TGSI_TEXTURE_CUBE) {
|
||||
if (inst->Texture.Texture == TGSI_TEXTURE_CUBE ||
|
||||
inst->Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) {
|
||||
tex.src_sel_x = 1;
|
||||
tex.src_sel_y = 0;
|
||||
tex.src_sel_z = 3;
|
||||
tex.src_sel_w = 1;
|
||||
}
|
||||
if (inst->Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) {
|
||||
tex.src_sel_x = 1;
|
||||
tex.src_sel_y = 0;
|
||||
tex.src_sel_z = 3;
|
||||
tex.src_sel_w = 2; /* route Z compare value into W */
|
||||
tex.src_sel_w = 2; /* route Z compare or Lod value into W */
|
||||
}
|
||||
|
||||
if (inst->Texture.Texture != TGSI_TEXTURE_RECT &&
|
||||
@@ -5102,7 +5114,9 @@ static int tgsi_endif(struct r600_shader_ctx *ctx)
|
||||
|
||||
static int tgsi_bgnloop(struct r600_shader_ctx *ctx)
|
||||
{
|
||||
r600_bytecode_add_cfinst(ctx->bc, CTX_INST(V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL));
|
||||
/* LOOP_START_DX10 ignores the LOOP_CONFIG* registers, so it is not
|
||||
* limited to 4096 iterations, like the other LOOP_* instructions. */
|
||||
r600_bytecode_add_cfinst(ctx->bc, CTX_INST(V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10));
|
||||
|
||||
fc_pushlevel(ctx, FC_LOOP);
|
||||
|
||||
|
@@ -1615,6 +1615,8 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
rtex = (struct r600_texture*)res;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->cbufs[i]->texture);
|
||||
|
||||
if (!surf->color_initialized || force_cmask_fmask) {
|
||||
r600_init_color_surface(rctx, surf, force_cmask_fmask);
|
||||
if (force_cmask_fmask) {
|
||||
@@ -1673,6 +1675,8 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
|
||||
surf = (struct r600_surface*)state->zsbuf;
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->zsbuf->texture);
|
||||
|
||||
if (!surf->depth_initialized) {
|
||||
r600_init_depth_surface(rctx, surf);
|
||||
}
|
||||
|
@@ -504,7 +504,8 @@ void r600_set_index_buffer(struct pipe_context *ctx,
|
||||
|
||||
if (ib) {
|
||||
pipe_resource_reference(&rctx->index_buffer.buffer, ib->buffer);
|
||||
memcpy(&rctx->index_buffer, ib, sizeof(*ib));
|
||||
memcpy(&rctx->index_buffer, ib, sizeof(*ib));
|
||||
r600_context_add_resource_size(ctx, ib->buffer);
|
||||
} else {
|
||||
pipe_resource_reference(&rctx->index_buffer.buffer, NULL);
|
||||
}
|
||||
@@ -549,6 +550,7 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
|
||||
vb[i].buffer_offset = input[i].buffer_offset;
|
||||
pipe_resource_reference(&vb[i].buffer, input[i].buffer);
|
||||
new_buffer_mask |= 1 << i;
|
||||
r600_context_add_resource_size(ctx, input[i].buffer);
|
||||
} else {
|
||||
pipe_resource_reference(&vb[i].buffer, NULL);
|
||||
disable_mask |= 1 << i;
|
||||
@@ -648,6 +650,7 @@ void r600_set_sampler_views(struct pipe_context *pipe,
|
||||
|
||||
pipe_sampler_view_reference((struct pipe_sampler_view **)&dst->views.views[i], views[i]);
|
||||
new_mask |= 1 << i;
|
||||
r600_context_add_resource_size(pipe, views[i]->texture);
|
||||
} else {
|
||||
pipe_sampler_view_reference((struct pipe_sampler_view **)&dst->views.views[i], NULL);
|
||||
disable_mask |= 1 << i;
|
||||
@@ -822,6 +825,8 @@ void r600_bind_ps_shader(struct pipe_context *ctx, void *state)
|
||||
rctx->ps_shader = (struct r600_pipe_shader_selector *)state;
|
||||
r600_context_pipe_state_set(rctx, &rctx->ps_shader->current->rstate);
|
||||
|
||||
r600_context_add_resource_size(ctx, (struct pipe_resource *)rctx->ps_shader->current->bo);
|
||||
|
||||
if (rctx->chip_class <= R700) {
|
||||
bool multiwrite = rctx->ps_shader->current->shader.fs_write_all;
|
||||
|
||||
@@ -848,6 +853,8 @@ void r600_bind_vs_shader(struct pipe_context *ctx, void *state)
|
||||
if (state) {
|
||||
r600_context_pipe_state_set(rctx, &rctx->vs_shader->current->rstate);
|
||||
|
||||
r600_context_add_resource_size(ctx, (struct pipe_resource *)rctx->vs_shader->current->bo);
|
||||
|
||||
if (rctx->chip_class < EVERGREEN && rctx->ps_shader)
|
||||
r600_adjust_gprs(rctx);
|
||||
}
|
||||
@@ -957,10 +964,13 @@ void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
|
||||
} else {
|
||||
u_upload_data(rctx->uploader, 0, input->buffer_size, ptr, &cb->buffer_offset, &cb->buffer);
|
||||
}
|
||||
/* account it in gtt */
|
||||
rctx->gtt += input->buffer_size;
|
||||
} else {
|
||||
/* Setup the hw buffer. */
|
||||
cb->buffer_offset = input->buffer_offset;
|
||||
pipe_resource_reference(&cb->buffer, input->buffer);
|
||||
r600_context_add_resource_size(ctx, input->buffer);
|
||||
}
|
||||
|
||||
state->enabled_mask |= 1 << index;
|
||||
@@ -1023,6 +1033,7 @@ void r600_set_so_targets(struct pipe_context *ctx,
|
||||
/* Set the new targets. */
|
||||
for (i = 0; i < num_targets; i++) {
|
||||
pipe_so_target_reference((struct pipe_stream_output_target**)&rctx->so_targets[i], targets[i]);
|
||||
r600_context_add_resource_size(ctx, targets[i]->buffer);
|
||||
}
|
||||
for (; i < rctx->num_so_targets; i++) {
|
||||
pipe_so_target_reference((struct pipe_stream_output_target**)&rctx->so_targets[i], NULL);
|
||||
|
@@ -454,7 +454,9 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
|
||||
int r;
|
||||
|
||||
if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER)) {
|
||||
if (!(templ->bind & PIPE_BIND_SCANOUT) &&
|
||||
if (templ->flags & R600_RESOURCE_FLAG_FORCE_TILING) {
|
||||
array_mode = V_038000_ARRAY_2D_TILED_THIN1;
|
||||
} else if (!(templ->bind & PIPE_BIND_SCANOUT) &&
|
||||
templ->usage != PIPE_USAGE_STAGING &&
|
||||
templ->usage != PIPE_USAGE_STREAM) {
|
||||
array_mode = V_038000_ARRAY_2D_TILED_THIN1;
|
||||
|
@@ -66,14 +66,11 @@ exec_prepare( const struct sp_fragment_shader_variant *var,
|
||||
{
|
||||
/*
|
||||
* Bind tokens/shader to the interpreter's machine state.
|
||||
* Avoid redundant binding.
|
||||
*/
|
||||
if (machine->Tokens != var->tokens) {
|
||||
tgsi_exec_machine_bind_shader( machine,
|
||||
var->tokens,
|
||||
PIPE_MAX_SAMPLERS,
|
||||
samplers );
|
||||
}
|
||||
tgsi_exec_machine_bind_shader(machine,
|
||||
var->tokens,
|
||||
PIPE_MAX_SAMPLERS,
|
||||
samplers);
|
||||
}
|
||||
|
||||
|
||||
@@ -180,8 +177,13 @@ exec_run( const struct sp_fragment_shader_variant *var,
|
||||
|
||||
|
||||
static void
|
||||
exec_delete( struct sp_fragment_shader_variant *var )
|
||||
exec_delete(struct sp_fragment_shader_variant *var,
|
||||
struct tgsi_exec_machine *machine)
|
||||
{
|
||||
if (machine->Tokens == var->tokens) {
|
||||
tgsi_exec_machine_bind_shader(machine, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
FREE( (void *) var->tokens );
|
||||
FREE(var);
|
||||
}
|
||||
|
@@ -148,13 +148,6 @@ shade_quads(struct quad_stage *qs,
|
||||
static void
|
||||
shade_begin(struct quad_stage *qs)
|
||||
{
|
||||
struct softpipe_context *softpipe = qs->softpipe;
|
||||
|
||||
softpipe->fs_variant->prepare( softpipe->fs_variant,
|
||||
softpipe->fs_machine,
|
||||
(struct tgsi_sampler **)
|
||||
softpipe->tgsi.samplers_list[PIPE_SHADER_FRAGMENT] );
|
||||
|
||||
qs->next->begin(qs->next);
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,8 @@ struct sp_fragment_shader_variant
|
||||
struct quad_header *quad);
|
||||
|
||||
/* Deletes this instance of the object */
|
||||
void (*delete)(struct sp_fragment_shader_variant *shader);
|
||||
void (*delete)(struct sp_fragment_shader_variant *shader,
|
||||
struct tgsi_exec_machine *machine);
|
||||
|
||||
struct sp_fragment_shader_variant *next;
|
||||
};
|
||||
|
@@ -242,6 +242,12 @@ update_fragment_shader(struct softpipe_context *softpipe, unsigned prim)
|
||||
if (softpipe->fs) {
|
||||
softpipe->fs_variant = softpipe_find_fs_variant(softpipe,
|
||||
softpipe->fs, &key);
|
||||
|
||||
/* prepare the TGSI interpreter for FS execution */
|
||||
softpipe->fs_variant->prepare(softpipe->fs_variant,
|
||||
softpipe->fs_machine,
|
||||
(struct tgsi_sampler **) softpipe->
|
||||
tgsi.samplers_list[PIPE_SHADER_FRAGMENT]);
|
||||
}
|
||||
else {
|
||||
softpipe->fs_variant = NULL;
|
||||
|
@@ -38,7 +38,6 @@
|
||||
#include "draw/draw_vs.h"
|
||||
#include "draw/draw_gs.h"
|
||||
#include "tgsi/tgsi_dump.h"
|
||||
#include "tgsi/tgsi_exec.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
|
||||
@@ -182,13 +181,6 @@ softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
|
||||
|
||||
assert(fs != softpipe->fs);
|
||||
|
||||
if (softpipe->fs_machine->Tokens == state->shader.tokens) {
|
||||
/* unbind the shader from the tgsi executor if we're
|
||||
* deleting it.
|
||||
*/
|
||||
tgsi_exec_machine_bind_shader(softpipe->fs_machine, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
/* delete variants */
|
||||
for (var = state->variants; var; var = next_var) {
|
||||
next_var = var->next;
|
||||
@@ -200,7 +192,7 @@ softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
|
||||
draw_delete_fragment_shader(softpipe->draw, var->draw_shader);
|
||||
#endif
|
||||
|
||||
var->delete(var);
|
||||
var->delete(var, softpipe->fs_machine);
|
||||
}
|
||||
|
||||
draw_delete_fragment_shader(softpipe->draw, state->draw_shader);
|
||||
|
@@ -2680,6 +2680,7 @@ sp_create_sampler_variant( const struct pipe_sampler_state *sampler,
|
||||
|
||||
case PIPE_TEX_MIPFILTER_LINEAR:
|
||||
if (key.bits.is_pot &&
|
||||
key.bits.target == PIPE_TEXTURE_2D &&
|
||||
sampler->min_img_filter == sampler->mag_img_filter &&
|
||||
sampler->normalized_coords &&
|
||||
sampler->wrap_s == PIPE_TEX_WRAP_REPEAT &&
|
||||
|
@@ -107,8 +107,10 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
|
||||
pipe_surface_reference(&dst->cbufs[i], fb->cbufs[i]);
|
||||
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
|
||||
pipe_surface_reference(&dst->cbufs[i],
|
||||
(i < fb->nr_cbufs) ? fb->cbufs[i] : NULL);
|
||||
}
|
||||
pipe_surface_reference(&dst->zsbuf, fb->zsbuf);
|
||||
|
||||
|
||||
|
@@ -98,6 +98,9 @@ svga_create_sampler_state(struct pipe_context *pipe,
|
||||
struct svga_context *svga = svga_context(pipe);
|
||||
struct svga_sampler_state *cso = CALLOC_STRUCT( svga_sampler_state );
|
||||
|
||||
if (!cso)
|
||||
return NULL;
|
||||
|
||||
cso->mipfilter = translate_mip_filter(sampler->min_mip_filter);
|
||||
cso->magfilter = translate_img_filter( sampler->mag_img_filter );
|
||||
cso->minfilter = translate_img_filter( sampler->min_img_filter );
|
||||
|
@@ -23,6 +23,7 @@
|
||||
*
|
||||
**********************************************************/
|
||||
|
||||
#include "util/u_format.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "pipe/p_defines.h"
|
||||
@@ -248,6 +249,16 @@ emit_rss(struct svga_context *svga, unsigned dirty)
|
||||
EMIT_RS_FLOAT( svga, bias, DEPTHBIAS, fail );
|
||||
}
|
||||
|
||||
if (dirty & SVGA_NEW_FRAME_BUFFER) {
|
||||
/* XXX: we only look at the first color buffer's sRGB state */
|
||||
float gamma = 1.0f;
|
||||
if (svga->curr.framebuffer.cbufs[0] &&
|
||||
util_format_is_srgb(svga->curr.framebuffer.cbufs[0]->format)) {
|
||||
gamma = 2.2f;
|
||||
}
|
||||
EMIT_RS_FLOAT(svga, gamma, OUTPUTGAMMA, fail);
|
||||
}
|
||||
|
||||
if (dirty & SVGA_NEW_RAST) {
|
||||
/* bitmask of the enabled clip planes */
|
||||
unsigned enabled = svga->curr.rast->templ.clip_plane_enable;
|
||||
|
@@ -59,7 +59,7 @@ extern "C" {
|
||||
#define PIPE_MAX_CONSTANT_BUFFERS 32
|
||||
#define PIPE_MAX_SAMPLERS 16
|
||||
#define PIPE_MAX_SHADER_INPUTS 32
|
||||
#define PIPE_MAX_SHADER_OUTPUTS 32
|
||||
#define PIPE_MAX_SHADER_OUTPUTS 48 /* 32 GENERICs + POS, PSIZE, FOG, etc. */
|
||||
#define PIPE_MAX_SHADER_SAMPLER_VIEWS 32
|
||||
#define PIPE_MAX_SHADER_RESOURCES 32
|
||||
#define PIPE_MAX_TEXTURE_LEVELS 16
|
||||
@@ -145,7 +145,7 @@ struct pipe_rasterizer_state
|
||||
unsigned line_stipple_factor:8; /**< [1..256] actually */
|
||||
unsigned line_stipple_pattern:16;
|
||||
|
||||
unsigned sprite_coord_enable:PIPE_MAX_SHADER_OUTPUTS;
|
||||
unsigned sprite_coord_enable; /* bitfield referring to 32 GENERIC inputs */
|
||||
|
||||
float line_width;
|
||||
float point_size; /**< used when no per-vertex size */
|
||||
|
@@ -23,7 +23,8 @@ libclllvm_la_CXXFLAGS = \
|
||||
-std=c++98 \
|
||||
$(LLVM_CPPFLAGS) \
|
||||
$(DEFINES) \
|
||||
-DLIBCLC_PATH=\"$(LIBCLC_PATH)/\" \
|
||||
-DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \
|
||||
-DLIBCLC_LIBEXECDIR=\"$(LIBCLC_LIBEXECDIR)/\" \
|
||||
-DCLANG_RESOURCE_DIR=\"$(CLANG_RESOURCE_DIR)\"
|
||||
|
||||
libclllvm_la_SOURCES = \
|
||||
@@ -73,3 +74,13 @@ libclover_la_SOURCES = \
|
||||
api/event.cpp \
|
||||
api/program.cpp \
|
||||
api/kernel.cpp
|
||||
|
||||
cldir = $(includedir)/CL
|
||||
cl_HEADERS = \
|
||||
$(top_srcdir)/include/CL/cl.h \
|
||||
$(top_srcdir)/include/CL/cl_ext.h \
|
||||
$(top_srcdir)/include/CL/cl_gl.h \
|
||||
$(top_srcdir)/include/CL/cl_gl_ext.h \
|
||||
$(top_srcdir)/include/CL/cl_platform.h \
|
||||
$(top_srcdir)/include/CL/opencl.h \
|
||||
$(top_srcdir)/include/CL/cl.hpp
|
||||
|
@@ -108,7 +108,7 @@ namespace {
|
||||
c.getHeaderSearchOpts().ResourceDir = CLANG_RESOURCE_DIR;
|
||||
|
||||
// Add libclc generic search path
|
||||
c.getHeaderSearchOpts().AddPath(LIBCLC_PATH "/generic/include/",
|
||||
c.getHeaderSearchOpts().AddPath(LIBCLC_INCLUDEDIR,
|
||||
clang::frontend::Angled,
|
||||
false, false, false);
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace {
|
||||
llvm::Linker linker("clover", mod);
|
||||
|
||||
// Link the kernel with libclc
|
||||
linker.LinkInFile(llvm::sys::Path(LIBCLC_PATH + triple + "/lib/builtins.bc"), isNative);
|
||||
linker.LinkInFile(llvm::sys::Path(LIBCLC_LIBEXECDIR + triple + ".bc"), isNative);
|
||||
mod = linker.releaseModule();
|
||||
|
||||
// Add a function internalizer pass.
|
||||
|
@@ -182,34 +182,42 @@ static const struct wl_drm_listener drm_listener = {
|
||||
drm_handle_authenticated
|
||||
};
|
||||
|
||||
static void
|
||||
registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
|
||||
const char *interface, uint32_t version)
|
||||
{
|
||||
struct wayland_drm_display *drmdpy = data;
|
||||
|
||||
if (strcmp(interface, "wl_drm") == 0) {
|
||||
drmdpy->wl_drm = wl_registry_bind(registry, name, &wl_drm_interface, 1);
|
||||
wl_drm_add_listener(drmdpy->wl_drm, &drm_listener, drmdpy);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener registry_listener = {
|
||||
registry_handle_global
|
||||
};
|
||||
|
||||
static boolean
|
||||
wayland_drm_display_init_screen(struct native_display *ndpy)
|
||||
{
|
||||
struct wayland_drm_display *drmdpy = wayland_drm_display(ndpy);
|
||||
uint32_t id;
|
||||
|
||||
id = wl_display_get_global(drmdpy->base.dpy, "wl_drm", 1);
|
||||
if (id == 0)
|
||||
wl_display_roundtrip(drmdpy->base.dpy);
|
||||
id = wl_display_get_global(drmdpy->base.dpy, "wl_drm", 1);
|
||||
if (id == 0)
|
||||
return FALSE;
|
||||
|
||||
drmdpy->wl_drm = wl_display_bind(drmdpy->base.dpy, id, &wl_drm_interface);
|
||||
if (!drmdpy->wl_drm)
|
||||
drmdpy->base.queue = wl_display_create_queue(drmdpy->base.dpy);
|
||||
drmdpy->base.registry = wl_display_get_registry(drmdpy->base.dpy);
|
||||
wl_proxy_set_queue((struct wl_proxy *) drmdpy->base.registry,
|
||||
drmdpy->base.queue);
|
||||
wl_registry_add_listener(drmdpy->base.registry, ®istry_listener, drmdpy);
|
||||
if (wayland_roundtrip(&drmdpy->base) < 0 || drmdpy->wl_drm == NULL)
|
||||
return FALSE;
|
||||
|
||||
wl_drm_add_listener(drmdpy->wl_drm, &drm_listener, drmdpy);
|
||||
wl_display_roundtrip(drmdpy->base.dpy);
|
||||
if (drmdpy->fd == -1)
|
||||
if (wayland_roundtrip(&drmdpy->base) < 0 || drmdpy->fd == -1)
|
||||
return FALSE;
|
||||
|
||||
wl_display_roundtrip(drmdpy->base.dpy);
|
||||
if (!drmdpy->authenticated)
|
||||
if (wayland_roundtrip(&drmdpy->base) < 0 || !drmdpy->authenticated)
|
||||
return FALSE;
|
||||
|
||||
if (drmdpy->base.formats == 0)
|
||||
wl_display_roundtrip(drmdpy->base.dpy);
|
||||
if (drmdpy->base.formats == 0)
|
||||
return FALSE;
|
||||
|
||||
|
@@ -133,26 +133,36 @@ static const struct wl_shm_listener shm_listener = {
|
||||
shm_handle_format
|
||||
};
|
||||
|
||||
static void
|
||||
registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
|
||||
const char *interface, uint32_t version)
|
||||
{
|
||||
struct wayland_shm_display *shmdpy = data;
|
||||
|
||||
if (strcmp(interface, "wl_shm") == 0) {
|
||||
shmdpy->wl_shm = wl_registry_bind(registry, name, &wl_shm_interface, 1);
|
||||
wl_shm_add_listener(shmdpy->wl_shm, &shm_listener, shmdpy);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener registry_listener = {
|
||||
registry_handle_global
|
||||
};
|
||||
|
||||
static boolean
|
||||
wayland_shm_display_init_screen(struct native_display *ndpy)
|
||||
{
|
||||
struct wayland_shm_display *shmdpy = wayland_shm_display(ndpy);
|
||||
struct sw_winsys *winsys = NULL;
|
||||
uint32_t id;
|
||||
|
||||
id = wl_display_get_global(shmdpy->base.dpy, "wl_shm", 1);
|
||||
if (id == 0)
|
||||
wl_display_iterate(shmdpy->base.dpy, WL_DISPLAY_READABLE);
|
||||
id = wl_display_get_global(shmdpy->base.dpy, "wl_shm", 1);
|
||||
if (id == 0)
|
||||
shmdpy->base.queue = wl_display_create_queue(shmdpy->base.dpy);
|
||||
shmdpy->base.registry = wl_display_get_registry(shmdpy->base.dpy);
|
||||
wl_proxy_set_queue((struct wl_proxy *) shmdpy->base.registry,
|
||||
shmdpy->base.queue);
|
||||
wl_registry_add_listener(shmdpy->base.registry, ®istry_listener, shmdpy);
|
||||
if (wayland_roundtrip(&shmdpy->base) < 0 || shmdpy->wl_shm == NULL)
|
||||
return FALSE;
|
||||
|
||||
shmdpy->wl_shm = wl_display_bind(shmdpy->base.dpy, id, &wl_shm_interface);
|
||||
if (!shmdpy->wl_shm)
|
||||
return FALSE;
|
||||
|
||||
wl_shm_add_listener(shmdpy->wl_shm, &shm_listener, shmdpy);
|
||||
|
||||
if (shmdpy->base.formats == 0)
|
||||
wl_display_roundtrip(shmdpy->base.dpy);
|
||||
if (shmdpy->base.formats == 0)
|
||||
|
@@ -35,6 +35,37 @@
|
||||
|
||||
#include "native_wayland.h"
|
||||
|
||||
static void
|
||||
sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
|
||||
{
|
||||
int *done = data;
|
||||
|
||||
*done = 1;
|
||||
wl_callback_destroy(callback);
|
||||
}
|
||||
|
||||
static const struct wl_callback_listener sync_listener = {
|
||||
sync_callback
|
||||
};
|
||||
|
||||
int
|
||||
wayland_roundtrip(struct wayland_display *display)
|
||||
{
|
||||
struct wl_callback *callback;
|
||||
int done = 0, ret = 0;
|
||||
|
||||
callback = wl_display_sync(display->dpy);
|
||||
wl_callback_add_listener(callback, &sync_listener, &done);
|
||||
wl_proxy_set_queue((struct wl_proxy *) callback, display->queue);
|
||||
while (ret != -1 && !done)
|
||||
ret = wl_display_dispatch_queue(display->dpy, display->queue);
|
||||
|
||||
if (!done)
|
||||
wl_callback_destroy(callback);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct native_event_handler *wayland_event_handler;
|
||||
|
||||
const static struct {
|
||||
@@ -71,7 +102,6 @@ wayland_display_get_configs(struct native_display *ndpy, int *num_configs)
|
||||
(1 << NATIVE_ATTACHMENT_BACK_LEFT);
|
||||
|
||||
nconf->window_bit = TRUE;
|
||||
nconf->pixmap_bit = TRUE;
|
||||
|
||||
nconf->color_format = wayland_formats[i].format;
|
||||
display->num_configs++;
|
||||
@@ -93,7 +123,6 @@ static int
|
||||
wayland_display_get_param(struct native_display *ndpy,
|
||||
enum native_param_type param)
|
||||
{
|
||||
struct wayland_display *display = wayland_display(ndpy);
|
||||
int val;
|
||||
|
||||
switch (param) {
|
||||
@@ -111,49 +140,6 @@ wayland_display_get_param(struct native_display *ndpy,
|
||||
return val;
|
||||
}
|
||||
|
||||
static boolean
|
||||
wayland_display_get_pixmap_format(struct native_display *ndpy,
|
||||
EGLNativePixmapType pix,
|
||||
enum pipe_format *format)
|
||||
{
|
||||
/* all wl_egl_pixmaps are supported */
|
||||
*format = PIPE_FORMAT_NONE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
wayland_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
|
||||
{
|
||||
struct pipe_resource *resource = egl_pixmap->driver_private;
|
||||
|
||||
assert(resource);
|
||||
|
||||
pipe_resource_reference(&resource, NULL);
|
||||
if (egl_pixmap->buffer) {
|
||||
wl_buffer_destroy(egl_pixmap->buffer);
|
||||
egl_pixmap->buffer = NULL;
|
||||
}
|
||||
|
||||
egl_pixmap->driver_private = NULL;
|
||||
egl_pixmap->destroy = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
wayland_pixmap_surface_initialize(struct wayland_surface *surface)
|
||||
{
|
||||
struct wayland_display *display = wayland_display(&surface->display->base);
|
||||
const enum native_attachment front_natt = NATIVE_ATTACHMENT_FRONT_LEFT;
|
||||
|
||||
if (surface->pix->buffer != NULL)
|
||||
return;
|
||||
|
||||
surface->pix->buffer = display->create_buffer(display, surface, front_natt);
|
||||
surface->pix->destroy = wayland_pixmap_destroy;
|
||||
surface->pix->driver_private =
|
||||
resource_surface_get_single_resource(surface->rsurf, front_natt);
|
||||
}
|
||||
|
||||
static void
|
||||
wayland_release_pending_resource(void *data,
|
||||
struct wl_callback *callback,
|
||||
@@ -188,7 +174,7 @@ wayland_window_surface_handle_resize(struct wayland_surface *surface)
|
||||
surface->win->width, surface->win->height)) {
|
||||
|
||||
if (surface->pending_resource)
|
||||
wl_display_roundtrip(display->dpy);
|
||||
wayland_roundtrip(display);
|
||||
|
||||
if (front_resource) {
|
||||
struct wl_callback *callback;
|
||||
@@ -198,6 +184,7 @@ wayland_window_surface_handle_resize(struct wayland_surface *surface)
|
||||
|
||||
callback = wl_display_sync(display->dpy);
|
||||
wl_callback_add_listener(callback, &release_buffer_listener, surface);
|
||||
wl_proxy_set_queue((struct wl_proxy *) callback, display->queue);
|
||||
}
|
||||
|
||||
for (i = 0; i < WL_BUFFER_COUNT; ++i) {
|
||||
@@ -234,9 +221,6 @@ wayland_surface_validate(struct native_surface *nsurf, uint attachment_mask,
|
||||
|
||||
resource_surface_get_size(surface->rsurf, (uint *) width, (uint *) height);
|
||||
|
||||
if (surface->type == WL_PIXMAP_SURFACE)
|
||||
wayland_pixmap_surface_initialize(surface);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -245,7 +229,7 @@ wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
|
||||
{
|
||||
struct wayland_surface *surface = data;
|
||||
|
||||
surface->block_swap_buffers = FALSE;
|
||||
surface->frame_callback = NULL;
|
||||
|
||||
wl_callback_destroy(callback);
|
||||
}
|
||||
@@ -269,15 +253,17 @@ wayland_surface_swap_buffers(struct native_surface *nsurf)
|
||||
{
|
||||
struct wayland_surface *surface = wayland_surface(nsurf);
|
||||
struct wayland_display *display = surface->display;
|
||||
struct wl_callback *callback;
|
||||
int ret = 0;
|
||||
|
||||
while (surface->block_swap_buffers)
|
||||
wl_display_iterate(display->dpy, WL_DISPLAY_READABLE);
|
||||
while (surface->frame_callback && ret != -1)
|
||||
ret = wl_display_dispatch_queue(display->dpy, display->queue);
|
||||
if (ret == -1)
|
||||
return EGL_FALSE;
|
||||
|
||||
surface->block_swap_buffers = TRUE;
|
||||
|
||||
callback = wl_surface_frame(surface->win->surface);
|
||||
wl_callback_add_listener(callback, &frame_listener, surface);
|
||||
surface->frame_callback = wl_surface_frame(surface->win->surface);
|
||||
wl_callback_add_listener(surface->frame_callback, &frame_listener, surface);
|
||||
wl_proxy_set_queue((struct wl_proxy *) surface->frame_callback,
|
||||
display->queue);
|
||||
|
||||
if (surface->type == WL_WINDOW_SURFACE) {
|
||||
resource_surface_swap_buffers(surface->rsurf,
|
||||
@@ -349,6 +335,7 @@ wayland_surface_present(struct native_surface *nsurf,
|
||||
if (surface->type == WL_WINDOW_SURFACE) {
|
||||
resource_surface_get_size(surface->rsurf, &width, &height);
|
||||
wl_surface_damage(surface->win->surface, 0, 0, width, height);
|
||||
wl_surface_commit(surface->win->surface);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -371,66 +358,14 @@ wayland_surface_destroy(struct native_surface *nsurf)
|
||||
wl_buffer_destroy(surface->buffer[buffer]);
|
||||
}
|
||||
|
||||
if (surface->frame_callback)
|
||||
wl_callback_destroy(surface->frame_callback);
|
||||
|
||||
resource_surface_destroy(surface->rsurf);
|
||||
FREE(surface);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct native_surface *
|
||||
wayland_create_pixmap_surface(struct native_display *ndpy,
|
||||
EGLNativePixmapType pix,
|
||||
const struct native_config *nconf)
|
||||
{
|
||||
struct wayland_display *display = wayland_display(ndpy);
|
||||
struct wayland_surface *surface;
|
||||
struct wl_egl_pixmap *egl_pixmap = (struct wl_egl_pixmap *) pix;
|
||||
enum native_attachment natt = NATIVE_ATTACHMENT_FRONT_LEFT;
|
||||
uint bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW |
|
||||
PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT;
|
||||
|
||||
surface = CALLOC_STRUCT(wayland_surface);
|
||||
if (!surface)
|
||||
return NULL;
|
||||
|
||||
surface->display = display;
|
||||
|
||||
surface->pending_resource = NULL;
|
||||
surface->type = WL_PIXMAP_SURFACE;
|
||||
surface->pix = egl_pixmap;
|
||||
|
||||
if (nconf)
|
||||
surface->color_format = nconf->color_format;
|
||||
else /* FIXME: derive format from wl_visual */
|
||||
surface->color_format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
|
||||
surface->attachment_mask = (1 << NATIVE_ATTACHMENT_FRONT_LEFT);
|
||||
|
||||
surface->rsurf = resource_surface_create(display->base.screen,
|
||||
surface->color_format, bind);
|
||||
|
||||
if (!surface->rsurf) {
|
||||
FREE(surface);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
resource_surface_set_size(surface->rsurf,
|
||||
egl_pixmap->width, egl_pixmap->height);
|
||||
|
||||
/* the pixmap is already allocated, so import it */
|
||||
if (surface->pix->buffer != NULL)
|
||||
resource_surface_import_resource(surface->rsurf, natt,
|
||||
surface->pix->driver_private);
|
||||
|
||||
surface->base.destroy = wayland_surface_destroy;
|
||||
surface->base.present = wayland_surface_present;
|
||||
surface->base.validate = wayland_surface_validate;
|
||||
surface->base.wait = wayland_surface_wait;
|
||||
|
||||
return &surface->base;
|
||||
}
|
||||
|
||||
|
||||
static struct native_surface *
|
||||
wayland_create_window_surface(struct native_display *ndpy,
|
||||
EGLNativeWindowType win,
|
||||
@@ -452,7 +387,7 @@ wayland_create_window_surface(struct native_display *ndpy,
|
||||
surface->win = (struct wl_egl_window *) win;
|
||||
|
||||
surface->pending_resource = NULL;
|
||||
surface->block_swap_buffers = FALSE;
|
||||
surface->frame_callback = NULL;
|
||||
surface->type = WL_WINDOW_SURFACE;
|
||||
|
||||
surface->buffer[WL_BUFFER_FRONT] = NULL;
|
||||
@@ -505,10 +440,7 @@ native_create_display(void *dpy, boolean use_sw)
|
||||
|
||||
display->base.get_param = wayland_display_get_param;
|
||||
display->base.get_configs = wayland_display_get_configs;
|
||||
display->base.get_pixmap_format = wayland_display_get_pixmap_format;
|
||||
display->base.copy_to_pixmap = native_display_copy_to_pixmap;
|
||||
display->base.create_window_surface = wayland_create_window_surface;
|
||||
display->base.create_pixmap_surface = wayland_create_pixmap_surface;
|
||||
|
||||
display->own_dpy = own_dpy;
|
||||
|
||||
|
@@ -45,6 +45,8 @@ struct wayland_display {
|
||||
struct native_display base;
|
||||
|
||||
struct wl_display *dpy;
|
||||
struct wl_event_queue *queue;
|
||||
struct wl_registry *registry;
|
||||
boolean own_dpy;
|
||||
/* supported formats */
|
||||
uint32_t formats;
|
||||
@@ -65,7 +67,6 @@ enum wayland_buffer_type {
|
||||
|
||||
enum wayland_surface_type {
|
||||
WL_WINDOW_SURFACE,
|
||||
WL_PIXMAP_SURFACE,
|
||||
WL_PBUFFER_SURFACE
|
||||
};
|
||||
|
||||
@@ -74,7 +75,6 @@ struct wayland_surface {
|
||||
struct wayland_display *display;
|
||||
|
||||
struct wl_egl_window *win;
|
||||
struct wl_egl_pixmap *pix;
|
||||
enum wayland_surface_type type;
|
||||
int dx, dy;
|
||||
struct resource_surface *rsurf;
|
||||
@@ -85,7 +85,7 @@ struct wayland_surface {
|
||||
struct wl_buffer *buffer[WL_BUFFER_COUNT];
|
||||
unsigned int attachment_mask;
|
||||
|
||||
boolean block_swap_buffers;
|
||||
struct wl_callback *frame_callback;
|
||||
boolean premultiplied_alpha;
|
||||
};
|
||||
|
||||
@@ -119,4 +119,7 @@ struct wayland_display *
|
||||
wayland_create_drm_display(struct wl_display *display,
|
||||
const struct native_event_handler *event_handler);
|
||||
|
||||
int
|
||||
wayland_roundtrip(struct wayland_display *drmdpy);
|
||||
|
||||
#endif /* _NATIVE_WAYLAND_H_ */
|
||||
|
@@ -687,6 +687,20 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
|
||||
|
||||
while (*parselist) {
|
||||
|
||||
if (fbConfig &&
|
||||
parselist[1] == GLX_DONT_CARE &&
|
||||
parselist[0] != GLX_LEVEL) {
|
||||
/* For glXChooseFBConfig(), skip attributes whose value is
|
||||
* GLX_DONT_CARE, unless it's GLX_LEVEL (which can legitimately be
|
||||
* a negative value).
|
||||
*
|
||||
* From page 17 (23 of the pdf) of the GLX 1.4 spec:
|
||||
* GLX DONT CARE may be specified for all attributes except GLX LEVEL.
|
||||
*/
|
||||
parselist += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (*parselist) {
|
||||
case GLX_USE_GL:
|
||||
if (fbConfig) {
|
||||
@@ -832,11 +846,13 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
|
||||
* GLX_ARB_multisample
|
||||
*/
|
||||
case GLX_SAMPLE_BUFFERS_ARB:
|
||||
/* ms not supported */
|
||||
return NULL;
|
||||
case GLX_SAMPLES_ARB:
|
||||
/* ms not supported */
|
||||
return NULL;
|
||||
parselist++;
|
||||
if (*parselist++ != 0) {
|
||||
/* ms not supported */
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* FBConfig attribs.
|
||||
|
@@ -28,6 +28,6 @@ endif
|
||||
|
||||
include ../Makefile.dri
|
||||
|
||||
GALLIUM_DRI_LIB_DEPS += -ldrm_intel
|
||||
GALLIUM_DRI_LIB_DEPS += $(INTEL_LIBS)
|
||||
|
||||
symlinks:
|
||||
|
@@ -21,6 +21,6 @@ DRIVER_DEFINES = \
|
||||
|
||||
include ../Makefile.dri
|
||||
|
||||
GALLIUM_DRI_LIB_DEPS += -ldrm_radeon
|
||||
GALLIUM_DRI_LIB_DEPS += $(RADEON_LIBS)
|
||||
|
||||
symlinks:
|
||||
|
@@ -21,6 +21,6 @@ DRIVER_DEFINES = \
|
||||
|
||||
include ../Makefile.dri
|
||||
|
||||
GALLIUM_DRI_LIB_DEPS += -ldrm_radeon
|
||||
GALLIUM_DRI_LIB_DEPS += $(RADEON_LIBS)
|
||||
|
||||
symlinks:
|
||||
|
@@ -21,6 +21,6 @@ DRIVER_DEFINES = \
|
||||
|
||||
include ../Makefile.dri
|
||||
|
||||
GALLIUM_DRI_LIB_DEPS += -ldrm_radeon
|
||||
GALLIUM_DRI_LIB_DEPS += $(RADEON_LIBS)
|
||||
|
||||
symlinks:
|
||||
|
@@ -48,17 +48,17 @@ egl_SYS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) -lEGL -lm -lpthread
|
||||
ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
|
||||
egl_CPPFLAGS += $(LIBDRM_CFLAGS)
|
||||
egl_LIBS += $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a
|
||||
egl_SYS += -lX11 -lXext -lXfixes $(LIBDRM_LIB)
|
||||
egl_SYS += -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
|
||||
endif
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
egl_CPPFLAGS += $(LIBDRM_CFLAGS)
|
||||
egl_LIBS += $(TOP)/src/gallium/winsys/sw/wayland/libws_wayland.a
|
||||
egl_LIBS += $(TOP)/src/egl/wayland/wayland-drm/.libs/libwayland-drm.a
|
||||
egl_SYS += $(LIBDRM_LIB) $(WAYLAND_LIBS)
|
||||
egl_SYS += $(LIBDRM_LIBS) $(WAYLAND_LIBS)
|
||||
endif
|
||||
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||
egl_CPPFLAGS += $(LIBDRM_CFLAGS)
|
||||
egl_SYS += $(LIBDRM_LIB) -lgbm
|
||||
egl_SYS += $(LIBDRM_LIBS) -lgbm
|
||||
endif
|
||||
ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
|
||||
egl_LIBS += $(TOP)/src/gallium/winsys/sw/fbdev/libfbdev.a
|
||||
@@ -93,7 +93,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_I915=1
|
||||
egl_LIBS += \
|
||||
$(TOP)/src/gallium/winsys/i915/drm/libi915drm.a \
|
||||
$(TOP)/src/gallium/drivers/i915/libi915.a
|
||||
egl_SYS += -ldrm_intel
|
||||
egl_SYS += $(INTEL_LIBS)
|
||||
endif
|
||||
|
||||
# nouveau
|
||||
@@ -105,7 +105,7 @@ egl_LIBS += \
|
||||
$(TOP)/src/gallium/drivers/nv50/libnv50.a \
|
||||
$(TOP)/src/gallium/drivers/nvc0/libnvc0.a \
|
||||
$(TOP)/src/gallium/drivers/nouveau/libnouveau.a
|
||||
egl_SYS += -ldrm_nouveau
|
||||
egl_SYS += $(NOUVEAU_LIBS)
|
||||
endif
|
||||
|
||||
# r300
|
||||
@@ -115,7 +115,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R300=1
|
||||
egl_LIBS += \
|
||||
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
|
||||
$(TOP)/src/gallium/drivers/r300/libr300.a
|
||||
egl_SYS += -ldrm_radeon
|
||||
egl_SYS += $(RADEON_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -126,7 +126,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R600=1
|
||||
egl_LIBS += \
|
||||
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
|
||||
$(TOP)/src/gallium/drivers/r600/libr600.a
|
||||
egl_SYS += -ldrm_radeon
|
||||
egl_SYS += $(RADEON_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -137,7 +137,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
|
||||
egl_LIBS += \
|
||||
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
|
||||
$(TOP)/src/gallium/drivers/radeonsi/libradeonsi.a
|
||||
egl_SYS += -ldrm_radeon
|
||||
egl_SYS += $(RADEON_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@@ -14,7 +14,7 @@ GBM_INCLUDES = \
|
||||
-I$(TOP)/src/gallium/winsys \
|
||||
-I$(TOP)/src/gallium/include
|
||||
|
||||
GBM_LIBS = $(LIBUDEV_LIBS) $(LIBDRM_LIB) -lm \
|
||||
GBM_LIBS = $(LIBUDEV_LIBS) $(LIBDRM_LIBS) -lm \
|
||||
$(TOP)/src/gallium/state_trackers/gbm/libgbm.a \
|
||||
$(GALLIUM_PIPE_LOADER_LIBS) $(GALLIUM_AUXILIARIES)
|
||||
|
||||
|
@@ -24,7 +24,7 @@ PIPE_LIBS = \
|
||||
$(TOP)/src/gallium/drivers/rbug/librbug.a \
|
||||
$(GALLIUM_AUXILIARIES)
|
||||
|
||||
PIPE_SYS = $(LIBDRM_LIB) -lm -lpthread $(DLOPEN_LIBS)
|
||||
PIPE_SYS = $(LIBDRM_LIBS) -lm -lpthread $(DLOPEN_LIBS)
|
||||
|
||||
PIPE_CFLAGS = $(LIBDRM_CFLAGS)
|
||||
|
||||
@@ -34,7 +34,7 @@ PIPE_LDFLAGS = -Wl,--no-undefined
|
||||
i915_LIBS = \
|
||||
$(TOP)/src/gallium/winsys/i915/drm/libi915drm.a \
|
||||
$(TOP)/src/gallium/drivers/i915/libi915.a
|
||||
i915_SYS = -ldrm_intel
|
||||
i915_SYS = $(INTEL_LIBS)
|
||||
|
||||
# nouveau pipe driver
|
||||
nouveau_LIBS = \
|
||||
@@ -43,25 +43,25 @@ nouveau_LIBS = \
|
||||
$(TOP)/src/gallium/drivers/nv50/libnv50.a \
|
||||
$(TOP)/src/gallium/drivers/nvc0/libnvc0.a \
|
||||
$(TOP)/src/gallium/drivers/nouveau/libnouveau.a
|
||||
nouveau_SYS = -ldrm_nouveau
|
||||
nouveau_SYS = $(NOUVEAU_LIBS)
|
||||
|
||||
# r300 pipe driver
|
||||
r300_LIBS = \
|
||||
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
|
||||
$(TOP)/src/gallium/drivers/r300/libr300.a
|
||||
r300_SYS += -ldrm_radeon
|
||||
r300_SYS += $(RADEON_LIBS)
|
||||
|
||||
# r600 pipe driver
|
||||
r600_LIBS = \
|
||||
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
|
||||
$(TOP)/src/gallium/drivers/r600/libr600.a
|
||||
r600_SYS += -ldrm_radeon
|
||||
r600_SYS += $(RADEON_LIBS)
|
||||
|
||||
# radeonsi pipe driver
|
||||
radeonsi_LIBS = \
|
||||
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
|
||||
$(TOP)/src/gallium/drivers/radeonsi/libradeonsi.a
|
||||
radeonsi_SYS += -ldrm_radeon
|
||||
radeonsi_SYS += $(RADEON_LIBS)
|
||||
|
||||
# vmwgfx pipe driver
|
||||
vmwgfx_LIBS = \
|
||||
|
@@ -21,7 +21,7 @@ C_SOURCES = \
|
||||
$(COMMON_GALLIUM_SOURCES) \
|
||||
$(DRIVER_SOURCES)
|
||||
|
||||
DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
|
||||
DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
|
||||
|
||||
include ../Makefile.vdpau
|
||||
|
||||
|
@@ -17,7 +17,7 @@ C_SOURCES = \
|
||||
$(COMMON_GALLIUM_SOURCES) \
|
||||
$(DRIVER_SOURCES)
|
||||
|
||||
DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
|
||||
DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
|
||||
|
||||
include ../Makefile.vdpau
|
||||
|
||||
|
@@ -23,7 +23,7 @@ C_SOURCES = \
|
||||
DRIVER_DEFINES = \
|
||||
-DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_NOOP
|
||||
|
||||
DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
|
||||
DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
|
||||
|
||||
include ../Makefile.vdpau
|
||||
|
||||
|
@@ -17,7 +17,7 @@ C_SOURCES = \
|
||||
$(COMMON_GALLIUM_SOURCES) \
|
||||
$(DRIVER_SOURCES)
|
||||
|
||||
DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
|
||||
DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
|
||||
|
||||
include ../Makefile.xvmc
|
||||
|
||||
|
@@ -17,7 +17,7 @@ C_SOURCES = \
|
||||
$(COMMON_GALLIUM_SOURCES) \
|
||||
$(DRIVER_SOURCES)
|
||||
|
||||
DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
|
||||
DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
|
||||
|
||||
include ../Makefile.xvmc
|
||||
|
||||
|
@@ -366,6 +366,16 @@ static boolean radeon_drm_cs_validate(struct radeon_winsys_cs *rcs)
|
||||
return status;
|
||||
}
|
||||
|
||||
static boolean radeon_drm_cs_memory_below_limit(struct radeon_winsys_cs *rcs, uint64_t vram, uint64_t gtt)
|
||||
{
|
||||
struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
|
||||
boolean status =
|
||||
(cs->csc->used_gart + gtt) < cs->ws->info.gart_size * 0.7 &&
|
||||
(cs->csc->used_vram + vram) < cs->ws->info.vram_size * 0.7;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void radeon_drm_cs_write_reloc(struct radeon_winsys_cs *rcs,
|
||||
struct radeon_winsys_cs_handle *buf)
|
||||
{
|
||||
@@ -549,6 +559,7 @@ void radeon_drm_cs_init_functions(struct radeon_drm_winsys *ws)
|
||||
ws->base.cs_destroy = radeon_drm_cs_destroy;
|
||||
ws->base.cs_add_reloc = radeon_drm_cs_add_reloc;
|
||||
ws->base.cs_validate = radeon_drm_cs_validate;
|
||||
ws->base.cs_memory_below_limit = radeon_drm_cs_memory_below_limit;
|
||||
ws->base.cs_write_reloc = radeon_drm_cs_write_reloc;
|
||||
ws->base.cs_flush = radeon_drm_cs_flush;
|
||||
ws->base.cs_set_flush_callback = radeon_drm_cs_set_flush;
|
||||
|
@@ -308,6 +308,16 @@ struct radeon_winsys {
|
||||
*/
|
||||
boolean (*cs_validate)(struct radeon_winsys_cs *cs);
|
||||
|
||||
/**
|
||||
* Return TRUE if there is enough memory in VRAM and GTT for the relocs
|
||||
* added so far.
|
||||
*
|
||||
* \param cs A command stream to validate.
|
||||
* \param vram VRAM memory size pending to be use
|
||||
* \param gtt GTT memory size pending to be use
|
||||
*/
|
||||
boolean (*cs_memory_below_limit)(struct radeon_winsys_cs *cs, uint64_t vram, uint64_t gtt);
|
||||
|
||||
/**
|
||||
* Write a relocated dword to a command buffer.
|
||||
*
|
||||
|
@@ -33,8 +33,10 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#include <dlfcn.h>
|
||||
#include <xf86drm.h>
|
||||
|
||||
#include <GL/gl.h> /* dri_interface needs GL types */
|
||||
#include <GL/internal/dri_interface.h>
|
||||
@@ -300,19 +302,12 @@ static int
|
||||
gbm_dri_bo_write(struct gbm_bo *_bo, const void *buf, size_t count)
|
||||
{
|
||||
struct gbm_dri_bo *bo = gbm_dri_bo(_bo);
|
||||
void *ptr;
|
||||
int ret;
|
||||
|
||||
if (bo->bo == NULL)
|
||||
if (bo->image != NULL)
|
||||
return -1;
|
||||
|
||||
ret = kms_bo_map(bo->bo, &ptr);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
memcpy(bo->map, buf, count);
|
||||
|
||||
memcpy(ptr, buf, count);
|
||||
|
||||
kms_bo_unmap(bo->bo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -321,11 +316,17 @@ gbm_dri_bo_destroy(struct gbm_bo *_bo)
|
||||
{
|
||||
struct gbm_dri_device *dri = gbm_dri_device(_bo->gbm);
|
||||
struct gbm_dri_bo *bo = gbm_dri_bo(_bo);
|
||||
struct drm_mode_destroy_dumb arg;
|
||||
|
||||
if (bo->image != NULL)
|
||||
if (bo->image != NULL) {
|
||||
dri->image->destroyImage(bo->image);
|
||||
if (bo->bo != NULL)
|
||||
kms_bo_destroy(&bo->bo);
|
||||
} else {
|
||||
munmap(bo->map, bo->size);
|
||||
memset(&arg, 0, sizeof(arg));
|
||||
arg.handle = bo->handle;
|
||||
drmIoctl(dri->base.base.fd, DRM_IOCTL_MODE_DESTROY_DUMB, &arg);
|
||||
}
|
||||
|
||||
free(bo);
|
||||
}
|
||||
|
||||
@@ -375,6 +376,9 @@ gbm_dri_bo_import(struct gbm_device *gbm,
|
||||
{
|
||||
struct wl_drm_buffer *wb = (struct wl_drm_buffer *) buffer;
|
||||
|
||||
if (!wayland_buffer_is_drm(buffer))
|
||||
return NULL;
|
||||
|
||||
image = wb->driver_buffer;
|
||||
|
||||
switch (wb->format) {
|
||||
@@ -444,6 +448,68 @@ gbm_dri_bo_import(struct gbm_device *gbm,
|
||||
return &bo->base.base;
|
||||
}
|
||||
|
||||
static struct gbm_bo *
|
||||
create_dumb(struct gbm_device *gbm,
|
||||
uint32_t width, uint32_t height,
|
||||
uint32_t format, uint32_t usage)
|
||||
{
|
||||
struct gbm_dri_device *dri = gbm_dri_device(gbm);
|
||||
struct drm_mode_create_dumb create_arg;
|
||||
struct drm_mode_map_dumb map_arg;
|
||||
struct gbm_dri_bo *bo;
|
||||
struct drm_mode_destroy_dumb destroy_arg;
|
||||
int ret;
|
||||
|
||||
if (!(usage & GBM_BO_USE_CURSOR_64X64))
|
||||
return NULL;
|
||||
if (format != GBM_FORMAT_ARGB8888)
|
||||
return NULL;
|
||||
|
||||
bo = calloc(1, sizeof *bo);
|
||||
if (bo == NULL)
|
||||
return NULL;
|
||||
|
||||
create_arg.bpp = 32;
|
||||
create_arg.width = width;
|
||||
create_arg.height = height;
|
||||
|
||||
ret = drmIoctl(dri->base.base.fd, DRM_IOCTL_MODE_CREATE_DUMB, &create_arg);
|
||||
if (ret)
|
||||
goto free_bo;
|
||||
|
||||
bo->base.base.gbm = gbm;
|
||||
bo->base.base.width = width;
|
||||
bo->base.base.height = height;
|
||||
bo->base.base.stride = create_arg.pitch;
|
||||
bo->base.base.format = format;
|
||||
bo->base.base.handle.u32 = create_arg.handle;
|
||||
bo->handle = create_arg.handle;
|
||||
bo->size = create_arg.size;
|
||||
|
||||
memset(&map_arg, 0, sizeof(map_arg));
|
||||
map_arg.handle = bo->handle;
|
||||
|
||||
ret = drmIoctl(dri->base.base.fd, DRM_IOCTL_MODE_MAP_DUMB, &map_arg);
|
||||
if (ret)
|
||||
goto destroy_dumb;
|
||||
|
||||
bo->map = mmap(0, bo->size, PROT_WRITE,
|
||||
MAP_SHARED, dri->base.base.fd, map_arg.offset);
|
||||
if (bo->map == MAP_FAILED)
|
||||
goto destroy_dumb;
|
||||
|
||||
return &bo->base.base;
|
||||
|
||||
destroy_dumb:
|
||||
memset(&destroy_arg, 0, sizeof destroy_arg);
|
||||
destroy_arg.handle = create_arg.handle;
|
||||
drmIoctl(dri->base.base.fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_arg);
|
||||
free_bo:
|
||||
free(bo);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct gbm_bo *
|
||||
gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
uint32_t width, uint32_t height,
|
||||
@@ -454,6 +520,9 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
int dri_format;
|
||||
unsigned dri_use = 0;
|
||||
|
||||
if (usage & GBM_BO_USE_WRITE)
|
||||
return create_dumb(gbm, width, height, format, usage);
|
||||
|
||||
bo = calloc(1, sizeof *bo);
|
||||
if (bo == NULL)
|
||||
return NULL;
|
||||
@@ -461,33 +530,7 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
bo->base.base.gbm = gbm;
|
||||
bo->base.base.width = width;
|
||||
bo->base.base.height = height;
|
||||
|
||||
if (usage & GBM_BO_USE_WRITE) {
|
||||
int ret;
|
||||
unsigned attrs[7] = {
|
||||
KMS_WIDTH, 64,
|
||||
KMS_HEIGHT, 64,
|
||||
KMS_BO_TYPE, KMS_BO_TYPE_SCANOUT_X8R8G8B8,
|
||||
KMS_TERMINATE_PROP_LIST,
|
||||
};
|
||||
|
||||
if (!(usage & GBM_BO_USE_CURSOR_64X64))
|
||||
return NULL;
|
||||
|
||||
if (dri->kms == NULL)
|
||||
return NULL;
|
||||
|
||||
ret = kms_bo_create(dri->kms, attrs, &bo->bo);
|
||||
if (ret < 0) {
|
||||
free(bo);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kms_bo_get_prop(bo->bo, KMS_PITCH, &bo->base.base.stride);
|
||||
kms_bo_get_prop(bo->bo, KMS_HANDLE, (unsigned*)&bo->base.base.handle);
|
||||
|
||||
return &bo->base.base;
|
||||
}
|
||||
bo->base.base.format = format;
|
||||
|
||||
switch (format) {
|
||||
case GBM_FORMAT_RGB565:
|
||||
@@ -594,10 +637,6 @@ dri_device_create(int fd)
|
||||
dri->base.type = GBM_DRM_DRIVER_TYPE_DRI;
|
||||
dri->base.base.name = "drm";
|
||||
|
||||
kms_create(fd, &dri->kms);
|
||||
if (dri->kms == NULL)
|
||||
goto err_kms;
|
||||
|
||||
ret = dri_screen_create(dri);
|
||||
if (ret)
|
||||
goto err_dri;
|
||||
@@ -605,9 +644,8 @@ dri_device_create(int fd)
|
||||
return &dri->base.base;
|
||||
|
||||
err_dri:
|
||||
kms_destroy(&dri->kms);
|
||||
err_kms:
|
||||
free(dri);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "gbmint.h"
|
||||
|
||||
#include "libkms.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "common_drm.h"
|
||||
|
||||
@@ -43,9 +41,6 @@ struct gbm_dri_surface;
|
||||
struct gbm_dri_device {
|
||||
struct gbm_drm_device base;
|
||||
|
||||
/* Only used for cursors */
|
||||
struct kms_driver *kms;
|
||||
|
||||
void *driver;
|
||||
|
||||
__DRIscreen *screen;
|
||||
@@ -79,7 +74,8 @@ struct gbm_dri_bo {
|
||||
__DRIimage *image;
|
||||
|
||||
/* Only used for cursors */
|
||||
struct kms_bo *bo;
|
||||
uint32_t handle, size;
|
||||
void *map;
|
||||
};
|
||||
|
||||
struct gbm_dri_surface {
|
||||
|
@@ -4039,6 +4039,12 @@ ast_uniform_block::hir(exec_list *instructions,
|
||||
struct gl_uniform_block *ubo = get_next_uniform_block(state);
|
||||
ubo->Name = ralloc_strdup(state->uniform_blocks, this->block_name);
|
||||
|
||||
if (!state->symbols->add_uniform_block(ubo)) {
|
||||
YYLTYPE loc = this->get_location();
|
||||
_mesa_glsl_error(&loc, state, "Uniform block name `%s' already taken in "
|
||||
"the current scope.\n", ubo->Name);
|
||||
}
|
||||
|
||||
unsigned int num_variables = 0;
|
||||
foreach_list_typed(ast_declarator_list, decl_list, link, &declarations) {
|
||||
foreach_list_const(node, &decl_list->declarations) {
|
||||
|
@@ -26,6 +26,7 @@ AM_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/mapi \
|
||||
-I$(top_srcdir)/src/mesa/ \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
$(LIBRARY_INCLUDES) \
|
||||
$(DEFINES) \
|
||||
$(LIBRARY_DEFINES) \
|
||||
|
@@ -67,7 +67,7 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner);
|
||||
%option stack
|
||||
%option never-interactive
|
||||
|
||||
%x DONE COMMENT UNREACHABLE SKIP
|
||||
%x DONE COMMENT UNREACHABLE SKIP DEFINE
|
||||
|
||||
SPACE [[:space:]]
|
||||
NONSPACE [^[:space:]]
|
||||
@@ -184,14 +184,22 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
|
||||
glcpp_error(yylloc, yyextra, "#error%s", p);
|
||||
}
|
||||
|
||||
{HASH}define{HSPACE}+/{IDENTIFIER}"(" {
|
||||
{HASH}define{HSPACE}+ {
|
||||
yyextra->space_tokens = 0;
|
||||
return HASH_DEFINE_FUNC;
|
||||
yy_push_state(DEFINE, yyscanner);
|
||||
return HASH_DEFINE;
|
||||
}
|
||||
|
||||
{HASH}define {
|
||||
yyextra->space_tokens = 0;
|
||||
return HASH_DEFINE_OBJ;
|
||||
<DEFINE>{IDENTIFIER}/"(" {
|
||||
yy_pop_state(yyscanner);
|
||||
yylval->str = ralloc_strdup (yyextra, yytext);
|
||||
return FUNC_IDENTIFIER;
|
||||
}
|
||||
|
||||
<DEFINE>{IDENTIFIER} {
|
||||
yy_pop_state(yyscanner);
|
||||
yylval->str = ralloc_strdup (yyextra, yytext);
|
||||
return OBJ_IDENTIFIER;
|
||||
}
|
||||
|
||||
{HASH}undef {
|
||||
|
@@ -160,10 +160,10 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
|
||||
%lex-param {glcpp_parser_t *parser}
|
||||
|
||||
%expect 0
|
||||
%token COMMA_FINAL DEFINED ELIF_EXPANDED HASH HASH_DEFINE_FUNC HASH_DEFINE_OBJ HASH_ELIF HASH_ELSE HASH_ENDIF HASH_IF HASH_IFDEF HASH_IFNDEF HASH_LINE HASH_UNDEF HASH_VERSION IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING LINE_EXPANDED NEWLINE OTHER PLACEHOLDER SPACE
|
||||
%token COMMA_FINAL DEFINED ELIF_EXPANDED HASH HASH_DEFINE FUNC_IDENTIFIER OBJ_IDENTIFIER HASH_ELIF HASH_ELSE HASH_ENDIF HASH_IF HASH_IFDEF HASH_IFNDEF HASH_LINE HASH_UNDEF HASH_VERSION IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING LINE_EXPANDED NEWLINE OTHER PLACEHOLDER SPACE
|
||||
%token PASTE
|
||||
%type <ival> expression INTEGER operator SPACE integer_constant
|
||||
%type <str> IDENTIFIER INTEGER_STRING OTHER
|
||||
%type <str> IDENTIFIER FUNC_IDENTIFIER OBJ_IDENTIFIER INTEGER_STRING OTHER
|
||||
%type <string_list> identifier_list
|
||||
%type <token> preprocessing_token conditional_token
|
||||
%type <token_list> pp_tokens replacement_list text_line conditional_tokens
|
||||
@@ -227,13 +227,13 @@ expanded_line:
|
||||
;
|
||||
|
||||
control_line:
|
||||
HASH_DEFINE_OBJ IDENTIFIER replacement_list NEWLINE {
|
||||
HASH_DEFINE OBJ_IDENTIFIER replacement_list NEWLINE {
|
||||
_define_object_macro (parser, & @2, $2, $3);
|
||||
}
|
||||
| HASH_DEFINE_FUNC IDENTIFIER '(' ')' replacement_list NEWLINE {
|
||||
| HASH_DEFINE FUNC_IDENTIFIER '(' ')' replacement_list NEWLINE {
|
||||
_define_function_macro (parser, & @2, $2, NULL, $5);
|
||||
}
|
||||
| HASH_DEFINE_FUNC IDENTIFIER '(' identifier_list ')' replacement_list NEWLINE {
|
||||
| HASH_DEFINE FUNC_IDENTIFIER '(' identifier_list ')' replacement_list NEWLINE {
|
||||
_define_function_macro (parser, & @2, $2, $4, $6);
|
||||
}
|
||||
| HASH_UNDEF IDENTIFIER NEWLINE {
|
||||
@@ -327,12 +327,12 @@ control_line:
|
||||
glcpp_warning(& @1, parser, "ignoring illegal #elif without expression");
|
||||
}
|
||||
}
|
||||
| HASH_ELSE NEWLINE {
|
||||
| HASH_ELSE {
|
||||
_glcpp_parser_skip_stack_change_if (parser, & @1, "else", 1);
|
||||
}
|
||||
| HASH_ENDIF NEWLINE {
|
||||
} NEWLINE
|
||||
| HASH_ENDIF {
|
||||
_glcpp_parser_skip_stack_pop (parser, & @1);
|
||||
}
|
||||
} NEWLINE
|
||||
| HASH_VERSION integer_constant NEWLINE {
|
||||
macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
|
||||
if (macro) {
|
||||
@@ -1843,7 +1843,7 @@ glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser)
|
||||
if (ret == NEWLINE)
|
||||
parser->in_control_line = 0;
|
||||
}
|
||||
else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC ||
|
||||
else if (ret == HASH_DEFINE ||
|
||||
ret == HASH_UNDEF || ret == HASH_IF ||
|
||||
ret == HASH_IFDEF || ret == HASH_IFNDEF ||
|
||||
ret == HASH_ELIF || ret == HASH_ELSE ||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user