1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 04:08:52 +01:00

[d3d11] Use atomics for NVX handles

Primarily to make DXVK native happy, but also much cleaner.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2021-10-21 23:56:11 +00:00 committed by Philip Rebohle
parent b163503f7c
commit 409a6f5c3f

View File

@ -2721,8 +2721,8 @@ namespace dxvk {
}
// for our purposes the actual value doesn't matter, only its uniqueness
static ULONG seqNum = 1;
*pDriverHandle = InterlockedIncrement(&seqNum);
static std::atomic<ULONG> s_seqNum = 0;
*pDriverHandle = ++s_seqNum;
// will need to look-up sampler from uint32 handle later
AddSamplerAndHandleNVX(*ppSamplerState, *pDriverHandle);