DRW: Shader Deferred compilation: Use a wmJob for threading.

Also get rid of the static var and initialization.
This enables the user to see the progress on the info header.
Closing blender or reading a file also kill the job which is good.

Unfortunatly, this job cannot be interrupt by users directly. We could make it interruptible but we need a way to resume the compilation.
This commit is contained in:
2018-03-05 21:50:56 +01:00
parent 3a209c2857
commit 94fadd00d8
4 changed files with 121 additions and 82 deletions

View File

@@ -504,6 +504,7 @@ enum {
WM_JOB_TYPE_POINTCACHE,
WM_JOB_TYPE_DPAINT_BAKE,
WM_JOB_TYPE_ALEMBIC,
WM_JOB_TYPE_SHADER_COMPILATION,
/* add as needed, screencast, seq proxy build
* if having hard coded values is a problem */
};