Conversation
…ter event loop starts
- On Linux with the Mesa software renderer (and potentially other OpenGL drivers such as Intel's), taking screenshots from the front buffer is not supported. To fix this, we instead do an expose to ensure that the correct image is present on the back buffer, then capture the frame data from the back buffer. - On Mac OS X, a call to [NSOpenGLContext update] may be required before doing any rendering. Instead of GLVisCommand directly calling for a screenshot capture, we signal for a screenshot to be taken once GLVisCommand::Execute() returns.
- Bypass SDL event queue for key events signalled on an SdlWindow via SignalKeyDown(). Instead, we can push them directly into the window-specific event queue and wake the worker thread. - Synchronously handle certain main thread events, such as resizes.
- If SDL initialization failed, don't start the main event thread, and return an invalid handle from createWindow() to terminate any worker threads. - Call SDL_Quit() in SdlMainThread's destructor to cleanup SDL at exit.
- GLEW may sometimes return an error on Wayland, since it can't find an X display. However, this is not a fatal error, and OpenGL functions can still be initialized, so we can just continue. - It appears Mesa creates some thread-local data for each OpenGL context, which is then freed upon thread exit. This seems to conflict with the cleanup mechanisms in SDL; as a workaround, we unbind the context on the worker thread before deleting on the main thread.
Member
|
Can you please resolve the conflicts (from #190)? |
adrienbernede
approved these changes
Aug 19, 2021
Contributor
adrienbernede
left a comment
There was a problem hiding this comment.
Looks great!
I tested it locally and it worked like a charm after settings things up (I have a python environment for glvis-testing).
I felt the need to insist on a bit on the developer workflow (make rebaseline) in the baseline details section.
Feel free to accept or reject.
Co-authored-by: Adrien Bernede <51493078+adrienbernede@users.noreply.github.com>
Member
|
Edit: I swear I saw failures, but now the tests look good :) |
Member
|
@adrienbernede, can we change the GH actions names to be consistent with the new ones in mfem? |
Member
|
I can't express how cool this new regression testing system is... thanks so much @kanye-quest ! |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR cleans up the commit history from #176.
Summary
tests/glvis_driver.py, runs glvis with a modified stream that generates screenshots.Two screenshots are generated: one with the original image from the stream, and one with the
*key command applied to induce a slight change in the image.Screenshots can then be compared against a baseline with the structural similarity metric. A given test case passes if the original image is above the SSIM cutoff of 0.999 and the control image is below this cutoff.
ubuntu-20.04andmacos-10.15in Github Actions, with streams and corresponding baselines available in GLVis/dataSignalKeyDown()handling for X11