GNOME Bugzilla – Bug 660617
Porting of clutter tests
Last modified: 2021-06-10 11:20:08 UTC
Hello, I've opened this bug for attaching patches to port tests from clutter. Many things are shared among tests, in particular: 1) Ortho view, clearing the framebuffer and setting an identity matrix 2) Width and height information of the shared framebuffer 3) Validating a series of pixels read from the screen 4) Provide a simple way to render to the screen for a particular test only, like COGL_TEST_ONSCREEN=test-name, so that it blocks with while (1) { paint(); swap_buffers(); } Before factoring those out (maybe another bug?) I find it best to gather as much information about common needs of the tests by porting them first.
Created attachment 197949 [details] [review] Port the pipeline-user-matrix conformance test from Clutter
Created attachment 197950 [details] [review] Port just-vertex-shader to test both the legacy and the new API
Created attachment 197997 [details] [review] tests: Port blend-strings to test both the legacy and the new API
I'm not much confident in how to handle that "Skipped" and "OK" and at the same time g_debug to say why it's skipped. Should them be both handled in paint? Or let paint return a status saying whether it's skipped or not and let main() print?
I've just landed your latest test-blend-strings port, thanks. The issue with skipping when running on hardware not supporting a given blend string is a bit awkward but so far I've just assumed we would always aim to run the conformance tests on hardware/drivers that can handle that. Possibly it would be better to continue with other tests instead of immediately bailing but I don't think it's a big deal either way currently.
Created attachment 199717 [details] [review] tests: Port test-path conformance test from Clutter Couldn't add test for new API because of warnings about implicit declaration of functions. On the other hand defining COGL_ENABLE_EXPERIMENTAL_API will disable legacy API. The best would be to add a new test-path2.
Created attachment 211188 [details] [review] tests: Port test-premult This ports the test-offscreen test from being a Clutter test to a straight Cogl test.
Thanks, I've pushed your latest test to master. I just made a minor tweak to use CoglTexture * instead of CoglHandle for the textures and there were a couple of lines where the cogl_pipeline_ api was being used with a CoglMaterial when testing the legacy api so I made those use the cogl_material api instead. Also it seems I forgot to update this bug to say that I pushed your test-path patch back in November; thanks for that too.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of cogl, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a ticket at https://gitlab.gnome.org/GNOME/cogl/-/issues/ Thank you for your understanding and your help.