apitrace: Changes to 'debian'
.dir-locals.el | 10
.emacs-dirvars | 14
.gitignore | 6
BUGS.markdown | 84
CMakeLists.txt | 377
DEVELOPMENT.markdown | 80
INSTALL.markdown | 13
NEWS.markdown | 8
README.markdown | 137
TODO.markdown | 80
cgltrace.py | 70
cli/CMakeLists.txt | 18
cli/cli.hpp | 52
cli/cli_diff.cpp | 109
cli/cli_diff_images.cpp | 90
cli/cli_diff_state.cpp | 102
cli/cli_dump.cpp | 206
cli/cli_main.cpp | 191
cli/cli_pager.cpp | 154
cli/cli_pager.hpp | 35
cli/cli_pickle.cpp | 219
cli/cli_repack.cpp | 116
cli/cli_trace.cpp | 121
cli/cli_trim.cpp | 130
common/formatter.hpp | 38
common/image.cpp | 24
common/image.hpp | 4
common/image_bmp.cpp | 4
common/image_png.cpp | 4
common/image_pnm.cpp | 4
common/json.hpp | 5
common/os.hpp | 32
common/os_binary.hpp | 60
common/os_posix.cpp | 188
common/os_process.hpp | 45
common/os_string.hpp | 343
common/os_thread.hpp | 163
common/os_time.hpp | 85
common/os_win32.cpp | 265
common/pickle.hpp | 310
common/trace_api.hpp | 46
common/trace_callset.cpp | 247
common/trace_callset.hpp | 167
common/trace_dump.cpp | 263
common/trace_dump.hpp | 73
common/trace_file.cpp | 130
common/trace_file.hpp | 36
common/trace_file_read.cpp | 59
common/trace_file_snappy.cpp | 423
common/trace_file_write.cpp | 50
common/trace_file_zlib.cpp | 167
common/trace_format.hpp | 60
common/trace_loader.cpp | 30
common/trace_loader.hpp | 14
common/trace_local_writer.cpp | 158
common/trace_lookup.hpp | 111
common/trace_model.cpp | 202
common/trace_model.hpp | 156
common/trace_model_writer.cpp | 127
common/trace_parser.cpp | 251
common/trace_parser.hpp | 23
common/trace_parser_flags.cpp | 165
common/trace_resource.cpp | 114
common/trace_resource.hpp | 50
common/trace_snappyfile.cpp | 338
common/trace_snappyfile.hpp | 106
common/trace_tools.hpp | 48
common/trace_tools_trace.cpp | 142
common/trace_writer.cpp | 67
common/trace_writer.hpp | 43
common/trace_writer_local.cpp | 196
common/trace_writer_local.hpp | 87
common/trace_writer_model.cpp | 131
compat.h | 26
d3d10trace.py | 6
d3d8trace.py | 12
d3d9imports.hpp | 4
d3d9trace.py | 53
d3dshader.cpp | 2
d3dshader.hpp | 2
ddrawtrace.py | 14
debian/apitrace-gl-retracer.install | 5
debian/apitrace-gl-retracer.manpages | 2
debian/apitrace-gl-tracer.install | 3
debian/apitrace-gl-tracer.install.in | 1
debian/changelog | 6
debian/clean | 1
debian/control | 7
debian/glretrace.1 | 36
debian/patches/01_use_system_libpng_snappy_zlib.diff | 71
debian/patches/02_update_gui_for_multiarch_location.diff | 35
debian/patches/series | 1
debian/rules | 16
debian/tracedump.1 | 15
dispatch.py | 29
dlltrace.py | 69
eglimports.hpp | 126
egltrace.py | 190
glcaps.cpp | 16
glimports.hpp | 47
glproc.py | 852 -
glproc_egl.cpp | 101
glproc_gl.cpp | 230
glretrace.hpp | 30
glretrace.py | 139
glretrace_cgl.cpp | 37
glretrace_egl.cpp | 274
glretrace_glx.cpp | 45
glretrace_main.cpp | 212
glretrace_wgl.cpp | 1168 -
glsize.hpp | 179
glsnapshot.cpp | 224
glsnapshot.hpp | 49
glstate.cpp | 149
glstate.hpp | 6
glstate.py | 121
gltrace.py | 283
glws.cpp | 62
glws.hpp | 87
glws_cocoa.mm | 270
glws_egl_xlib.cpp | 441
glws_glx.cpp | 299
glws_wgl.cpp | 145
glxtrace.py | 94
gui/CMakeLists.txt | 2
gui/apisurface.cpp | 22
gui/apisurface.h | 8
gui/apitrace.cpp | 28
gui/apitrace.h | 2
gui/apitracecall.cpp | 147
gui/apitracecall.h | 60
gui/argumentseditor.cpp | 115
gui/argumentseditor.h | 115
gui/main.cpp | 38
gui/mainwindow.cpp | 24
gui/mainwindow.h | 6
gui/resources/glreference-man.sh | 8
gui/resources/glreference-registry.sh | 30
gui/resources/glreference.tsv | 1269 +
gui/retracer.cpp | 57
gui/retracer.h | 9
gui/saverthread.cpp | 93
gui/settingsdialog.cpp | 11
gui/settingsdialog.h | 3
gui/traceloader.cpp | 28
gui/traceloader.h | 12
gui/traceprocess.cpp | 68
gui/ui/settings.ui | 23
retrace.cpp | 97
retrace.hpp | 61
retrace.py | 207
retrace_stdc.cpp | 238
scripts/highlight.py | 8
scripts/jsondiff.py | 163
scripts/retracediff.py | 46
scripts/snapdiff.py | 42
scripts/tracediff.sh | 6
scripts/tracerepack.py | 75
scripts/unpickle.py | 88
specs/cglapi.py | 21
specs/d3d.py | 52
specs/d3d10.py | 200
specs/d3d10misc.py | 30
specs/d3d8.py | 26
specs/d3d8types.py | 8
specs/d3d9.py | 58
specs/d3d9types.py | 644
specs/d3dtypes.py | 4
specs/ddraw.py | 8
specs/dxgi.py | 74
specs/dxgiformat.py | 25
specs/dxgitype.py | 4
specs/eglapi.py | 397
specs/glapi.py | 1216 -
specs/glesapi.py | 250
specs/glparams.py | 35
specs/gltypes.py | 45
specs/glxapi.py | 77
specs/scripts/README | 12
specs/scripts/README.markdown | 54
specs/scripts/cdecl.py | 43
specs/scripts/glspec.py | 10
specs/scripts/gltxt.py | 93
specs/scripts/reference-opengl-arb.sh | 30
specs/scripts/reference-opengl-man.sh | 8
specs/stdapi.py | 349
specs/wglapi.py | 12
specs/winapi.py | 34
thirdparty/getopt/CMakeLists.txt | 5
thirdparty/getopt/getopt.h | 82
thirdparty/getopt/getopt_long.c | 511
thirdparty/glext/GL/Makefile | 11
thirdparty/glext/GL/glext.h |11490 +++++++++++++++
thirdparty/glext/GL/glext.sed | 19
thirdparty/glext/GL/glxext.h | 993 +
thirdparty/glext/GL/wglext.h | 929 +
thirdparty/glext/Makefile | 8
thirdparty/glext/glext.h |11488 --------------
thirdparty/glext/glxext.h | 993 -
thirdparty/glext/wglext.h | 929 -
thirdparty/khr/EGL/egl.h | 329
thirdparty/khr/EGL/eglext.h | 335
thirdparty/khr/GLES/glext.h | 1073 +
thirdparty/khr/GLES2/gl2ext.h | 1138 +
thirdparty/snappy/.gitignore | 1
thirdparty/snappy/CMakeLists.txt | 29
thirdparty/snappy/ChangeLog | 168
thirdparty/snappy/NEWS | 12
thirdparty/snappy/config.h | 136
thirdparty/snappy/config.h.in | 108
thirdparty/snappy/format_description.txt | 8
thirdparty/snappy/snappy-stubs-internal.h | 42
thirdparty/snappy/snappy-stubs-public.h | 2
thirdparty/snappy/snappy.cc | 27
thirdparty/snappy/snappy_unittest.cc | 8
thirdparty/zlib/CMakeLists.txt | 20
thirdparty/zlib/ChangeLog | 355
thirdparty/zlib/README | 86
thirdparty/zlib/adler32.c | 38
thirdparty/zlib/compress.c | 5
thirdparty/zlib/crc32.c | 35
thirdparty/zlib/deflate.c | 268
thirdparty/zlib/deflate.h | 35
thirdparty/zlib/example.c | 4
thirdparty/zlib/gzclose.c | 25
thirdparty/zlib/gzguts.h | 132
thirdparty/zlib/gzio.c | 1026 -
thirdparty/zlib/gzlib.c | 537
thirdparty/zlib/gzread.c | 659
thirdparty/zlib/gzwrite.c | 531
thirdparty/zlib/infback.c | 93
thirdparty/zlib/inffast.c | 80
thirdparty/zlib/inffast.h | 4
thirdparty/zlib/inflate.c | 282
thirdparty/zlib/inflate.h | 31
thirdparty/zlib/inftrees.c | 63
thirdparty/zlib/inftrees.h | 27
thirdparty/zlib/minigzip.c | 134
thirdparty/zlib/trees.c | 93
thirdparty/zlib/trees.h | 4
thirdparty/zlib/uncompr.c | 4
thirdparty/zlib/zconf.h | 190
thirdparty/zlib/zlib.h | 1162 -
thirdparty/zlib/zutil.c | 32
thirdparty/zlib/zutil.h | 63
trace.py | 598
tracedump.cpp | 90
wgltrace.py | 37
248 files changed, 36888 insertions(+), 22325 deletions(-)
New commits:
commit 6724e015b1080acf404d08ad11288c4fb1c42450
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 22:00:03 2012 +1100
Drop obsolete manpages
diff --git a/debian/apitrace-gl-retracer.manpages b/debian/apitrace-gl-retracer.manpages
deleted file mode 100644
index 6e409f2..0000000
--- a/debian/apitrace-gl-retracer.manpages
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/glretrace.1
-debian/tracedump.1
diff --git a/debian/glretrace.1 b/debian/glretrace.1
deleted file mode 100644
index a165396..0000000
--- a/debian/glretrace.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH glretrace "1" "October 2011" "glretrace"
-.SH NAME
-glretrace \- replay traces recorded by glxtrace
-.SH SYNOPSIS
-.B glretrace
-[\fIOPTION\fR] \fITRACE\fR
-.SH DESCRIPTION
-Replay a trace of an OpenGL application previously recorded by glxtrace.
-.SH OPTIONS
-\fB\-b\fR
-benchmark mode (no error checking or warning messages)
-.TP
-\fB\-c\fR PREFIX
-compare against snapshots (generated with \-s option)
-.TP
-\fB\-db\fR
-use a double buffer visual (default)
-.TP
-\fB\-sb\fR
-use a single buffer visual
-.TP
-\fB\-s\fR PREFIX
-generate snapshots with filenames {PREFIX}xxxxxxxxxx.png;
-`\-` for PNM to standard output
-.TP
-\fB\-S\fR FREQUENCY
-snapshot frequency: frame (default), framebuffer, or draw
-.HP
-\fB\-v\fR
-verbose output
-.TP
-\fB\-D\fR CALLNO
-dump state at specific call no
-.TP
-\fB\-w\fR
-wait on final frame
diff --git a/debian/tracedump.1 b/debian/tracedump.1
deleted file mode 100644
index 93e9367..0000000
--- a/debian/tracedump.1
+++ /dev/null
@@ -1,15 +0,0 @@
-.TH tracedump "1" "October 2011" "tracedump"
-.SH NAME
-tracedump \- dump a list of OpenGL calls in a glxtrace trace
-.SH SYNOPSIS
-.B tracedump
-[\fIOPTION\fR] [\fITRACE\fR...]
-.SH DESCRIPTION
-Dump TRACE to standard output.
-.TP
-\fB\-\-no\-color\fR
-no colored syntax highlightint
-.TP
-\fB\-\-no\-colour\fR
-alias for \fB\-\-no\-color\fR
-.PP
commit 29545c125a0091bf650b35bde413ad87879bafe7
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 21:27:32 2012 +1100
Add needed binary dependencies on Python packages
diff --git a/debian/control b/debian/control
index 63ee1f4..a3d4fc0 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,8 @@ Architecture: any
Depends:
${shlibs:Depends},
${misc:Depends},
- ${python:Depends},
+ python,
+ python-imaging,
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: tools for debugging OpenGL applications and drivers - application tracer
diff --git a/debian/rules b/debian/rules
index e37e723..e8b7d93 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,4 +24,4 @@ override_dh_install:
dh_install --fail-missing
%:
- dh $@
+ dh $@
commit a19bb257dca313cb2899c7a51a643cc8e4f9bba4
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 17:35:53 2012 +1100
Pass ENABLE_EGL and ENABLE_GUI to cmake.
Let's try and ensure we fail early, rather than when trying to install
egltrace and qapitrace, shall we?
diff --git a/debian/rules b/debian/rules
index 10d8d1d..e37e723 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,9 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+override_dh_auto_configure:
+ dh_auto_configure -- -DENABLE_EGL=YES -DENABLE_GUI=YES
+
override_dh_install:
# Remove some files we don't want, then fail if there's anything left
-rm debian/tmp/usr/share/doc/apitrace/LICENSE
commit 99bc7c10ad732e81905541f6efeb9cf71242ded8
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 17:35:17 2012 +1100
Add python dependencies
diff --git a/debian/control b/debian/control
index 67898c9..63ee1f4 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Build-Depends:
libsnappy-dev,
libpng12-dev,
pkg-config,
+ python,
zlib1g-dev,
Standards-Version: 3.9.2
Homepage: https://github.com/apitrace/apitrace
@@ -26,6 +27,7 @@ Architecture: any
Depends:
${shlibs:Depends},
${misc:Depends},
+ ${python:Depends},
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: tools for debugging OpenGL applications and drivers - application tracer
commit 9112a646ee9a15c07e5cd8d4a50bb3366d8119a8
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 17:29:33 2012 +1100
Add pkg-config build-dep. Now it actually builds everything!
diff --git a/debian/control b/debian/control
index 6de506a..67898c9 100644
--- a/debian/control
+++ b/debian/control
@@ -14,6 +14,7 @@ Build-Depends:
libqjson-dev,
libsnappy-dev,
libpng12-dev,
+ pkg-config,
zlib1g-dev,
Standards-Version: 3.9.2
Homepage: https://github.com/apitrace/apitrace
commit 883d9f5d866137a131a9fbb77325baf25b14d015
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 16:42:53 2012 +1100
Add EGL/GLES build-dependencies for eglretrace
diff --git a/debian/control b/debian/control
index 0165fe9..6de506a 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,9 @@ Build-Depends:
debhelper (>= 8.1.3),
cmake,
libgl1-mesa-dev,
+ libegl1-mesa-dev,
+ libgles1-mesa-dev,
+ libgles2-mesa-dev,
libqt4-dev,
libqtwebkit-dev,
libqjson-dev,
commit 1e23e984e2382e49ee367677fb62479904a84127
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 16:39:03 2012 +1100
Don't delete apitrace-gl-tracer.install on clean.
Now that we don't generate it for multiarch paths on build, that's a bad thing.
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index ed631da..0000000
--- a/debian/clean
+++ /dev/null
@@ -1 +0,0 @@
-debian/apitrace-gl-tracer.install
commit a9a14004a605b0e5892a8f0a0de348e96265e71e
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 16:37:40 2012 +1100
Simplify rules file.
Now that we don't need to multiarch-pathify things can be much simpler
diff --git a/debian/rules b/debian/rules
index 552a0c9..10d8d1d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,23 +15,10 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-multiarch-install-files: debian/apitrace-gl-tracer.install
-
-debian/%.install : debian/%.install.in
- sed "s/\$$DEB_HOST_MULTIARCH/$(DEB_HOST_MULTIARCH)/g" < $< > $@
-
-binary: multiarch-install-files
- dh binary
-
-override_dh_auto_configure:
- dh_auto_configure -- -DDEB_HOST_MULTIARCH:string=$(DEB_HOST_MULTIARCH)
-
override_dh_install:
# Remove some files we don't want, then fail if there's anything left
- rm debian/tmp/usr/doc/LICENSE
+ -rm debian/tmp/usr/share/doc/apitrace/LICENSE
dh_install --fail-missing
%:
dh $@
-
-.PHONY: multiarch-install-files
commit c946feb978a0e772ff128c8d1bb5381c8fce2b05
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 16:36:25 2012 +1100
Rejig install files; install new apitrace tool in -gl-tracer
diff --git a/debian/apitrace-gl-retracer.install b/debian/apitrace-gl-retracer.install
index 7765ea1..6e90379 100644
--- a/debian/apitrace-gl-retracer.install
+++ b/debian/apitrace-gl-retracer.install
@@ -1,3 +1,4 @@
debian/qapitrace.desktop usr/share/applications
-usr/bin
-usr/doc/* usr/share/doc/apitrace-gl-retracer/
+usr/bin/eglretrace
+usr/bin/glretrace
+usr/bin/qapitrace
diff --git a/debian/apitrace-gl-tracer.install b/debian/apitrace-gl-tracer.install
new file mode 100644
index 0000000..de2df69
--- /dev/null
+++ b/debian/apitrace-gl-tracer.install
@@ -0,0 +1,3 @@
+usr/lib/apitrace
+usr/bin/apitrace
+usr/share/doc/* usr/share/doc/apitrace-gl-tracer/
diff --git a/debian/apitrace-gl-tracer.install.in b/debian/apitrace-gl-tracer.install.in
deleted file mode 100644
index 4c281f7..0000000
--- a/debian/apitrace-gl-tracer.install.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/glxtrace.so usr/lib/$DEB_HOST_MULTIARCH/apitrace-gl-tracer
commit 2bb9378919c38e7570f6dce3dc3ee1809d4d91d6
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 16:33:28 2012 +1100
Drop multi-arch patch for GUI tracer paths; apitrace now encodes them itself
diff --git a/debian/changelog b/debian/changelog
index ec540e1..af38e67 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,7 +3,5 @@ apitrace (2.0+git20120213.d8ea58f1-1) UNRELEASED; urgency=low
* Initial release (Closes: #636679, LP: #813848)
* debian/patches/01_use_system_libpng_snappy_zlib.diff:
- Use system libraries rather than bundled copies.
- * debain/patches/02_update_gui_for_multiarch_location.diff:
- - Also check for glxtrace.so in the multiarch path we install it to.
- -- Christopher James Halse Rogers <raof@ubuntu.com> Wed, 05 Oct 2011 18:07:13 +1100
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 13 Feb 2012 16:32:44 +1100
diff --git a/debian/patches/02_update_gui_for_multiarch_location.diff b/debian/patches/02_update_gui_for_multiarch_location.diff
deleted file mode 100644
index 8f02a52..0000000
--- a/debian/patches/02_update_gui_for_multiarch_location.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-Description: Also check multiarch path for glxtrace.so
-Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
-Forwarded: not-needed
-
-Index: apitrace/gui/CMakeLists.txt
-===================================================================
---- apitrace.orig/gui/CMakeLists.txt 2011-10-13 17:50:37.020019878 +1100
-+++ apitrace/gui/CMakeLists.txt 2011-10-13 17:54:42.528023700 +1100
-@@ -47,7 +47,9 @@
- link_directories(${LINK_DIRECTORIES} ${QJSON_LIBRARY_DIRS})
- include_directories(${QT_INCLUDES} ${QJSON_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..)
-
--add_definitions(-DBUILD_DIR="${CMAKE_BINARY_DIR}")
-+add_definitions(-DBUILD_DIR="${CMAKE_BINARY_DIR}"
-+ -DGLXTRACE_DIR="/usr/lib/${DEB_HOST_MULTIARCH}/apitrace-gl-tracer"
-+ )
-
- add_executable(qapitrace ${qapitrace_SRCS} ${qapitrace_UIS_H})
-
-Index: apitrace/gui/traceprocess.cpp
-===================================================================
---- apitrace.orig/gui/traceprocess.cpp 2011-10-13 17:49:09.724018520 +1100
-+++ apitrace/gui/traceprocess.cpp 2011-10-13 17:55:34.432024508 +1100
-@@ -15,6 +15,11 @@
- if (fi.exists())
- return libPath;
-
-+ libPath = QString::fromLatin1("%1/glxtrace.so").arg(GLXTRACE_DIR);
-+ fi = QFileInfo(libPath);
-+ if (fi.exists())
-+ return libPath;
-+
- libPath = QString::fromLatin1("/usr/local/lib/glxtrace.so");
- fi = QFileInfo(libPath);
- if (fi.exists())
diff --git a/debian/patches/series b/debian/patches/series
index b585887..21482db 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
01_use_system_libpng_snappy_zlib.diff
-02_update_gui_for_multiarch_location.diff
commit 65a49c37896246510011d1fc6635dd4df6214ff6
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 16:31:58 2012 +1100
Update system-libs patch
diff --git a/debian/patches/01_use_system_libpng_snappy_zlib.diff b/debian/patches/01_use_system_libpng_snappy_zlib.diff
index 4c3e8cf..6b5f844 100644
--- a/debian/patches/01_use_system_libpng_snappy_zlib.diff
+++ b/debian/patches/01_use_system_libpng_snappy_zlib.diff
@@ -4,9 +4,9 @@ Forwarded: not-needed
Index: apitrace/CMakeLists.txt
===================================================================
---- apitrace.orig/CMakeLists.txt 2011-10-04 17:58:27.000000000 +1100
-+++ apitrace/CMakeLists.txt 2011-10-04 18:50:27.343203180 +1100
-@@ -137,25 +137,20 @@
+--- apitrace.orig/CMakeLists.txt 2012-02-13 13:11:55.503382553 +1100
++++ apitrace/CMakeLists.txt 2012-02-13 13:11:58.827382375 +1100
+@@ -155,25 +155,20 @@
# - on unices to prevent symbol collisions when tracing applications that link
# against other versions of these libraries
@@ -40,3 +40,68 @@ Index: apitrace/CMakeLists.txt
include_directories (${PNG_INCLUDE_DIR})
add_definitions (${PNG_DEFINITIONS})
link_libraries (${PNG_LIBRARIES})
+Index: apitrace/common/trace_file_zlib.cpp
+===================================================================
+--- apitrace.orig/common/trace_file_zlib.cpp 2012-02-13 13:11:34.000000000 +1100
++++ apitrace/common/trace_file_zlib.cpp 2012-02-13 13:12:12.107381666 +1100
+@@ -31,11 +31,11 @@
+ #include <string.h>
+
+ #include <zlib.h>
+-#include <gzguts.h>
+
+ #include "os.hpp"
+
+ #include <iostream>
++#include <stdio.h>
+
+
+ using namespace trace;
+@@ -60,6 +60,7 @@
+ virtual bool rawSkip(size_t length);
+ virtual int rawPercentRead();
+ private:
++ int raw_fd;
+ void *m_gzFile;
+ double m_endOffset;
+ };
+@@ -78,18 +79,23 @@
+
+ bool ZLibFile::rawOpen(const std::string &filename, File::Mode mode)
+ {
+- m_gzFile = gzopen(filename.c_str(),
+- (mode == File::Write) ? "wb" : "rb");
++ FILE *file = fopen(filename.c_str(),
++ (mode == File::Write) ? "wb" : "rb") ;
++ if (file == NULL)
++ return false;
++
++ int raw_fd = fileno(file);
++ m_gzFile = gzdopen(raw_fd,
++ (mode == File::Write) ? "wb" : "rb");
+
+ if (mode == File::Read && m_gzFile) {
+ //XXX: unfortunately zlib doesn't support
+ // SEEK_END or we could've done:
+ //m_endOffset = gzseek(m_gzFile, 0, SEEK_END);
+ //gzrewind(m_gzFile);
+- gz_state *state = (gz_state *)m_gzFile;
+- off_t loc = lseek(state->fd, 0, SEEK_CUR);
+- m_endOffset = lseek(state->fd, 0, SEEK_END);
+- lseek(state->fd, loc, SEEK_SET);
++ off_t loc = lseek(raw_fd, 0, SEEK_CUR);
++ m_endOffset = lseek(raw_fd, 0, SEEK_END);
++ lseek(raw_fd, loc, SEEK_SET);
+ }
+
+ return m_gzFile != NULL;
+@@ -141,8 +147,7 @@
+
+ int ZLibFile::rawPercentRead()
+ {
+- gz_state *state = (gz_state *)m_gzFile;
+- return 100 * (lseek(state->fd, 0, SEEK_CUR) / m_endOffset);
++ return 100 * (lseek(raw_fd, 0, SEEK_CUR) / m_endOffset);
+ }
+
+
commit 16bb5c7c0eaee57d06d51a2f493aeee089f14743
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Mon Feb 13 11:39:28 2012 +1100
Update changelog for new snapshot
diff --git a/debian/changelog b/debian/changelog
index 0241eae..ec540e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-apitrace (2.0-1) UNRELEASED; urgency=low
+apitrace (2.0+git20120213.d8ea58f1-1) UNRELEASED; urgency=low
* Initial release (Closes: #636679, LP: #813848)
* debian/patches/01_use_system_libpng_snappy_zlib.diff:
commit d8ea58f1e7d2e0dd9cabd085eef6f8b227e88652
Author: José Fonseca <jose.r.fonseca@gmail.com>
Date: Thu Feb 9 14:35:27 2012 +0000
Allow to specify output file on retracediff
diff --git a/scripts/retracediff.py b/scripts/retracediff.py
index 3495975..ee5730a 100755
--- a/scripts/retracediff.py
+++ b/scripts/retracediff.py
@@ -80,16 +80,16 @@ class Setup:
p.wait()
return state.get('parameters', {})
- def diff_state(self, ref_call_no, src_call_no):
+ def diff_state(self, ref_call_no, src_call_no, stream):
'''Compare the state between two calls.'''
ref_state = self.dump_state(ref_call_no)
src_state = self.dump_state(src_call_no)
- sys.stdout.flush()
- differ = jsondiff.Differ(sys.stdout)
+ stream.flush()
+ differ = jsondiff.Differ(stream)
differ.visit(ref_state, src_state)
- sys.stdout.write('\n')
+ stream.write('\n')
def read_pnm(stream):
@@ -159,6 +159,10 @@ def main():
'-S', '--snapshot-frequency', metavar='CALLSET',
type="string", dest="snapshot_frequency", default='draw',
help="calls to compare [default: %default]")
+ optparser.add_option(
+ '-o', '--output', metavar='FILE',
+ type="string", dest="output",
+ help="output file [default: stdout]")
(options, args) = optparser.parse_args(sys.argv[1:])
ref_env = parse_env(optparser, options.ref_env)
@@ -169,7 +173,12 @@ def main():
ref_setup = Setup(args, ref_env)
src_setup = Setup(args, src_env)
- highligher = Highlighter(sys.stdout)
+ if options.output:
+ output = open(options.output, 'wt')
+ else:
+ output = sys.stdout
+
+ highligher = Highlighter(output)
highligher.write('call\tprecision\n')
@@ -217,7 +226,7 @@ def main():
src_image.save(prefix + '.src.png')
comparer.write_diff(prefix + '.diff.png')
if last_bad < last_good:
- src_setup.diff_state(last_good, call_no)
+ src_setup.diff_state(last_good, call_no, output)
last_bad = call_no
else:
last_good = call_no
commit 4d73f8586100da4bbf5dcfad94828ae0b227ec05
Author: José Fonseca <jose.r.fonseca@gmail.com>
Date: Thu Feb 9 14:04:17 2012 +0000
Fix highlight.py on Windows.
diff --git a/scripts/highlight.py b/scripts/highlight.py
index 986bd1d..db6a37f 100644
--- a/scripts/highlight.py
+++ b/scripts/highlight.py
@@ -158,12 +158,12 @@ class WindowsConsoleHighlighter(PlainHighlighter):
import ctypes
self._handle = ctypes.windll.kernel32.GetStdHandle(nStdHandle)
else:
- self._handle = INVALID_HANDLE_VALUE
+ self._handle = self.INVALID_HANDLE_VALUE
self._attribute = self.white
def _setAttribute(self, attr):
- if self._handle != INVALID_HANDLE_VALUE:
+ if self._handle != self.INVALID_HANDLE_VALUE:
import ctypes
ctypes.windll.kernel32.SetConsoleTextAttribute(self._handle, attr)
self._attribute = attr
@@ -172,11 +172,11 @@ class WindowsConsoleHighlighter(PlainHighlighter):
self._setAttribute(self._normal)
def color(self, color):
- intensity = self._attribute & FOREGROUND_INTENSITY
+ intensity = self._attribute & self.FOREGROUND_INTENSITY
self._setAttribute(color | intensity)
def bold(self):
- self._setAttribute(self._attribute | FOREGROUND_INTENSITY)
+ self._setAttribute(self._attribute | self.FOREGROUND_INTENSITY)
def italic(self):
pass
commit fcab8cb3072724eca6ab8618ec16704451891f69
Author: José Fonseca <jose.r.fonseca@gmail.com>
Date: Thu Feb 9 14:03:57 2012 +0000
Set binary mode when outputing PNM from glretrace via stdout.
diff --git a/cli/cli_pickle.cpp b/cli/cli_pickle.cpp
index 6af879f..c37c0f8 100644
--- a/cli/cli_pickle.cpp
+++ b/cli/cli_pickle.cpp
@@ -26,13 +26,10 @@
#include <string.h>
-#ifdef _WIN32
-#include <fcntl.h>
-#include <io.h>
-#endif
-
#include "pickle.hpp"
+#include "os_binary.hpp"
+
#include "cli.hpp"
#include "cli_pager.hpp"
@@ -189,14 +186,7 @@ command(int argc, char *argv[])
}
}
-#ifdef _WIN32
- // Set stdout in binary mode
- fflush(stdout);
- int mode = _setmode(_fileno(stdout), _O_BINARY);
- if (mode == -1) {
- std::cerr << "warning: failed to set stdout in binary mode\n";
- }
-#endif
+ os::setBinaryMode(stdout);
for (; i < argc; ++i) {
trace::Parser parser;
@@ -218,14 +208,6 @@ command(int argc, char *argv[])
}
}
-#ifdef _WIN32
- std::cout.flush();
- fflush(stdout);
- if (mode != -1) {
- _setmode(_fileno(stdout), mode);
- }
-#endif
-
return 0;
}
diff --git a/common/os_binary.hpp b/common/os_binary.hpp
new file mode 100644
index 0000000..876bdb6
--- /dev/null
+++ b/common/os_binary.hpp
@@ -0,0 +1,60 @@
+/**************************************************************************
+ *
+ * Copyright 2011 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/*
+ * Force binary mode standard files on Windows.
+ */
+
+#ifndef _OS_BINARY_HPP_
+#define _OS_BINARY_HPP_
+
+
+#include <stdio.h>
+
+#ifdef _WIN32
+#include <assert.h>
+
+#include <fcntl.h>
+#include <io.h>
+#endif
+
+
+namespace os {
+
+
+void setBinaryMode(FILE *fp) {
+#ifdef _WIN32
+ fflush(fp);
+ int mode = _setmode(_fileno(fp), _O_BINARY);
+ assert(mode != -1);
+#else
+ (void)fp;
+#endif
+}
+
+
+} /* namespace os */
+
+#endif /* _OS_BINARY_HPP_ */
diff --git a/glretrace_main.cpp b/glretrace_main.cpp
index 785d6fe..11f34ce 100644
--- a/glretrace_main.cpp
+++ b/glretrace_main.cpp
@@ -26,6 +26,7 @@
#include <string.h>
+#include "os_binary.hpp"
#include "os_string.hpp"
#include "os_time.hpp"
#include "image.hpp"
@@ -342,6 +343,7 @@ int main(int argc, char **argv)
snapshot_frequency = trace::CallSet(trace::FREQUENCY_FRAME);
}
if (snapshot_prefix[0] == '-' && snapshot_prefix[1] == 0) {
+ os::setBinaryMode(stdout);
retrace::verbosity = -2;
}
} else if (!strcmp(arg, "-S")) {
commit c086f0d24e6ca666a2567c092b2c368d7b683069
Author: José Fonseca <jose.r.fonseca@gmail.com>
Date: Thu Feb 9 13:15:15 2012 +0000
Allow to specify an alternative opengl32.dll when retracing.
diff --git a/glws_wgl.cpp b/glws_wgl.cpp
index 59f4786..5fddb79 100644
--- a/glws_wgl.cpp
+++ b/glws_wgl.cpp
@@ -23,6 +23,8 @@
*
**************************************************************************/
+#include <iostream>
+
#include "glproc.hpp"
#include "glws.hpp"
@@ -199,7 +201,18 @@ init(void) {
/*
* OpenGL library must be loaded by the time we call GDI.
*/
- __libGlHandle = LoadLibraryA("OPENGL32");
+
+ const char * libgl_filename = getenv("TRACE_LIBGL");
+
+ if (!libgl_filename) {
+ libgl_filename = "OPENGL32";
+ }
+
+ __libGlHandle = LoadLibraryA(libgl_filename);
+ if (!__libGlHandle) {
Reply to: