diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-04-20 15:35:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-04-28 01:16:18 +0300 |
commit | 9c82c00b32802a88b71c22929e9660f7ba4023a8 (patch) | |
tree | 11a9314e7c51ab3a99212f3d64d58c5496e1a8e5 /source/blender/gpu/GPU_material.h | |
parent | 676198f57f492ac89d6468119c4146178eb962a8 (diff) |
GPUMaterial: Rework the deferred compilation to not use double locks
This uses refcounter instead of double thread mutexes. This should be
more robust and avoir use after free situation.
Also remove redundant structures and the use of scene as the job owner.
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r-- | source/blender/gpu/GPU_material.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index 58bbe11b4d6..fff90e6f8ff 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -215,6 +215,9 @@ GPUMaterial *GPU_material_from_nodetree(struct Scene *scene, void GPU_material_compile(GPUMaterial *mat); void GPU_material_free(struct ListBase *gpumaterial); +void GPU_material_acquire(GPUMaterial *mat); +void GPU_material_release(GPUMaterial *mat); + void GPU_materials_free(struct Main *bmain); struct Scene *GPU_material_scene(GPUMaterial *material); |