Gerrit [Sat, 21 Jul 2012 02:17:32 +0000 (19:17 -0700)]
Merge "timer: fix PRIi64 usage"
Mike Frysinger [Fri, 20 Jul 2012 01:23:01 +0000 (21:23 -0400)]
convert waf usage to gnu_dirs
Rather than open coding data dirs paths, use the standard gnu_dirs
module that waf already includes.
BUG=None
TEST=`emerge-daisy glmark2` installs into same path
Change-Id: I936dcfe45c608f96d58680d133b9f27c3d100272
Mike Frysinger [Fri, 20 Jul 2012 00:42:09 +0000 (20:42 -0400)]
timer: fix PRIi64 usage
The current hacked code builds with warnings which causes things to fail,
so delete that and uncomment the old code after enabling the right define.
BUG=None
TEST=`emerge-daisy glmark2`
Change-Id: I0190bfb33274f8f5eeeff5967e32a36524687de6
Simon Que [Wed, 21 Mar 2012 20:06:26 +0000 (13:06 -0700)]
Flush GL commands before a DRM page flip
Otherwise unfinished frames get drawn to the screen.
BUG=chromium-os:25587
TEST=None
Change-Id: Ifd0cd6ad2065294fee7003df555735a26908c7a0
Signed-off-by: Simon Que <sque@chromium.org>
Simon Que [Wed, 21 Mar 2012 20:04:27 +0000 (13:04 -0700)]
Add command line option to set number of DRM buffers
Introduces the "-n" or "--num-buffers" command line option.
BUG=chromium-os:25587
TEST=run glmark2-es2-drm with "-n <num>" option
Change-Id: If62734b62016ab2f5c72eba1ed66d4d4e56675d5
Signed-off-by: Simon Que <sque@chromium.org>
Simon Que [Mon, 27 Feb 2012 19:22:41 +0000 (11:22 -0800)]
Add timestamp logging
Add a new timer class that can be invoked for measuring time between
lines of code. It uses the existing Utils::get_timestamp_us() function.
BUG=chromium-os:25587
TEST=glmark2 builds successfully.
Signed-off-by: Simon Que <sque@chromium.org>
Change-Id: I491998abac12322a8f1dc97dc792486dc6a55d1c
Simon Que [Wed, 15 Feb 2012 22:25:29 +0000 (14:25 -0800)]
Desktop scene explicitly uses canvas framebuffer
Change-Id: I15e7dd9d32374e134478960d2aac3cd864c53b12
Signed-off-by: Simon Que <sque@chromium.org>
Simon Que [Wed, 8 Feb 2012 01:59:31 +0000 (17:59 -0800)]
Add canvas for direct rendering without X
This patch creates a new canvas type, CanvasDRM, which renders directly
to video buffers instead of going through X. The direct rendering uses
the EGL, DRM, and GBM APIs. Also, CanvasDRM uses render-ahead triple
buffering to achieve the maximum framerate.
BUG=chromium-os:25587
TEST=emerge glmark2
Change-Id: I0caf5a3958775aa1e444fcd3c743fcf9646b071a
Signed-off-by: Simon Que <sque@chromium.org>
Alexandros Frantzis [Thu, 19 Jan 2012 18:13:38 +0000 (20:13 +0200)]
Build,Doc: Update files for 2012.01 release.
Alexandros Frantzis [Thu, 19 Jan 2012 10:58:18 +0000 (12:58 +0200)]
Main: Implement seamless transition of FPS display when changing scenes.
Jesse Barker [Wed, 18 Jan 2012 21:44:06 +0000 (13:44 -0800)]
Create a new TextRenderer each time through the loop so that it is initialized with the newly reset canvas.
Jesse Barker [Wed, 18 Jan 2012 17:13:28 +0000 (09:13 -0800)]
Canvas: This adds logic to the canvas and its derivatives to allow a "reset" of the canvas between scenes. In practice what this does is to create a fresh context for each scene. This puts each scene on a level playing field and insulates the scenes from any resource leakage and any resultant performance degradation. Also included is an option to reuse one context for all scenes (the way things have worked up to now) for the sake of being able to test for resource leakage, etc.
SceneDesktop: A latent bug in the init/release symmetry in the RenderObject and its derivatives was detected as a direct result of the Canvas reset changes. This is also fixed in this branch (these changes should be taken regardless).
Alexandros Frantzis [Wed, 18 Jan 2012 16:40:14 +0000 (18:40 +0200)]
SceneDesktop: Allow RenderObjects to be safely reused after a GL context change.
When setting the size of a RenderObject, "clear" the texture contents if
they were invalidated, even if the texture size didn't change.
Jesse Barker [Tue, 17 Jan 2012 23:00:25 +0000 (15:00 -0800)]
SceneDesktop: Fix asymmetry discovered when we started using a fresh context for
each scene. The release of RenderObject and derived classes was not being handled
properly. Make sure to perform one (and only one :-) release for each init.
Best not to handle this from the destructor as double-taps are to easy to encounter.
Jesse Barker [Tue, 17 Jan 2012 18:25:30 +0000 (10:25 -0800)]
Update the man page to reflect the new option to reuse the context, as well as
describe the default behavior.
Alexandros Frantzis [Tue, 17 Jan 2012 15:44:04 +0000 (17:44 +0200)]
Main: If benchmark list contains only option-setting descriptions, add the default benchmarks.
This allows easy access to the default benchmarks, while changing some
option for all of them e.g. 'glmark2 -b :duration=3.0'
Alexandros Frantzis [Tue, 17 Jan 2012 15:41:29 +0000 (17:41 +0200)]
Benchmark: Add method to get the associated scene without setting it up.
Alexandros Frantzis [Tue, 17 Jan 2012 14:40:18 +0000 (16:40 +0200)]
Android: Kill the app process when pausing.
As we don't handle the pause/resume cycle properly at this point, this is the
sanest thing to do.
Alexandros Frantzis [Fri, 13 Jan 2012 21:14:04 +0000 (23:14 +0200)]
Android: Call the correct super-class function OnDestroy().
Alexandros Frantzis [Fri, 13 Jan 2012 18:36:53 +0000 (20:36 +0200)]
TextRenderer: Fix position() method signature.
Alexandros Frantzis [Fri, 13 Jan 2012 15:50:38 +0000 (17:50 +0200)]
Android: Log an error message if we are unable to find a suitable EGLConfig.
Alexandros Frantzis [Fri, 13 Jan 2012 14:11:42 +0000 (16:11 +0200)]
Android: Reset the rendering state when finishing.
Alexandros Frantzis [Fri, 13 Jan 2012 14:05:54 +0000 (16:05 +0200)]
Android: Handle the SceneDefaultOptions special scene properly.
The SceneDefaultOptions is distinguishable by its empty name.
Alexandros Frantzis [Fri, 13 Jan 2012 14:03:23 +0000 (16:03 +0200)]
Android: Display glmark2 score when finishing.
Alexandros Frantzis [Fri, 13 Jan 2012 13:51:25 +0000 (15:51 +0200)]
Android,SceneBuffer: Fix crash on implementations not supporting glMapBufferOES.
Alexandros Frantzis [Fri, 13 Jan 2012 13:50:31 +0000 (15:50 +0200)]
SceneBuffer: Set up the scene properly, even if needed extensions are missing.
This ensures that timing related variables are set up properly, and the
benchmark results are sane (i.e. 0 FPS), even if the test itself doesn't run.
Alexandros Frantzis [Fri, 13 Jan 2012 13:48:41 +0000 (15:48 +0200)]
Android: Only draw scene contents if the scene is running.
Alexandros Frantzis [Thu, 5 Jan 2012 09:46:41 +0000 (11:46 +0200)]
Main,Options,TextRenderer: Add support for optionally showing a live FPS counter on screen.
Alexandros Frantzis [Thu, 5 Jan 2012 09:35:49 +0000 (11:35 +0200)]
TextRenderer: Avoid setting/restoring the VBO state more than once.
Jesse Barker [Wed, 4 Jan 2012 17:15:29 +0000 (09:15 -0800)]
Add an option to allow all scenes to use the same context (--reuse-context).
Default state is to create a fresh context for each scene.
Jesse Barker [Wed, 4 Jan 2012 16:51:20 +0000 (08:51 -0800)]
CanvasX11EGL: Make sure to check whether we have already created our context in
the ensure_egl_context member.
Jesse Barker [Wed, 4 Jan 2012 00:37:12 +0000 (16:37 -0800)]
CanvasX11*: Add a reset method to the main CanvasX11 object, and add a reset_context
method to the GLX and EGL derivatives. This allows us to destroy and recreate
the context between test scenarios giving them a clean slate, and preventing
resource leaks.
Alexandros Frantzis [Thu, 15 Dec 2011 13:52:04 +0000 (15:52 +0200)]
Build,Doc: Update files for 2011.12 release.
Alexandros Frantzis [Tue, 13 Dec 2011 14:32:50 +0000 (16:32 +0200)]
doc: Add information about --show-fps option to man page.
Alexandros Frantzis [Tue, 13 Dec 2011 14:27:23 +0000 (16:27 +0200)]
Main,Options: Add options to show a live FPS counter.
Alexandros Frantzis [Tue, 13 Dec 2011 14:25:41 +0000 (16:25 +0200)]
TextRenderer: Add class for drawing text on screen.
Alexandros Frantzis [Mon, 12 Dec 2011 12:39:00 +0000 (14:39 +0200)]
ShaderSource: Always try to guess the shader type before emitting the shader string.
Previously, the shader type inference only took place if the precision hadn't
been explicitly set for a ShaderSource object. This change ensures that the
inference is always attempted.
Alexandros Frantzis [Thu, 8 Dec 2011 13:19:41 +0000 (15:19 +0200)]
Scene: Calculate the average fps value on demand.
Alexandros Frantzis [Thu, 8 Dec 2011 13:17:19 +0000 (15:17 +0200)]
Scene*: Eliminate duplication of scene update code.
Alexandros Frantzis [Thu, 8 Dec 2011 13:15:50 +0000 (15:15 +0200)]
SceneBuffer: Properly initialize WaveMesh pointer.
Alexandros Frantzis [Thu, 8 Dec 2011 11:09:09 +0000 (13:09 +0200)]
Scene*: Move common update functionality to Scene::update().
Alexandros Frantzis [Thu, 8 Dec 2011 10:50:35 +0000 (12:50 +0200)]
Scene*: Use elapsed time since start instead of since last update to calculate new state when possible.
Alexandros Frantzis [Wed, 30 Nov 2011 11:02:09 +0000 (13:02 +0200)]
SceneTexture: Add test for bilinear filtering implemented in the fragment shader.
Alexandros Frantzis [Tue, 29 Nov 2011 14:47:05 +0000 (16:47 +0200)]
SceneTexture: Add validation for "linear-shader" filtering method.
Alexandros Frantzis [Tue, 29 Nov 2011 10:38:50 +0000 (12:38 +0200)]
SceneTexture: Add support for bilinear filtering implemented in the fragment shader
Alexandros Frantzis [Tue, 29 Nov 2011 10:36:37 +0000 (12:36 +0200)]
ShaderSource: Add a vec2 version of the add_const() method
Alexandros Frantzis [Thu, 24 Nov 2011 15:52:33 +0000 (17:52 +0200)]
CanvasX11: Call glViewport() only after binding a GL context.
Alexandros Frantzis [Wed, 16 Nov 2011 10:43:22 +0000 (12:43 +0200)]
Build,Doc: Update files for 2011.11 release.
Alexandros Frantzis [Wed, 16 Nov 2011 10:07:47 +0000 (12:07 +0200)]
Mesh,Model: Remove trailing whitespace.
Alexandros Frantzis [Tue, 15 Nov 2011 10:20:53 +0000 (12:20 +0200)]
SceneBump: Implement bump mapping using a tangent space normal map and a height map.
Alexandros Frantzis [Tue, 15 Nov 2011 10:15:41 +0000 (12:15 +0200)]
SceneBump: Rename sampler to "HeightMap" for the height map bump mapping method.
Alexandros Frantzis [Tue, 15 Nov 2011 10:14:06 +0000 (12:14 +0200)]
SceneBump: Ensure that the texture is properly bound.
Alexandros Frantzis [Mon, 14 Nov 2011 18:11:57 +0000 (20:11 +0200)]
SceneBump: Update validation reference pixel for new height map.
Alexandros Frantzis [Mon, 14 Nov 2011 18:01:44 +0000 (20:01 +0200)]
SceneBump: Recreate height map to get rid of artifacts along UV seam.
This version adds a margin around the height map "islands" to ensure that all
UV coordinates that are used for texturing fall on an island (instead of the
transparent abyss).
Alexandros Frantzis [Mon, 14 Nov 2011 13:13:40 +0000 (15:13 +0200)]
SceneBump: Add validation support for "normals-tangent" and "height" methods.
Alexandros Frantzis [Mon, 14 Nov 2011 13:04:21 +0000 (15:04 +0200)]
SceneBump: Increase height factor for bump mapping using height maps.
Alexandros Frantzis [Mon, 14 Nov 2011 12:39:08 +0000 (14:39 +0200)]
DefaultBenchmarks: Add bump mapping with height map benchmark.
Alexandros Frantzis [Mon, 14 Nov 2011 12:17:30 +0000 (14:17 +0200)]
SceneBump: Update 'bump-render' option documentation.
Alexandros Frantzis [Mon, 14 Nov 2011 11:36:26 +0000 (13:36 +0200)]
SceneBump: Implement bump mapping using height map.
Alexandros Frantzis [Fri, 11 Nov 2011 14:40:29 +0000 (16:40 +0200)]
SceneBump: Add bump-mapping method that use a tangent-space normal map.
Alexandros Frantzis [Fri, 11 Nov 2011 14:38:08 +0000 (16:38 +0200)]
Model: Add support for tangent and bitangent attributes.
Alexandros Frantzis [Fri, 11 Nov 2011 11:07:15 +0000 (13:07 +0200)]
*: Merge cleanup branch part 2.
Alexandros Frantzis [Fri, 11 Nov 2011 10:51:02 +0000 (12:51 +0200)]
Scene: Remove unused ::load_shaders_from_files() method.
Alexandros Frantzis [Fri, 11 Nov 2011 10:48:24 +0000 (12:48 +0200)]
Scene: Don't include a trailing space in the scene information string.
Alexandros Frantzis [Fri, 11 Nov 2011 10:36:48 +0000 (12:36 +0200)]
Log: Skip the log continuation character when displaying info messages in normal mode.
Alexandros Frantzis [Thu, 10 Nov 2011 10:33:26 +0000 (12:33 +0200)]
Canvas,Log: Remove trailing whitespace.
Alexandros Frantzis [Thu, 10 Nov 2011 10:30:53 +0000 (12:30 +0200)]
Scene*: Implement validation support for all default benchmarks.
Alexandros Frantzis [Thu, 10 Nov 2011 10:21:27 +0000 (12:21 +0200)]
Canvas: Be explicit about which overload of std::sqrt() to use.
On some systems the compiler complains that an 'int' argument to
std::sqrt() is ambiguous.
Alexandros Frantzis [Wed, 9 Nov 2011 15:22:18 +0000 (17:22 +0200)]
Scene*: Increase validation acceptance margins for precision-sensitive scenes.
Alexandros Frantzis [Wed, 9 Nov 2011 10:41:52 +0000 (12:41 +0200)]
Model: Rename get_values() functions and make them static.
The vec2 version of get_values() was removed as it was not used.
Alexandros Frantzis [Wed, 9 Nov 2011 10:34:35 +0000 (12:34 +0200)]
Model: Add doxygen comments.
Alexandros Frantzis [Wed, 9 Nov 2011 10:14:02 +0000 (12:14 +0200)]
Mesh: Add more doxygen comments.
Alexandros Frantzis [Wed, 9 Nov 2011 09:51:32 +0000 (11:51 +0200)]
Mesh: Fix 'else if' clause.
Alexandros Frantzis [Tue, 8 Nov 2011 22:01:16 +0000 (00:01 +0200)]
Benchmark: Add doxygen comments.
Alexandros Frantzis [Tue, 8 Nov 2011 21:41:23 +0000 (23:41 +0200)]
Texture: Change ::load() to return a boolean value.
Alexandros Frantzis [Tue, 8 Nov 2011 21:40:36 +0000 (23:40 +0200)]
Scene: Change ::load() to return a boolean value.
Alexandros Frantzis [Tue, 8 Nov 2011 21:33:18 +0000 (23:33 +0200)]
Scene: Add doxygen comments for Scene base class methods.
Alexandros Frantzis [Tue, 8 Nov 2011 20:41:46 +0000 (22:41 +0200)]
Scene*,Util: Move get_timestamp_us() to the Util class.
Alexandros Frantzis [Tue, 8 Nov 2011 20:20:02 +0000 (22:20 +0200)]
DefaultBenchmarks,Main,Android: Define the default benchmarks in a single place.
Alexandros Frantzis [Tue, 8 Nov 2011 19:24:44 +0000 (21:24 +0200)]
Android,CanvasX11GLX: Replace C casts with C++ casts.
Alexandros Frantzis [Tue, 8 Nov 2011 15:36:16 +0000 (17:36 +0200)]
SceneBuffer: Adjust reference pixel value.
Alexandros Frantzis [Tue, 8 Nov 2011 13:57:38 +0000 (15:57 +0200)]
Scene*,Canvas: Use an Pixel method to calculate pixel distance.
Alexandros Frantzis [Tue, 8 Nov 2011 11:58:19 +0000 (13:58 +0200)]
Main: Force 800x600 output for validation.
Alexandros Frantzis [Tue, 8 Nov 2011 11:43:43 +0000 (13:43 +0200)]
SceneLoop: Implement validation.
Alexandros Frantzis [Tue, 8 Nov 2011 11:38:43 +0000 (13:38 +0200)]
SceneFunction: Implement validation.
Alexandros Frantzis [Tue, 8 Nov 2011 11:31:02 +0000 (13:31 +0200)]
SceneConditionals: Implement validation.
Alexandros Frantzis [Tue, 8 Nov 2011 11:29:47 +0000 (13:29 +0200)]
SceneBuffer: Implement validation.
Alexandros Frantzis [Tue, 8 Nov 2011 11:29:01 +0000 (13:29 +0200)]
SceneDesktop: Implement validation.
Alexandros Frantzis [Tue, 8 Nov 2011 11:28:01 +0000 (13:28 +0200)]
ScenePulsar: Implement validation.
Alexandros Frantzis [Tue, 8 Nov 2011 11:27:15 +0000 (13:27 +0200)]
SceneEffect2D: Implement validation.
Jesse Barker [Fri, 4 Nov 2011 18:28:13 +0000 (14:28 -0400)]
More header cleanup. In particular, include as little as possible from headers
and for inclusion only where things actually need to be defined and referenced.
Alexandros Frantzis [Wed, 2 Nov 2011 14:56:58 +0000 (16:56 +0200)]
*: Merge cleanup branch part 1.
Alexandros Frantzis [Wed, 2 Nov 2011 14:43:36 +0000 (16:43 +0200)]
Main,SceneEffect2D: Ensure proper log continuations.
Jesse Barker [Tue, 1 Nov 2011 16:55:51 +0000 (12:55 -0400)]
Model: Update inclusions to reflect what is actually being used.
Jesse Barker [Tue, 1 Nov 2011 16:50:07 +0000 (12:50 -0400)]
ScenePulsar: Update inclusions based upon what the scene actually needs.
Alexandros Frantzis [Tue, 1 Nov 2011 16:49:42 +0000 (18:49 +0200)]
*: More trailing whitespace cleanup.
Alexandros Frantzis [Tue, 1 Nov 2011 16:46:08 +0000 (18:46 +0200)]
*: Use Util::fromString() and Util::toString() when possible.
Alexandros Frantzis [Tue, 1 Nov 2011 13:56:35 +0000 (15:56 +0200)]
Log: Add colored prefixes to log messages.
Colors are only used when printing to a terminal. Informational messages are
prefixed only when showing debug messages.
Alexandros Frantzis [Tue, 1 Nov 2011 13:46:05 +0000 (15:46 +0200)]
Log: Properly handle continuation of messages on the same line across multiple log calls.
Jesse Barker [Mon, 31 Oct 2011 21:03:00 +0000 (17:03 -0400)]
Get rid of duplicate instance of "fromString" and use the one from Util.