Blender Git Commit Log

Git Commits -> Revision 86232e1

Revision 86232e1 by Sergey Sharybin (cycles-x)
September 10, 2021, 16:26 (GMT)
Fix missing render progress on Windows in Cycles X

The issue is caused by `::wglShareLists()` returning an error if the
shared context is currently in use, so that the OpenGL context for
GPUDisplay did fail to be created.

After a lot of experimentation all the non-intrusive changes to support
OpenGL context creation with shared textures has failed.

The easiest way to have reliable OpenGL context creation is to do it on
the main thread.

For the offline rendering this is done in the pipeline.c. This change
takes advantage of this and uses the Render::gl_context for the GPU
display implementation for offline rendering.

For the viewport rendering we don't have Render, but the engine is
created from the main thread, so we can create context from the Cycles
side.

Not really happy with such approach, but this seems to be easiest and
safest way to go for now to get other bits of Cycles X finished. In the
future Vulkan should make things easier for the context creation and
multi-threaded applications.

Differential Revision: https://developer.blender.org/D12439

Commit Details:

Full Hash: 86232e1e235b6edb2ae9f6b1693e9fb10674b859
Parent Commit: a218c62
Lines Changed: +137, -65

6 Modified Paths:

/intern/cycles/blender/blender_gpu_display.cpp (+83, -44) (Diff)
/intern/cycles/blender/blender_gpu_display.h (+11, -6) (Diff)
/source/blender/render/intern/engine.c (+28, -0) (Diff)
/source/blender/render/RE_engine.h (+6, -0) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+9, -14) (Diff)
/source/blender/windowmanager/WM_api.h (+0, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021