José Fonseca [Tue, 4 Dec 2012 03:17:55 +0000 (03:17 +0000)]
trim: Update for --exact -> --auto
Carl Worth [Thu, 16 Aug 2012 20:39:10 +0000 (13:39 -0700)]
Track updates to "apitrace trim" which no longer drops glBindTexture calls
We still aren't sure *why* apitrace trim should have to leave these
calls around, but we have a trace which only passes the
trim-stress-test if these calls are untrimmed. While that mystery
waits to be solved, make the test here compatible with the current
behavior.
Carl Worth [Wed, 15 Aug 2012 18:16:52 +0000 (11:16 -0700)]
glxsimple: Introduce an inter-frame texture dependency to exercise trim code
The previous glxsimple program was too simple as each frame was
entirely self-contained, (textures were created, initialized, and
referenced only within single frames).
For more realistic trimming, we create and initialize a texture in one
frame, then reference that texture in a later frame. This is a better
test to ensure that when trimming the first frame the texture creation
and initialization is not discarded.
Carl Worth [Wed, 15 Aug 2012 18:05:13 +0000 (11:05 -0700)]
Add stress tests from "apitrace trim".
The trim_stress directory makes it simple to stress test "apitrace
trim" by simply dropping new trace files into this directory. The
stress testing ensures that creating a new trace by trimming to a
single frame still generates the same image as that frame from the
original trace. It performs this test exhaustively for each frame of
each trace.
This testing ensures that trimming doesn't break the rendered results
of any frame. It does not do anything to test that trimming actually
discards anything. So the existing cli tests are still
independendently useful for verifying that expected content is
discarded.
Carl Worth [Wed, 15 Aug 2012 05:40:35 +0000 (22:40 -0700)]
Add a couple of tests for the --frames option of "apitrace trim"
Recent versions of apitrace added this new command-line option, so
it's useful to test that it actually works here.
Carl Worth [Tue, 14 Aug 2012 23:53:21 +0000 (16:53 -0700)]
Add test to ensure that unused shaders are dropped from a trace.
This tests functionality which was added even more recently to
"apitrace trim".
Carl Worth [Tue, 14 Aug 2012 23:50:00 +0000 (16:50 -0700)]
cli_driver: Rework driver script to preserve json-embedded whitespace
Previously, the line read from the script was being passed through
python's string.split() and string.join() functions. This was causing
sequences of successive whitespace characters to be collapsed down to
a single space, (in turn causing spurious failures when comparing
against expected output with successive whitespace).
Rework the driver to avoid munging the line past the separation of the
first command word.
Carl Worth [Tue, 14 Aug 2012 20:16:05 +0000 (13:16 -0700)]
Add test to ensure that unused textures are dropped from a trace.
This tests functionality recently added to "apitrace trim".
Carl Worth [Mon, 13 Aug 2012 02:42:35 +0000 (19:42 -0700)]
trim-head: New test to ensure "apitrace trim" drops all calls after range
This test ensures that all calls beyond the user-specified range are
correctly dropped. It also ensures that uninteresting calls are
trimmed, (since the glxsimple trace includes many of those).
Carl Worth [Mon, 13 Aug 2012 00:50:04 +0000 (17:50 -0700)]
Make glxsimple loop over all drawing methods multiple times
We now have 3 different drawing methods, each performed two times, and
in a total of 6 different colors. Looping over theese things twice
means that we can trim out a single frame of any one method and ensure
that "apitrace trim" has some non-trivial trimming to do both before
and after the frame of interest.
Carl Worth [Mon, 13 Aug 2012 00:16:57 +0000 (17:16 -0700)]
Add a third frame, this time drawing with a texture.
This will allow us to test that "apitrace trim" can trim out unused
textures.
Carl Worth [Mon, 13 Aug 2012 00:16:04 +0000 (17:16 -0700)]
glxsimple: Add a second frame drawing a solid color with GLSL.
This will allow us to test that we can trim out unused shaders.
Carl Worth [Mon, 13 Aug 2012 00:09:15 +0000 (17:09 -0700)]
Add the source of a very simple program using OpenGL through GLX.
We'll use this program to generate traces for use in the test suite,
(to exercise using "apitrace trim" to trim away unused textures,
shader programs, etc.).
There is a Makefile here, for convenience to any test writers wanting
to expand this program. Note that this Makefile us intentionally not
integrated with the cmake setup of the apitrace-tests project. That's
because it is not expected that this test program should be built or
run as a standard part of the test suite. Instead, useful trace files
generated from glxsimple will be directly committed to the
apitrace-tests repository.
Carl Worth [Mon, 13 Aug 2012 00:00:38 +0000 (17:00 -0700)]
cli: Use new --call-nos=no call to "apitrace dump-images" for consistent results
Recent "apitrace trim" is now dropping uninteresting calls by
default. This means that the call numbers of rendering operations are
changing. Consequently, image comparisons were failing not due to
image-content differences, but simply because the filenames (with
embedded call numbers in them) no longer matched.
We can avoid this problem by using the --call-nos=no option which was
added to "apitrace dump-images" in very recent versions.
Carl Worth [Sat, 11 Aug 2012 18:28:59 +0000 (11:28 -0700)]
Print commands to be executed by cli_driver.py
These aren't made visible unless CTEST_OUTPUT_ON_FAILURE in set, and
in that case it's quite convenient to see what the test was doing when
it failed.
Carl Worth [Thu, 9 Aug 2012 19:46:20 +0000 (12:46 -0700)]
Add a test to ensure "apitrace trim" performs proper dependency checking
Here we trim a trace by specifying (with --calls) only the final
glXSwapBuffers and then test that we can still produce a matching
image from the trace. This will only succeed if "apitrace trim"
performs dependency checking and includes many previous calls.
Of course, historically "apitrace trim" performed no such dependency
checks, so older versions of apitrace are expected to fail this test.
Carl Worth [Thu, 9 Aug 2012 00:18:32 +0000 (17:18 -0700)]
Add some comments to the recently-added cli tests.
It's easy enough to ignore lines starting with a '#' and that lets us
make these tests more self-documenting.
Carl Worth [Wed, 8 Aug 2012 23:18:21 +0000 (16:18 -0700)]
Add a test that "apitrace diff-images" flags mismatching images.
With this test we add a new EXPECT_FAILURE: attribute to the script
syntax to indicate that a particular apitrace command in the script is
expected to fail. This requires manually invoking the Popen
constructor rather than using subprocess.check_output, (which is
*close* to what we need but fails to assign the output when raising an
exception).
We also remove the globbing from the CMakeLists.txt file to get a
manual ordering of the tests (rather than executing in alphabetic
order).
Carl Worth [Wed, 8 Aug 2012 22:18:23 +0000 (15:18 -0700)]
Add a new 'cli' subdirectory for higher-level testing of apitrace CLI.
As described in the README, this new directory is for tests that
perform higher-level testing of the apitrace command-line interface
than either of the existing traces or apps directories.
Compared to traces, these new tests can do higher-level things like
dumping images from traces, comparing images, etc.
Compared to apps, these tests are intended to be portable across
multiple targets. (This isn't actually the case yet because commands
like "apitrace dump-images" currently work only on OpenGL. Also, even
when that is fixed, we will also need to then extend these tests to
have traces for each supported target for testing.)
In this commit, the only new test exercises "apitrace dump-images" and
"apitrace diff-images" on a simple trace file with one frame,
(tri.trace grabbed from apps/gl).
Carl Worth [Tue, 7 Aug 2012 22:47:53 +0000 (15:47 -0700)]
Add more README documentation on how existing test drivers are structured.
More than once, I've reverse-engineered how the test suite uses test
drivers (app_driver.py and tool_driver.py) to invoke scripts within
the apps/ and traces/ directory. In order to save my future-self some
work in doing this yet again, I've written some documentation in
README.markdown in each directory.
Hopefully this documentation will be useful for anyone wanting to
write additional tests.
José Fonseca [Tue, 27 Nov 2012 20:07:08 +0000 (20:07 +0000)]
apps/d3d11: Comprehensive test.
José Fonseca [Tue, 27 Nov 2012 20:06:40 +0000 (20:06 +0000)]
tracematch: Fix array parsing.
José Fonseca [Tue, 27 Nov 2012 16:21:52 +0000 (16:21 +0000)]
Update readme.
José Fonseca [Tue, 27 Nov 2012 14:24:23 +0000 (14:24 +0000)]
Remove left over debug statement.
José Fonseca [Tue, 27 Nov 2012 14:22:57 +0000 (14:22 +0000)]
Add a shader d3d9 tri test.
José Fonseca [Mon, 26 Nov 2012 19:50:35 +0000 (19:50 +0000)]
Precise d3d8-10.1 reference traces.
José Fonseca [Mon, 26 Nov 2012 19:49:17 +0000 (19:49 +0000)]
Fix parsing of floats without '.'
For example "1e+10"
José Fonseca [Mon, 26 Nov 2012 19:48:54 +0000 (19:48 +0000)]
Accept comments in reference traces.
José Fonseca [Mon, 26 Nov 2012 19:48:37 +0000 (19:48 +0000)]
Handle DOS line endings.
José Fonseca [Mon, 26 Nov 2012 19:48:04 +0000 (19:48 +0000)]
Retrace d3d8.
José Fonseca [Mon, 26 Nov 2012 13:52:50 +0000 (13:52 +0000)]
gl/map_buffer: Exit 1 when GL_ARB_map_buffer_range is not found.
José Fonseca [Mon, 26 Nov 2012 13:51:51 +0000 (13:51 +0000)]
Only invoke pkg_check_modules when PKG_CONFIG_FOUND is true.
José Fonseca [Mon, 26 Nov 2012 13:51:32 +0000 (13:51 +0000)]
Use clang on MacOSX.
José Fonseca [Sat, 24 Nov 2012 09:31:11 +0000 (09:31 +0000)]
Drop pragmas.
José Fonseca [Fri, 23 Nov 2012 22:15:01 +0000 (22:15 +0000)]
Rename checker.py -> tracematch.py
José Fonseca [Fri, 23 Nov 2012 08:34:44 +0000 (08:34 +0000)]
Improve gl map buffer test.
José Fonseca [Fri, 23 Nov 2012 07:52:17 +0000 (07:52 +0000)]
Use the new trace checker.
José Fonseca [Thu, 22 Nov 2012 22:03:17 +0000 (22:03 +0000)]
Further improvements to checker.
José Fonseca [Thu, 22 Nov 2012 09:55:15 +0000 (09:55 +0000)]
Improve checker.
José Fonseca [Thu, 22 Nov 2012 08:49:01 +0000 (08:49 +0000)]
Use 'apitrace retrace'
José Fonseca [Tue, 20 Nov 2012 17:06:43 +0000 (17:06 +0000)]
Specify rendertarget view descriptions.
To exercise unions.
José Fonseca [Wed, 14 Nov 2012 09:13:25 +0000 (09:13 +0000)]
Add new retrace apis.
José Fonseca [Thu, 25 Oct 2012 10:45:59 +0000 (11:45 +0100)]
Add a d3d10 level 9 test case.
José Fonseca [Sun, 20 May 2012 10:16:46 +0000 (11:16 +0100)]
Update state workarounds.
José Fonseca [Sat, 19 May 2012 19:53:37 +0000 (20:53 +0100)]
Test trimming.
José Fonseca [Mon, 14 May 2012 19:22:28 +0000 (20:22 +0100)]
Make tri_glsl test robust against attribute location changes.
José Fonseca [Mon, 14 May 2012 19:21:59 +0000 (20:21 +0100)]
Update for floating point precision changes.
José Fonseca [Wed, 9 May 2012 13:18:22 +0000 (14:18 +0100)]
Propagate apitrace trace error codes.
José Fonseca [Wed, 9 May 2012 11:01:33 +0000 (12:01 +0100)]
Ensure feature level 10.0 at minimum.
José Fonseca [Wed, 9 May 2012 10:14:08 +0000 (11:14 +0100)]
Allow to build samples without apitrace source tree.
José Fonseca [Wed, 9 May 2012 10:10:17 +0000 (11:10 +0100)]
Allow to build d3d samples independently of apitrace source.
José Fonseca [Wed, 9 May 2012 10:06:12 +0000 (11:06 +0100)]
Rename hlsl d3dcommon.
José Fonseca [Wed, 9 May 2012 09:56:29 +0000 (10:56 +0100)]
Attempt of a d3d11.1 test.
José Fonseca [Wed, 9 May 2012 09:28:25 +0000 (10:28 +0100)]
d3d10.1 sample.
José Fonseca [Wed, 9 May 2012 08:26:35 +0000 (09:26 +0100)]
Put HLSL shaders into their own directory.
José Fonseca [Wed, 9 May 2012 08:25:19 +0000 (09:25 +0100)]
Make OpenGL/GLUT/GLEW optional.
José Fonseca [Tue, 8 May 2012 21:26:17 +0000 (22:26 +0100)]
d3d11 test.
José Fonseca [Tue, 8 May 2012 18:26:03 +0000 (19:26 +0100)]
Cleanup d3d10 test.
José Fonseca [Fri, 4 May 2012 10:35:48 +0000 (11:35 +0100)]
Precompile d3d10 shader.
José Fonseca [Fri, 4 May 2012 10:28:05 +0000 (11:28 +0100)]
Fixup d3d10 test.
José Fonseca [Thu, 3 May 2012 23:52:13 +0000 (00:52 +0100)]
Prototype of d3d10 sample app.
Compiles but untested.
José Fonseca [Thu, 3 May 2012 13:21:55 +0000 (14:21 +0100)]
D3D7 sample.
José Fonseca [Thu, 3 May 2012 12:31:37 +0000 (13:31 +0100)]
D3D8 sample app.
José Fonseca [Thu, 3 May 2012 10:20:41 +0000 (11:20 +0100)]
Simple D3D9 app.
José Fonseca [Thu, 3 May 2012 10:15:12 +0000 (11:15 +0100)]
Handle CRLF lines in tool_driver.py
José Fonseca [Mon, 16 Apr 2012 19:10:19 +0000 (20:10 +0100)]
Update reference for GLboolean update.
José Fonseca [Sun, 18 Mar 2012 00:35:46 +0000 (00:35 +0000)]
Pragmas.
José Fonseca [Sun, 18 Mar 2012 00:13:13 +0000 (00:13 +0000)]
Bit more work on the checker.
José Fonseca [Sat, 17 Mar 2012 15:49:00 +0000 (15:49 +0000)]
Add .gitignore.
José Fonseca [Sat, 17 Mar 2012 15:44:02 +0000 (15:44 +0000)]
Test callsets.
José Fonseca [Sat, 17 Mar 2012 15:11:28 +0000 (15:11 +0000)]
Dump verbosely.
José Fonseca [Sat, 17 Mar 2012 14:50:04 +0000 (14:50 +0000)]
Make it easier to add more tests.
José Fonseca [Sat, 17 Mar 2012 14:24:29 +0000 (14:24 +0000)]
Better code organization.
José Fonseca [Sat, 17 Mar 2012 14:13:33 +0000 (14:13 +0000)]
Split the driver code.
José Fonseca [Sun, 11 Mar 2012 15:48:38 +0000 (15:48 +0000)]
Better checking (WIP).
José Fonseca [Sun, 11 Mar 2012 14:21:10 +0000 (14:21 +0000)]
Make PIL optional.
José Fonseca [Sat, 10 Mar 2012 10:33:58 +0000 (10:33 +0000)]
Basic map buffer test.
José Fonseca [Fri, 2 Mar 2012 11:50:44 +0000 (11:50 +0000)]
Use path to apitrace executable instead.
José Fonseca [Fri, 2 Mar 2012 11:50:17 +0000 (11:50 +0000)]
Use abs paths for traces.
José Fonseca [Wed, 15 Feb 2012 10:07:18 +0000 (10:07 +0000)]
Add test for GL_EXT_debug_marker.
José Fonseca [Wed, 14 Dec 2011 23:19:33 +0000 (23:19 +0000)]
Filter the difference to mitigate rasterization differences.
José Fonseca [Mon, 12 Dec 2011 15:35:28 +0000 (15:35 +0000)]
More flexible image comparison.
José Fonseca [Mon, 12 Dec 2011 15:27:38 +0000 (15:27 +0000)]
actually call adjustRefState.
José Fonseca [Mon, 12 Dec 2011 09:18:45 +0000 (09:18 +0000)]
Use non-overlapping names for traces.
José Fonseca [Mon, 12 Dec 2011 09:17:28 +0000 (09:17 +0000)]
Use opaque clear color.
No intention of testing alpha at this point.
José Fonseca [Sun, 11 Dec 2011 13:38:19 +0000 (13:38 +0000)]
Rely on jsondiff to strip comments.
José Fonseca [Sun, 11 Dec 2011 12:36:06 +0000 (12:36 +0000)]
Check tri state.
José Fonseca [Sun, 11 Dec 2011 12:04:54 +0000 (12:04 +0000)]
Test single/double buffering.
José Fonseca [Sun, 11 Dec 2011 11:44:48 +0000 (11:44 +0000)]
Don't force initial window position.
José Fonseca [Sun, 11 Dec 2011 10:59:18 +0000 (10:59 +0000)]
Update readme.
José Fonseca [Sun, 11 Dec 2011 10:53:19 +0000 (10:53 +0000)]
Update default state.
José Fonseca [Fri, 9 Dec 2011 17:40:12 +0000 (17:40 +0000)]
Adjust for external bugs in reference state.
José Fonseca [Fri, 9 Dec 2011 17:03:23 +0000 (17:03 +0000)]
Update for texture environment state changes.
José Fonseca [Fri, 9 Dec 2011 16:42:35 +0000 (16:42 +0000)]
Windows portability fixes.
José Fonseca [Wed, 7 Dec 2011 12:03:23 +0000 (12:03 +0000)]
Add tweaks/comments to default.ref.json
José Fonseca [Wed, 7 Dec 2011 09:47:50 +0000 (09:47 +0000)]
Test default state first.
José Fonseca [Wed, 7 Dec 2011 09:47:23 +0000 (09:47 +0000)]
Search images in more framebuffer attachments.
José Fonseca [Wed, 7 Dec 2011 09:46:29 +0000 (09:46 +0000)]
Fix the default.ref.txt.
Did exactly the opposite I meant.
José Fonseca [Mon, 5 Dec 2011 08:32:56 +0000 (08:32 +0000)]
Detect doublebuffered visuals on Mac OS X.
José Fonseca [Mon, 5 Dec 2011 08:28:55 +0000 (08:28 +0000)]
Split default state checking into a separate test.