Cycles Renderer : Update pause() to wait until the render has paused - #7094
Open
murraystevenson wants to merge 1 commit into
Open
Cycles Renderer : Update pause() to wait until the render has paused#7094murraystevenson wants to merge 1 commit into
pause() to wait until the render has paused#7094murraystevenson wants to merge 1 commit into
Conversation
We've run into intermittent test failures on CI where renders in tests such as InteractiveRenderTest.testLights fail to produce the expected image after a pause, edit, resume. One recent clue from the new assertEventually reporting shows those failing renders having early iterations representing the previous scene state. I'm able to reproduce the failures locally, and a bit of instrumentation showed that in those failing cases, the session reset in `Renderer::render()` never occurs as `m_scene->need_reset()` returns false. It seems like we're running into a timing issue where we ask Cycles to pause in `Renderer::pause()` but then make scene edits before the render has actually paused. Meanwhile Cycles clears the update flags, pauses, and then our later `m_scene->need_reset()` check returns false when resuming the render. As an experiment, I've made `Renderer::pause()` poll the session status waiting for it to report that the render is paused before returning. I'm not super happy with this, but I've yet to come up with a better alternative...
Contributor
Author
|
8 CI runs without a Cycles failure, might be on the right track... |
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.
We've run into intermittent test failures on CI where renders in tests such as InteractiveRenderTest.testLights fail to produce the expected image after a pause, edit, resume. One recent clue from the new assertEventually reporting shows those failing renders having early iterations representing the previous scene state.
I'm able to reproduce the failures locally with a debug build,
stress -c 128, andgaffer test GafferCyclesTest.InteractiveCyclesRenderTest.testLightsWithSVM -repeat 100. A bit of instrumentation showed that in those failing cases, the session reset inRenderer::render()never occurs asm_scene->need_reset()returns false. It seems like we're running into a timing issue where we ask Cycles to pause inRenderer::pause()but then make scene edits before the render has actually paused. Meanwhile Cycles clears the update flags, pauses, and then our laterm_scene->need_reset()check returns false when resuming the render.As an experiment, I've made
Renderer::pause()poll the session status waiting for it to report that the render is paused before returning. I'm not super happy with this, but I've yet to come up with a better alternative...