Fix #128414: Compositor crashes using GPU compositor
Blender crashes when using the GPU compositor sometimes. This is because compositor render data was accessed before it was updated in the realtime compositor when detecting compositing device. So fix that by first updating compositor data before calling any context methods.
This commit is contained in:
@@ -631,6 +631,8 @@ class RealtimeCompositor {
|
||||
/* Evaluate the compositor and output to the scene render result. */
|
||||
void execute(const ContextInputData &input_data)
|
||||
{
|
||||
context_->update_input_data(input_data);
|
||||
|
||||
if (context_->use_gpu()) {
|
||||
/* For main thread rendering in background mode, blocking rendering, or when we do not have a
|
||||
* render system GPU context, use the DRW context directly, while for threaded rendering when
|
||||
@@ -651,8 +653,6 @@ class RealtimeCompositor {
|
||||
}
|
||||
}
|
||||
|
||||
context_->update_input_data(input_data);
|
||||
|
||||
/* Always recreate the evaluator, as this only runs on compositing node changes and
|
||||
* there is no reason to cache this. Unlike the viewport where it helps for navigation. */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user