~ted/apitrace/trunk

Viewing all changes in revision 3665.

  • Committer: Jose Fonseca
  • Author(s): Andrii Simiklit
  • Date: 2019-05-28 14:21:45 UTC
  • Revision ID: git-v1:3793ce36e3e60e3e9a32969b8b2dc57d2ccc8f22
dxgitrace: Fix a thread safety of a d3d11 CreateBuffer method.

According to directx 11 spec all device methods are thread safe:
   "All ID3D11Device interface methods are free-threaded, which means
    it is safe to have multiple threads call the functions
    at the same time."

But all device-context methods according to directx 11 spec:
   "Any context – immediate or deferred – can be used on any thread
    as long as the context is only used in one thread at a time."

So without this fix WrapID3D11Device*::CreateBuffer methods are not
thread safe. It could lead to the crash in some games which are
create buffers in different threads.

Suggested-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: