D3D: Make NativeVertexFormat thread safe

This commit is contained in:
Stenzek
2018-02-25 00:23:24 +10:00
parent 40845e6b8f
commit 1ddc4c5568
2 changed files with 23 additions and 9 deletions

View File

@ -7,6 +7,7 @@
#include <d3d11.h>
#include <array>
#include <atomic>
#include <memory>
#include <vector>
@ -29,7 +30,7 @@ private:
std::array<D3D11_INPUT_ELEMENT_DESC, 32> m_elems{};
UINT m_num_elems = 0;
ID3D11InputLayout* m_layout = nullptr;
std::atomic<ID3D11InputLayout*> m_layout{nullptr};
};
class VertexManager : public VertexManagerBase