diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-07-15 13:44:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-07-15 17:31:28 +0300 |
commit | 1cf465bbc3312ae8eac3e1ae573b716e0fad92cf (patch) | |
tree | 27f1c1ee17327e2d6b9775c17faf6a431d677651 /source/blender/gpu/metal | |
parent | 5e1229f25387a90fe626b4b2ac34f2eb5c7dc23a (diff) |
Fix GPU backend deleting resources without an active context
This causes an assert with libepoxy, but was wrong already regardless.
Refactor logic to work as follows:
* GPU_exit() deletes backend resources
* Destroy UI GPU resources with the context active
* Call GPU_backend_exit() after deleting the context
Ref D15291
Differential Revision: https://developer.blender.org/D15465
Diffstat (limited to 'source/blender/gpu/metal')
-rw-r--r-- | source/blender/gpu/metal/mtl_backend.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/metal/mtl_backend.hh b/source/blender/gpu/metal/mtl_backend.hh index 7228a5f7596..3e09408e43e 100644 --- a/source/blender/gpu/metal/mtl_backend.hh +++ b/source/blender/gpu/metal/mtl_backend.hh @@ -40,6 +40,11 @@ class MTLBackend : public GPUBackend { MTLBackend::platform_exit(); } + void delete_resources() + { + /* Delete any resources with context active. */ + } + static bool metal_is_supported(); static MTLBackend *get() { |