metal: fix a crash on quit

This commit is contained in:
Sasha Szpakowski
2023-04-02 17:09:44 -03:00
parent 2c3ea60c79
commit 02427c3ddc
2 changed files with 29 additions and 10 deletions
+3 -1
View File
@@ -208,6 +208,8 @@ private:
void initCapabilities() override;
void getAPIStats(int &shaderswitches) const override;
void processCompletedCommandBuffers();
void endPass(bool presenting);
id<MTLDepthStencilState> getCachedDepthStencilState(const DepthState &depth, const StencilState &stencil);
@@ -251,7 +253,7 @@ private:
std::map<uint64, void *> cachedSamplers;
std::unordered_map<uint64, void *> cachedDepthStencilStates;
std::atomic<int64> completeCommandBufferIndex;
std::vector<id<MTLCommandBuffer>> activeCommandBuffers;
DeviceFamilies families;