.editorconfig | 2 .travis.yml | 39 Android.mk | 106 CMakeLists.txt | 97 README.markdown | 9 appveyor.yml | 7 cli/CMakeLists.txt | 4 cli/cli.hpp | 2 cli/cli_dump_images.cpp | 10 cli/cli_leaks.cpp | 2 cli/cli_main.cpp | 18 cli/cli_repack.cpp | 3 cli/cli_resources.cpp | 4 cli/cli_trace.cpp | 30 cli/cli_trim_auto.cpp | 432 cli/cli_trim_auto_analyzer.cpp | 767 cli/cli_trim_auto_analyzer.hpp | 114 cmake/FindDirectX.cmake | 121 cmake/Windows10SDK.cmake | 53 compat/d3derr.hpp | 21 compat/winsdk_compat.h | 2010 debian/apitrace-gui.lintian-overrides | 2 debian/apitrace.lintian-overrides | 2 debian/changelog | 12 debian/control | 10 debian/patches/highlight.py-shebang | 9 debian/patches/series | 1 dispatch/CMakeLists.txt | 19 dispatch/d3d9imports.hpp | 7 dispatch/glimports.hpp | 7 dispatch/glproc.py | 28 dispatch/glproc_egl.cpp | 6 dispatch/glproc_gl.cpp | 2 docs/Android.markdown | 45 docs/FORMAT.markdown | 43 docs/INSTALL.markdown | 58 docs/NEWS.markdown | 9 docs/USAGE.markdown | 20 gui/CMakeLists.txt | 7 gui/androiddevicedialog.cpp | 4 gui/trimprocess.cpp | 2 gui/ui/mainwindow.ui | 8 helpers/d3d9size.hpp | 12 helpers/d3dcommonsize.hpp | 18 helpers/halffloat.hpp | 133 inject/CMakeLists.txt | 29 inject/injectee.cpp | 1205 inject/injectee_iat.cpp | 1222 inject/injectee_mhook.cpp | 864 inject/injector.cpp | 26 lib/guids/guids_entries.h | 1 lib/highlight/highlight.cpp | 79 lib/os/os_posix.cpp | 2 lib/os/os_thread.hpp | 86 lib/trace/CMakeLists.txt | 2 lib/trace/trace_file_brotli.cpp | 8 lib/trace/trace_parser.cpp | 79 lib/trace/trace_writer_local.cpp | 9 retrace/CMakeLists.txt | 9 retrace/Info.plist | 20 retrace/d3d8state.cpp | 180 retrace/d3d9retrace.py | 36 retrace/d3d9state.cpp | 206 retrace/d3d9state.hpp | 7 retrace/d3d9state_formats.cpp | 191 retrace/d3d9state_images.cpp | 50 retrace/d3dretrace.hpp | 9 retrace/ddrawretrace.py | 2 retrace/dxgiretrace.py | 86 retrace/glretrace.hpp | 10 retrace/glretrace.py | 16 retrace/glretrace_egl.cpp | 1 retrace/glretrace_glx.cpp | 9 retrace/glretrace_main.cpp | 36 retrace/glretrace_wgl.cpp | 41 retrace/glretrace_wgl.hpp | 4 retrace/glretrace_wgl_font.cpp | 4896 retrace/glretrace_wgl_font_bitmaps.cpp | 4896 retrace/glretrace_wgl_font_outlines.cpp |124843 +++++++++++++++++ retrace/glretrace_ws.cpp | 18 retrace/glstate.hpp | 5 retrace/glstate_formats.cpp | 9 retrace/glstate_images.cpp | 111 retrace/glstate_shaders.cpp | 29 retrace/glws.hpp | 13 retrace/glws_cocoa.mm | 96 retrace/glws_egl_android.cpp | 18 retrace/glws_egl_xlib.cpp | 50 retrace/glws_glx.cpp | 40 retrace/glws_waffle.cpp | 5 retrace/glws_wgl.cpp | 26 retrace/glws_xlib.cpp | 76 retrace/metric_backend_amd_perfmon.hpp | 1 retrace/metric_backend_intel_perfquery.hpp | 2 retrace/metric_helper.cpp | 8 retrace/mmap_allocator.hpp | 4 retrace/retrace.hpp | 10 retrace/retrace.py | 10 retrace/retrace_main.cpp | 74 retrace/retrace_stdc.cpp | 65 retrace/retrace_swizzle.cpp | 91 retrace/retrace_swizzle.hpp | 14 scripts/snapdiff.py | 18 specs/d3d10.py | 2 specs/d3d11.py | 2 specs/d3d11sdklayers.py | 2 specs/eglapi.py | 8 specs/glapi.py | 6 specs/glparams.py | 64 specs/gltypes.py | 7 specs/glxapi.py | 8 specs/stdapi.py | 6 thirdparty/brotli/CMakeLists.txt | 98 thirdparty/brotli/LICENSE | 2 thirdparty/brotli/README.md | 19 thirdparty/brotli/common/constants.h | 47 thirdparty/brotli/common/dictionary.c | 9474 + thirdparty/brotli/common/dictionary.h | 29 thirdparty/brotli/common/port.h | 107 thirdparty/brotli/common/types.h | 58 thirdparty/brotli/dec/bit_reader.c | 10 thirdparty/brotli/dec/bit_reader.h | 42 thirdparty/brotli/dec/context.h | 2 thirdparty/brotli/dec/decode.c | 930 thirdparty/brotli/dec/decode.h | 172 thirdparty/brotli/dec/dictionary.c | 9466 - thirdparty/brotli/dec/dictionary.h | 38 thirdparty/brotli/dec/huffman.c | 10 thirdparty/brotli/dec/huffman.h | 27 thirdparty/brotli/dec/port.h | 105 thirdparty/brotli/dec/prefix.h | 8 thirdparty/brotli/dec/state.c | 40 thirdparty/brotli/dec/state.h | 57 thirdparty/brotli/dec/transform.h | 2 thirdparty/brotli/dec/types.h | 38 thirdparty/brotli/enc/backward_references.c | 892 thirdparty/brotli/enc/backward_references.cc | 858 thirdparty/brotli/enc/backward_references.h | 187 thirdparty/brotli/enc/backward_references_inc.h | 147 thirdparty/brotli/enc/bit_cost.c | 35 thirdparty/brotli/enc/bit_cost.h | 144 thirdparty/brotli/enc/bit_cost_inc.h | 127 thirdparty/brotli/enc/block_encoder_inc.h | 33 thirdparty/brotli/enc/block_splitter.c | 197 thirdparty/brotli/enc/block_splitter.cc | 505 thirdparty/brotli/enc/block_splitter.h | 90 thirdparty/brotli/enc/block_splitter_inc.h | 432 thirdparty/brotli/enc/brotli_bit_stream.c | 1334 thirdparty/brotli/enc/brotli_bit_stream.cc | 1181 thirdparty/brotli/enc/brotli_bit_stream.h | 262 thirdparty/brotli/enc/cluster.c | 56 thirdparty/brotli/enc/cluster.h | 328 thirdparty/brotli/enc/cluster_inc.h | 315 thirdparty/brotli/enc/command.h | 159 thirdparty/brotli/enc/compress_fragment.c | 747 thirdparty/brotli/enc/compress_fragment.cc | 701 thirdparty/brotli/enc/compress_fragment.h | 85 thirdparty/brotli/enc/compress_fragment_two_pass.c | 557 thirdparty/brotli/enc/compress_fragment_two_pass.cc | 524 thirdparty/brotli/enc/compress_fragment_two_pass.h | 63 thirdparty/brotli/enc/compressor.cc | 139 thirdparty/brotli/enc/compressor.h | 161 thirdparty/brotli/enc/context.h | 198 thirdparty/brotli/enc/dictionary.cc | 9466 - thirdparty/brotli/enc/dictionary.h | 41 thirdparty/brotli/enc/dictionary_hash.h | 14 thirdparty/brotli/enc/encode.c | 1562 thirdparty/brotli/enc/encode.cc | 1175 thirdparty/brotli/enc/encode.h | 408 thirdparty/brotli/enc/encode_parallel.cc | 312 thirdparty/brotli/enc/encode_parallel.h | 15 thirdparty/brotli/enc/entropy_encode.c | 501 thirdparty/brotli/enc/entropy_encode.cc | 480 thirdparty/brotli/enc/entropy_encode.h | 196 thirdparty/brotli/enc/entropy_encode_static.h | 91 thirdparty/brotli/enc/fast_log.h | 46 thirdparty/brotli/enc/find_match_length.h | 43 thirdparty/brotli/enc/hash.h | 1485 thirdparty/brotli/enc/hash_forgetful_chain_inc.h | 249 thirdparty/brotli/enc/hash_longest_match_inc.h | 241 thirdparty/brotli/enc/hash_longest_match_quickly_inc.h | 230 thirdparty/brotli/enc/histogram.c | 95 thirdparty/brotli/enc/histogram.cc | 67 thirdparty/brotli/enc/histogram.h | 132 thirdparty/brotli/enc/histogram_inc.h | 51 thirdparty/brotli/enc/literal_cost.c | 178 thirdparty/brotli/enc/literal_cost.cc | 165 thirdparty/brotli/enc/literal_cost.h | 26 thirdparty/brotli/enc/memory.c | 181 thirdparty/brotli/enc/memory.h | 62 thirdparty/brotli/enc/metablock.c | 515 thirdparty/brotli/enc/metablock.cc | 539 thirdparty/brotli/enc/metablock.h | 144 thirdparty/brotli/enc/metablock_inc.h | 183 thirdparty/brotli/enc/port.h | 120 thirdparty/brotli/enc/prefix.h | 95 thirdparty/brotli/enc/quality.h | 130 thirdparty/brotli/enc/ringbuffer.h | 259 thirdparty/brotli/enc/static_dict.c | 478 thirdparty/brotli/enc/static_dict.cc | 455 thirdparty/brotli/enc/static_dict.h | 41 thirdparty/brotli/enc/static_dict_lut.h |23260 +-- thirdparty/brotli/enc/streams.cc | 14 thirdparty/brotli/enc/streams.h | 64 thirdparty/brotli/enc/transform.h | 248 thirdparty/brotli/enc/types.h | 29 thirdparty/brotli/enc/utf8_util.c | 85 thirdparty/brotli/enc/utf8_util.cc | 83 thirdparty/brotli/enc/utf8_util.h | 25 thirdparty/brotli/enc/write_bits.h | 92 thirdparty/khronos/EGL/egl.h | 6 thirdparty/khronos/EGL/eglext.h | 48 thirdparty/khronos/EGL/eglplatform.h | 10 thirdparty/khronos/EGL/eglplatform.patch | 12 thirdparty/khronos/GL/glext.h | 79 thirdparty/khronos/GL/glxext.h | 16 thirdparty/khronos/GL/wglext.h | 6 thirdparty/khronos/GLES2/gl2.h | 6 thirdparty/khronos/GLES2/gl2ext.h | 183 thirdparty/khronos/KHR/khrplatform.h | 7 wrappers/CMakeLists.txt | 14 wrappers/d3d9trace.py | 14 wrappers/dlsym.cpp | 172 wrappers/egltrace.py | 67 wrappers/gltrace_state.cpp | 2 wrappers/glxtrace.py | 50 wrappers/glxtrace.version | 1 wrappers/memtrace.cpp | 29 wrappers/trace.py | 63 wrappers/wgltrace.py | 34 230 files changed, 170374 insertions(+), 50427 deletions(-)
New commits: commit 1ad7c7e095aaaa0abe40980c1389e97b2ca83c35 Author: Jordan Justen <[email protected]> Date: Thu Jun 22 11:59:04 2017 -0700 debian: Change maintainer to Debian X Strike Force Signed-off-by: Jordan Justen <[email protected]> diff --git a/debian/changelog b/debian/changelog index a5b9a93..d7eb957 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,15 @@ -apitrace (7.1+git20170623.d38a69d6+repack-1.1) UNRELEASED; urgency=medium +apitrace (7.1+git20170623.d38a69d6+repack-1) UNRELEASED; urgency=medium [ Timo Aaltonen ] * control: Drop libgles1-mesa-dev from build-depends. (Closes: #855119) [ Jordan Justen ] - * Non-maintainer upload + * Team upload * Reflow apitrace-gui description to fix lintian warning * Ignore binary-without-manpage lintian warnings * Upgrade Standards-Version to 4.0.0 + * Change maintainer to Debian X Strike Force -- Jordan Justen <[email protected]> Sun, 19 Feb 2017 20:45:47 -0800 diff --git a/debian/control b/debian/control index 4becf04..41755a4 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,8 @@ Source: apitrace Section: graphics Priority: optional -Maintainer: Christopher James Halse Rogers <[email protected]> +Maintainer: Debian X Strike Force <[email protected]> +Uploaders: Christopher James Halse Rogers <[email protected]> Build-Depends: debhelper (>= 9), cmake, commit 0b397aeb521b28043352fb02fad7e687e25d5d7b Author: Jordan Justen <[email protected]> Date: Sun Feb 19 21:57:23 2017 -0800 debian: Add highlight.py patch for lintian warning Fixes lintian warning: * W: apitrace: executable-not-elf-or-script usr/lib/apitrace/scripts/highlight.py Signed-off-by: Jordan Justen <[email protected]> diff --git a/debian/patches/highlight.py-shebang b/debian/patches/highlight.py-shebang new file mode 100644 index 0000000..acadbd7 --- /dev/null +++ b/debian/patches/highlight.py-shebang @@ -0,0 +1,9 @@ +diff --git a/scripts/highlight.py b/scripts/highlight.py +index ed3b54d4..cf0ddf5d 100644 +--- a/scripts/highlight.py ++++ b/scripts/highlight.py +@@ -1,3 +1,4 @@ ++#!/usr/bin/env python + ######################################################################### + # + # Copyright 2011-2012 Jose Fonseca diff --git a/debian/patches/series b/debian/patches/series index 13e1edd..31f390a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ use-system-gtest use-system-libbacktrace use-system-md5 use-system-snappy +highlight.py-shebang commit 4401e99df13440512bdf3833589b5afe54fbc06a Author: Jordan Justen <[email protected]> Date: Sun Feb 19 21:46:31 2017 -0800 debian: Upgrade Standards-Version to 4.0.0 Signed-off-by: Jordan Justen <[email protected]> diff --git a/debian/changelog b/debian/changelog index e0e3a50..a5b9a93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ apitrace (7.1+git20170623.d38a69d6+repack-1.1) UNRELEASED; urgency=medium * Non-maintainer upload * Reflow apitrace-gui description to fix lintian warning * Ignore binary-without-manpage lintian warnings + * Upgrade Standards-Version to 4.0.0 -- Jordan Justen <[email protected]> Sun, 19 Feb 2017 20:45:47 -0800 diff --git a/debian/control b/debian/control index c8af12d..4becf04 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ Build-Depends: libbsd-dev, libprocps-dev, libgtest-dev, -Standards-Version: 3.9.5 +Standards-Version: 4.0.0 Homepage: https://apitrace.github.io Vcs-Git: git://git.debian.org/pkg-xorg/app/apitrace.git Vcs-Browser: http://git.debian.org/?p=pkg-xorg/app/apitrace.git;a=summary commit e836dec4b161f8dad86047855622ec001159faa0 Author: Jordan Justen <[email protected]> Date: Sun Feb 19 21:44:35 2017 -0800 debian: Ignore binary-without-manpage lintian warnings Signed-off-by: Jordan Justen <[email protected]> diff --git a/debian/apitrace-gui.lintian-overrides b/debian/apitrace-gui.lintian-overrides new file mode 100644 index 0000000..1b48148 --- /dev/null +++ b/debian/apitrace-gui.lintian-overrides @@ -0,0 +1,2 @@ +# Apitrace upstream doesn't have a man page +apitrace-gui binary: binary-without-manpage diff --git a/debian/apitrace.lintian-overrides b/debian/apitrace.lintian-overrides new file mode 100644 index 0000000..07685b7 --- /dev/null +++ b/debian/apitrace.lintian-overrides @@ -0,0 +1,2 @@ +# Apitrace upstream doesn't have a man page +apitrace binary: binary-without-manpage diff --git a/debian/changelog b/debian/changelog index 6e3e52a..e0e3a50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ apitrace (7.1+git20170623.d38a69d6+repack-1.1) UNRELEASED; urgency=medium [ Jordan Justen ] * Non-maintainer upload * Reflow apitrace-gui description to fix lintian warning + * Ignore binary-without-manpage lintian warnings -- Jordan Justen <[email protected]> Sun, 19 Feb 2017 20:45:47 -0800 commit 329095549e1eab0660534329ea9894316f3c1dde Author: Jordan Justen <[email protected]> Date: Sun Feb 19 21:40:21 2017 -0800 debian: Reflow apitrace-gui description to less than 80 chars Fixes lintian extended-description-line-too-long warning. Signed-off-by: Jordan Justen <[email protected]> diff --git a/debian/changelog b/debian/changelog index bf92cf5..6e3e52a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ apitrace (7.1+git20170623.d38a69d6+repack-1.1) UNRELEASED; urgency=medium [ Jordan Justen ] * Non-maintainer upload + * Reflow apitrace-gui description to fix lintian warning -- Jordan Justen <[email protected]> Sun, 19 Feb 2017 20:45:47 -0800 diff --git a/debian/control b/debian/control index fd8f404..c8af12d 100644 --- a/debian/control +++ b/debian/control @@ -59,8 +59,9 @@ Description: tools for debugging OpenGL applications and drivers - graphical fro This makes it useful for identifying the sources of graphical corruption in OpenGL applications. . - This package contains a graphical frontend for the apitrace tool, making it easy to trace - applications and replay, compare, profile, and modify existing traces. + This package contains a graphical frontend for the apitrace tool, making it + easy to trace applications and replay, compare, profile, and modify existing + traces. Package: apitrace-tracers Architecture: any commit 23a12802d0e5b6d16d3cdb6ce9d6b26392866b22 Author: Jordan Justen <[email protected]> Date: Sun Feb 19 20:48:06 2017 -0800 debian: Start new changelog entry Signed-off-by: Jordan Justen <[email protected]> diff --git a/debian/changelog b/debian/changelog index e038730..bf92cf5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ -apitrace (7.1+git20160531.2d78bef0+repack-2) UNRELEASED; urgency=medium +apitrace (7.1+git20170623.d38a69d6+repack-1.1) UNRELEASED; urgency=medium + [ Timo Aaltonen ] * control: Drop libgles1-mesa-dev from build-depends. (Closes: #855119) - -- Timo Aaltonen <[email protected]> Tue, 07 Mar 2017 15:48:11 +0200 + [ Jordan Justen ] + * Non-maintainer upload + + -- Jordan Justen <[email protected]> Sun, 19 Feb 2017 20:45:47 -0800 apitrace (7.1+git20160531.2d78bef0+repack-1.1) unstable; urgency=medium commit 9f95d57b0f95058733af8d13d5ae8bee031bf15a Author: Jordan Justen <[email protected]> Date: Sun Jun 25 22:32:04 2017 -0700 Fix import of Upstream version 7.1+git20170622.b2754af2+repack Signed-off-by: Jordan Justen <[email protected]> diff --git a/.editorconfig b/.editorconfig index 069ceab..0f7094f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,7 +2,7 @@ root = true -[*.{c,h,cpp,hpp,cc,hh,inl,rc}] +[*.{c,h,cpp,hpp,cc,hh,inl,m,mm,rc}] indent_style = space indent_size = 4 diff --git a/.travis.yml b/.travis.yml index c8ffa5e..378017e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ branches: - /^appveyor.*$/ sudo: required -dist: trusty language: generic @@ -14,31 +13,44 @@ env: matrix: include: - os: linux + dist: trusty env: - LABEL="ubuntu64" - APT_REPOS="ppa:ubuntu-toolchain-r/test" - APT_PACKAGES="gcc-4.9 g++-4.9 libdwarf-dev libprocps3-dev qtbase5-dev qtdeclarative5-dev" - CMAKE_OPTIONS="-DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9 -DENABLE_GUI=1" - os: linux + dist: trusty env: - LABEL="ubuntu32" - APT_REPOS="ppa:ubuntu-toolchain-r/test" - APT_PACKAGES="gcc-4.9-multilib g++-4.9-multilib" - CMAKE_OPTIONS="-DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9 -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib32 -DENABLE_GUI=0" - os: linux + dist: trusty env: - - LABEL="mingw32" + - LABEL="ubuntu64-clang" - APT_PACKAGES="clang-3.6 libc++-dev libc++abi-dev libdwarf-dev libprocps3-dev qtbase5-dev qtdeclarative5-dev" - CMAKE_OPTIONS="-DCMAKE_C_COMPILER=clang-3.6 -DCMAKE_CXX_COMPILER=clang++-3.6 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DENABLE_GUI=1" - os: linux + dist: trusty env: - - LABEL="ubuntu64-clang" + - LABEL="mingw32" - APT_REPOS="ppa:tobydox/mingw-x-trusty" - APT_PACKAGES="mingw32-x-gcc" - MINGW_ROOT=/opt/mingw32 - MINGW_PREFIX=i686-w64-mingw32 - CMAKE_OPTIONS="-DCMAKE_TOOLCHAIN_FILE=Toolchain.cmake -Cdxsdk-master/Cache-mingw32.cmake -DENABLE_GUI=0" + - os: linux + dist: trusty + services: + - docker + env: + - LABEL="centos6" + - DOCKER_IMAGE=jrfonseca/centos6 + - CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_STATIC_LIBGCC=ON -DENABLE_STATIC_LIBSTDCXX=ON -DENABLE_STATIC_EXE=ON -DENABLE_GUI=OFF" - os: osx + osx_image: xcode8.2 env: - LABEL="mac64" - CMAKE_OPTIONS="-DENABLE_GUI=1" @@ -46,7 +58,8 @@ matrix: before_install: - | if [ "$APT_PACKAGES" ] - then for APT_REPO in $APT_REPOS + then + for APT_REPO in $APT_REPOS do sudo add-apt-repository -y $APT_REPO done @@ -61,8 +74,6 @@ before_install: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install qt5; export CMAKE_PREFIX_PATH=$(brew --prefix qt5); fi - if [ "$MINGW_ROOT" ]; then export PATH=$MINGW_ROOT/bin:$PATH; fi - cmake --version - -script: - | if [ "$MINGW_PREFIX" ] then @@ -76,9 +87,15 @@ script: echo "set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> Toolchain.cmake wget -q -O - https://github.com/apitrace/dxsdk/archive/master.tar.gz | tar -xz fi -- cmake -H. -Bbuild $CMAKE_OPTIONS -- cmake --build build --use-stderr -- -k -- cmake --build build --use-stderr --target check -- -k -- cmake --build build --use-stderr --target package -- -k +- | + if [ "$DOCKER_IMAGE" ] + then + docker pull "$DOCKER_IMAGE" + export DOCKER_RUN="docker run -v $PWD:$PWD -u $UID $DOCKER_IMAGE" + fi -# vim: set sw=2 et : +script: +- $DOCKER_RUN cmake -H$PWD -B$PWD/build $CMAKE_OPTIONS +- $DOCKER_RUN cmake --build $PWD/build --use-stderr -- -k +- $DOCKER_RUN cmake --build $PWD/build --use-stderr --target check -- -k +- $DOCKER_RUN cmake --build $PWD/build --use-stderr --target package -- -k diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 89e1c94..0000000 --- a/Android.mk +++ /dev/null @@ -1,106 +0,0 @@ -# -# This file helps integrate apitrace into FirefoxOS - when apitrace -# sources are put in B2GROOT/external/apitrace (including this Android.mk -# file), then the B2G build system will pick apitrace automatically and -# compile and install it into the system images seamlessly. -# -# This may work in other than FirefoxOS environments, but has not been tested. -# - -NDK := prebuilt/ndk/android-ndk-r7 - -ifeq ($(shell which cmake),) -$(shell echo "CMake not found, will not compile apitrace" >&2) -else # cmake -ifeq ($(wildcard $(NDK)),) -$(shell echo "CMake present but NDK not found at $(abspath $(NDK)), will not compile apitrace" >&2) -else # NDK -$(shell echo "CMake and NDK ($(abspath $(NDK))) found, will compile apitrace" >&2) - -ifeq ($(TARGET_ARCH),arm) -TOOLCHAIN := arm-linux-androideabi-4.4.x -endif - -ifeq ($(TARGET_ARCH),x86) -TOOLCHAIN := i686-android-linux-4.4.3 -endif - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := egltrace -LOCAL_MODULE_TAGS := debug eng - -include $(BUILD_SHARED_LIBRARY) - -# Below we hook the process of configuring and compiling apitrace, -# described in INSTALL.markdown (but we use the FirefoxOS's NDK). We override -# the $(linked_module): targed, which is already defined by -# $(BUILD_SHARED_LIBRARY) - by default it would want to compile the -# library out of some source files. -# We also override the target $(LOCAL_INSTALLED_MODULE): which installs -# the shared library because we want it installed in -# /lib/apitrace/wrappers/egltrace.so instead of /lib/egltrace.so because -# /bin/apitrace searches for the library in that directory. -# The rules will end up with /lib/apitrace/wrappers/egltrace.so and -# /bin/apitrace inside system.img. -MY_APITRACE_ROOT := $(TOPDIR)external/apitrace -MY_APITRACE_BUILD_ROOT_HOST := out/host/apitrace -MY_APITRACE_BUILD_ROOT_TARGET := out/target/apitrace - -MY_ANDROID_CMAKE_COMMIT := 556cc14296c226f753a3778d99d8b60778b7df4f - -android.toolchain.cmake: - curl -s -O https://raw.githubusercontent.com/taka-no-me/android-cmake/$(MY_ANDROID_CMAKE_COMMIT)/android.toolchain.cmake - -apitrace_private_target: android.toolchain.cmake - $(hide) # apitrace: run cmake for the host if it has not been run - $(hide) if [ ! -e $(MY_APITRACE_BUILD_ROOT_HOST)/Makefile ] ; then \ - cd $(MY_APITRACE_ROOT) && \ - cmake -H. -B../../$(MY_APITRACE_BUILD_ROOT_HOST) ; \ - fi - $(hide) # apitrace: compile for the host - $(hide) make -C $(MY_APITRACE_BUILD_ROOT_HOST) - $(hide) # apitrace: run cmake for android if it has not been run - $(hide) if [ ! -e $(MY_APITRACE_BUILD_ROOT_TARGET)/Makefile ] ; then \ - cd $(MY_APITRACE_ROOT) && \ - cmake \ - -DCMAKE_TOOLCHAIN_FILE=android.toolchain.cmake \ - -DANDROID_NDK=../../$(NDK) \ - -DANDROID_NDK_LAYOUT=LINARO \ - -DANDROID_TOOLCHAIN_NAME=$(TOOLCHAIN) \ - -DANDROID_API_LEVEL=9 \ - -DANDROID_NO_UNDEFINED=OFF \ - -DLIBRARY_OUTPUT_PATH_ROOT=../../$(MY_APITRACE_BUILD_ROOT_TARGET) \ - -H. -B../../$(MY_APITRACE_BUILD_ROOT_TARGET) ; \ - fi - $(hide) # apitrace: compile for android - $(hide) make -C $(MY_APITRACE_BUILD_ROOT_TARGET) - -$(linked_module): apitrace_private_target - $(hide) # apitrace: copy egltrace lib to where the build system expects it - $(hide) mkdir -p $(dir $@) - $(hide) cp $(MY_APITRACE_BUILD_ROOT_TARGET)/libs/*/egltrace$(TARGET_SHLIB_SUFFIX) $@ - -$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP) - @echo "Install (overridden): $@" - @mkdir -p $(dir $@)/apitrace/wrappers - $(hide) $(ACP) -fp $< $(dir $@)/apitrace/wrappers/egltrace$(TARGET_SHLIB_SUFFIX) - -# - -include $(CLEAR_VARS) - -LOCAL_MODULE := apitrace -LOCAL_MODULE_TAGS := debug eng - -include $(BUILD_EXECUTABLE) - -$(linked_module): apitrace_private_target - $(hide) # apitrace: copy apitrace executable to where the build system expects it - $(hide) mkdir -p $(dir $@) - $(hide) cp $(MY_APITRACE_BUILD_ROOT_TARGET)/apitrace$(TARGET_EXECUTABLE_SUFFIX) $@ - -endif # NDK -endif # cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index c67f0d2..4827926 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,10 @@ if (CMAKE_GENERATOR STREQUAL "Xcode") message (FATAL_ERROR "Xcode generator is not supported. Please build with \"Unix Makefiles\" or \"Ninja\" generators.") endif () +if (APPLE) + set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "Build architectures for OSX" FORCE) +endif () + # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html if (POLICY CMP0042) cmake_policy (SET CMP0042 NEW) @@ -21,19 +25,12 @@ project (apitrace) ############################################################################## # Options -# On Mac OS X build fat binaries with i386 and x86_64 architectures by default. -if (APPLE AND NOT CMAKE_OSX_ARCHITECTURES) - set (CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE) -endif () - # We use a cached string variable instead of the standard (boolean) OPTION # command so that we can default to auto-detecting optional depencies, while # still providing a mechanism to force/disable these optional dependencies, as # prescribed in http://www.gentoo.org/proj/en/qa/automagic.xml set (ENABLE_GUI "AUTO" CACHE STRING "Enable Qt GUI.") -option (WINDOWS_XP "Target Windows XP (on MinGW)" OFF) - option (ENABLE_CLI "Enable command Line interface." ON) option (ENABLE_EGL "Enable EGL support." ON) @@ -44,6 +41,12 @@ option (ENABLE_FRAME_POINTER "Disable frame pointer omission" ON) option (ENABLE_ASAN "Enable Address Sanitizer" OFF) +option (ENABLE_TESTS "Enable additional tests" OFF) + +if (ANDROID) + message (FATAL_ERROR "Android is no longer supported (https://git.io/vH2gW)") +endif () + # Proprietary Linux games often ship their own libraries (zlib, libstdc++, # etc.) in order to ship a single set of binaries across multiple # distributions. Given that apitrace wrapper modules will be loaded into those @@ -75,18 +78,19 @@ endif () ############################################################################## # Find dependencies +include (CheckCXXSourceCompiles) + # Check for compiler TLS support. We don't use compiler TLS support on Windows # because, even if the compiler supports it, Windows XP does not support TLS on # DLLs. if (NOT WIN32) - include (CheckCXXSourceCompiles) check_cxx_source_compiles ("__thread int i; int main() { return 0; }" HAVE_COMPILER_TLS) if (NOT HAVE_COMPILER_TLS) message (FATAL_ERROR "C++ compiler does not support __thread keyword.") endif () endif () -set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) +list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) include (ConvenienceLibrary) include (InstallPDB) @@ -124,37 +128,20 @@ if (ENABLE_GUI) endif () if (MSVC) - if (${MSVC_VERSION} LESS 1800) - message (FATAL_ERROR "Visual Studio 2013 or later required") + if (${MSVC_VERSION} LESS 1900) + message (FATAL_ERROR "Visual Studio 2015 or later required") endif () - - include (Windows10SDK) endif () if (WIN32) - if (CMAKE_GENERATOR_TOOLSET MATCHES "_xp$") - set (WINDOWS_XP TRUE) - endif () - # http://msdn.microsoft.com/en-us/library/aa383745.aspx - if (WINDOWS_XP) - # Windows XP - add_definitions (-D_WIN32_WINNT=0x0501 -DWINVER=0x0501) - else () - # Windows 8 - add_definitions (-D_WIN32_WINNT=0x0602 -DWINVER=0x0602) - endif () + # Windows 8 + add_definitions (-D_WIN32_WINNT=0x0602 -DWINVER=0x0602) find_package (DirectX) - if (WINDOWS_XP) - set (DirectX_D3D11_3_INCLUDE_FOUND FALSE) - elseif (DEFINED MSVC_VERSION AND NOT DirectX_D3D11_3_INCLUDE_FOUND) - if (${MSVC_VERSION} LESS 1900) - message (FATAL_ERROR "Windows 10 SDK (https://dev.windows.com/en-us/downloads/windows-10-sdk) must be installed for D3D11.3 support") - else () - message (FATAL_ERROR "Windows 10 SDK must be selected (-DCMAKE_SYSTEM_VERSION=10.0) for D3D11.3 support") - endif () + if (MSVC AND NOT DirectX_D3D11_3_INCLUDE_FOUND) + message (FATAL_ERROR "Windows 10 SDK must be selected (-DCMAKE_SYSTEM_VERSION=10.0) for D3D11.3 support") endif () set (ENABLE_EGL false) @@ -319,14 +306,11 @@ else () add_compiler_flags (-fmessage-length=0) endif () -if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE MATCHES Rel) - message (WARNING - "\n" - " WARNING: NON-DEBUG BUILDS ON CLANG CAN TAKE UP TO 45MIN!\n" - " See https://github.com/apitrace/apitrace/issues/346\n" - "" - ) - execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 5) +if (APPLE) + check_cxx_source_compiles ("#include <AvailabilityMacros.h>\n#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200\nint main() { return 0; }\n#endif" HAVE_MACOSX_10_12_SDK) + if (NOT HAVE_MACOSX_10_12_SDK) + message (FATAL_ERROR "macOS 10.12 SDK or newer (i.e. Xcode 8.0 or newer) required") + endif () endif () if (MINGW) @@ -345,13 +329,23 @@ if (ENABLE_FRAME_POINTER) endif () endif () -# Enable Data Execution Prevention and Address Space Layout Randomization if (WIN32) + # Enable Data Execution Prevention and Address Space Layout Randomization if (MSVC) add_linker_flags (/NXCOMPAT /DYNAMICBASE) else () add_linker_flags (-Wl,--nxcompat -Wl,--dynamicbase) endif () + + # Use more than 2GB virtual memory address space for 32-bits processes + # where available (3GB on 32-bits Windows with 4GT, 4GB on 64-bits Windows) + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + if (MSVC) + add_linker_flags (/LARGEADDRESSAWARE) + else () + add_linker_flags (-Wl,--large-address-aware) + endif () + endif () endif () if (CMAKE_SYSTEM_NAME STREQUAL "Linux") @@ -467,7 +461,7 @@ include_directories (${ZLIB_INCLUDE_DIRS}) # version), adding its include dirs and libraries, and overwriting ZLIB_FOUND. # So if the system's ZLIB was did not meet the our requirements, then there's # no safe way to use the system's PNG library. -if (NOT WIN32 AND NOT ENABLE_STATIC_EXE AND ZLIB_FOUND) +if (NOT WIN32 AND NOT APPLE AND NOT ENABLE_STATIC_EXE AND ZLIB_FOUND) find_package (PNG) endif () if (NOT PNG_FOUND) @@ -488,6 +482,7 @@ if (WIN32) add_subdirectory (thirdparty/dxerr) add_subdirectory (thirdparty/directxtex) add_subdirectory (thirdparty/devcon) + add_subdirectory (thirdparty/mhook) endif () add_subdirectory (thirdparty/crc32c) @@ -556,7 +551,21 @@ endif () # GUI if (ENABLE_GUI AND Qt5Widgets_FOUND AND Qt5Network_FOUND) - add_subdirectory(gui) + add_subdirectory (gui) +endif () + + +############################################################################## +# Additional tests + +if (ENABLE_TESTS) + if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt") + message (EMIT_ERROR + "tests/CMakeLists.txt is missing, please do\n" + " git clone https://github.com/apitrace/apitrace-tests tests") + else () + add_subdirectory (tests) + endif () endif () @@ -577,7 +586,7 @@ install ( RENAME LICENSE.txt ) -set (CPACK_PACKAGE_VERSION_MAJOR "7") +set (CPACK_PACKAGE_VERSION_MAJOR "8") set (CPACK_PACKAGE_VERSION_MINOR "0") # Use current date in YYYYMMDD format as patch number diff --git a/README.markdown b/README.markdown index 31bb4ca..edc7ba9 100644 --- a/README.markdown +++ b/README.markdown @@ -14,6 +14,15 @@ About **apitrace** See the [apitrace homepage](http://apitrace.github.io/) for more details. +Status +====== + +TL;DR: Apitrace is still being maintained, but the maintainer has very little +time to work on it, so patches/issues/requests are addressed if/as time permits. + +Long version [here](https://jrfonseca.blogspot.co.uk/2016/10/apitrace-maintenance.html) + + Obtaining **apitrace** ====================== diff --git a/appveyor.yml b/appveyor.yml index ae5600d..2d7de67 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,13 +11,16 @@ init: shallow_clone: true +# https://www.appveyor.com/docs/build-environment/#build-worker-images +image: Visual Studio 2015 + environment: MSBUILD_FLAGS: /verbosity:minimal /maxcpucount matrix: - CMAKE_GENERATOR: "Visual Studio 14 2015" - QT5: C:\Qt\5.6\msvc2015 + QT5: C:\Qt\5.8\msvc2015 - CMAKE_GENERATOR: "Visual Studio 14 2015 Win64" - QT5: C:\Qt\5.6\msvc2015_64 + QT5: C:\Qt\5.8\msvc2015_64 matrix: fast_finish: true diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 0863e57..a018920 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -34,14 +34,12 @@ add_executable (apitrace cli_sed.cpp cli_trace.cpp cli_trim.cpp - cli_trim_auto.cpp - cli_trim_auto_analyzer.cpp cli_resources.cpp ) target_link_libraries (apitrace common - brotli_enc_bundled + brotli_dec brotli_enc brotli_common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} ${GETOPT_LIBRARIES} diff --git a/cli/cli.hpp b/cli/cli.hpp index f777122..fdd70dd 100644 --- a/cli/cli.hpp +++ b/cli/cli.hpp @@ -51,5 +51,3 @@ extern const Command retrace_command; extern const Command sed_command; extern const Command trace_command; extern const Command trim_command; -extern const Command trim_auto_command; - diff --git a/cli/cli_dump_images.cpp b/cli/cli_dump_images.cpp index bf3dc56..2c20c98 100644 --- a/cli/cli_dump_images.cpp +++ b/cli/cli_dump_images.cpp @@ -52,6 +52,7 @@ usage(void) " which dumps an image for each frame)\n" " --call-nos[=BOOL] use call numbers in image filenames,\n" " otherwise use sequental numbers (default=yes)\n" + " -m, --mrt dump all MRTs and depth/stencil\n" " -o, --output=PREFIX prefix to use in naming output files\n" " (default is trace filename without extension)\n" "\n"; @@ -63,13 +64,14 @@ enum { }; const static char * -shortOptions = "ho:"; +shortOptions = "hmo:"; const static struct option longOptions[] = { {"help", no_argument, 0, 'h'}, {"calls", required_argument, 0, CALLS_OPT}, {"call-nos", optional_argument, 0, CALL_NOS_OPT}, + {"mrt", no_argument, 0, 'm'}, {"output", required_argument, 0, 'o'}, {0, 0, 0, 0} }; @@ -82,6 +84,7 @@ command(int argc, char *argv[]) const char *traceName = NULL; const char *output = NULL; std::string call_nos; + bool mrt = false;

