Page MenuHome

Fix: Stops assert when baking in debug mode.
ClosedPublic

Authored by William Leeson (leesonw) on Oct 6 2021, 4:38 PM.

Details

Summary

When baking in a debug build running gdb it kept asserting because a GL context was being created outside the main thread.

To fix this the patch only creates the GL context is only created for rendering (when it is actually used).

Diff Detail

Repository
rB Blender

Event Timeline

William Leeson (leesonw) requested review of this revision.Oct 6 2021, 4:38 PM
William Leeson (leesonw) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Oct 6 2021, 5:07 PM

This breaks F12 render which is also background but which does need DisplayDriver to be created.

Since we only expect the DisplayDriver to be used for rendering, perhaps easiest is to only create display for render: P2485
Need to check viewport OpenGL context is created from the main thread still though.

This revision now requires changes to proceed.Oct 6 2021, 5:07 PM
William Leeson (leesonw) updated this revision to Diff 43217.EditedOct 12 2021, 10:26 PM

Applied fix suggested by Sergey that only creates the display for render.

William Leeson (leesonw) retitled this revision from Fix for assert when baking in debug mode. to Fix: Stops assert when baking in debug mode..Oct 13 2021, 11:02 AM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 13 2021, 11:10 AM
This revision was automatically updated to reflect the committed changes.