Writing a test to check that ContextGL loss / gpu restart is handled correctly?

9 views
Skip to first unread message

Dale Curtis

unread,
Jan 18, 2019, 6:15:00 PM1/18/19
to Graphics-dev
Unfortunately context loss and video with surface layer has been broken for some time, so while I now have a fix for that, I'd like to prevent it from regressing in the future.

Do we have any examples of end-to-end tests which force gpu process restarts / whatever happens when an in-process-gpu loses context?

Specifically I'm trying to ensure that a cc::Surface based <video> element reconnects and displays the last frame correctly after a real context loss.

If no one is aware of any existing ones, is the answer just something like add a new window.internals method for restarting the gpu process and write a layout test?

Thanks in advance for any pointers!

- dale

dan...@chromium.org

unread,
Jan 18, 2019, 6:27:49 PM1/18/19
to Dale Curtis, Graphics-dev


Note that context lost and gpu process restart are different. In the latter case, viz also is restarted meaning surfaces and CompositorFrameSinks are lost as well.

Antoine Labour

unread,
Jan 18, 2019, 6:33:05 PM1/18/19
to Dana Jansens, Dale Curtis, Graphics-dev

Dale Curtis

unread,
Jan 18, 2019, 6:36:49 PM1/18/19
to Antoine Labour, Dana Jansens, Graphics-dev
Thanks, will digest those and see what I can come up with!

- dale

Zhenyao Mo

unread,
Jan 18, 2019, 6:57:57 PM1/18/19
to Dale Curtis, Antoine Labour, Dana Jansens, Graphics-dev
Actually we don't have an existing mechanism to lose a context (other
than through WebGL). We only have a mechanism to kill GPU process,
which of course lose all contexts. So if you want to test in-process
GPU, you will have to add a new API, likely through
gpu_benchmarking.h/cc

Dale Curtis

unread,
Jan 30, 2019, 8:34:45 PM1/30/19
to Zhenyao Mo, Antoine Labour, Dana Jansens, Graphics-dev
Circling back on this for future travelers: Thanks again for the tips everyone, I ended up writing a pixel integration test based on context_lost_integration_test recommendation above:


- dale
Reply all
Reply to author
Forward
0 new messages