Closed Bug 480993 Opened 15 years ago Closed 14 years ago

[c3d] canvas 3D spec tests

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ilmari.heikkinen, Unassigned)

Details

I've started writing a set of tests for the canvas OpenGL ES 2.0 context, you can track the progress at http://github.com/kig/canvas3d-tests/tree/master

The complete tests would include:

 * checking the implementation's interface against API methods and constants
 * method arity and argument type fuzzing tests
 * testing return values
 * bounds-checking tests for vertex arrays, buffers, textures, readPixels, getImageData and anything potentially segfaultable
 * same-origin-policy tests for any getter methods (readPixels and getImageData at least, are there other getters that provide access to texture data?)
 * validating readPixels and getImageData output (specifically that alpha works right and the orientation of the returned data is as specced (y-grows-up for readPixels, y-grows-down for getImageData?))

 * Performance tests for the JS matrix math, especially GC pauses  
 * Performance tests for compositing the canvas element (e.g. gl.clearColor(1.0,1.0,1.0,0.5); gl.clear(gl.COLOR_BUFFER_BIT); gl.swapBuffers())


Feedback would be most welcome. And a finished API spec too (or something that could be RFC:d in relevant places)


P.S. The reason for the performance tests is that I'm seeing 65% CPU use from drawing a spinning cube with per-pixel lighting and DoF blur (~6 gaussian blur passes) on a 400x400 canvas at 30fps. And 30% of that is Xorg, 35% is Firefox. 

Drawing nothing (just doing the matrix math) takes around 3% CPU. Drawing an empty canvas: 30% Xorg, 17% Firefox. Omitting the swapBuffers call gives 0% Xorg, 15% Firefox. So there's definitely some overhead in the compositing.
Component: Canvas: 2D → Canvas: WebGL
This looks interesting but you want the public WebGL mailing list for that!

https://www.khronos.org/webgl/public-mailing-list/

First check the existing test suite to see where your tests cover stuff that isn't already covered:

https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/
The current draft spec is here:
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html

send comments to the public webgl list mentioned above.
don't really know how to mark this... don't take offense at the INVALID ;-)
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Yeah, these were from ages ago. Some/all of these tests are in the khronos webgl svn repo.
You need to log in before you can comment on or make changes to this bug.