Module: vkd3d Branch: master Commit: f50e53e7c9e3d7bcd1197eb71ae251f4b320a3bf URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/f50e53e7c9e3d7bcd1197eb71ae251...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Thu Apr 13 15:32:22 2023 +1000
vkd3d: Use atomic exchange for descriptor writes.
The descriptor component of struct d3d12_desc is replaced with a union containing a pointer which can be swapped out using InterlockedExchangePointer(). To make it safe to increment the refcount of such an object it is necessary to cache freed objects. Elimination of the descriptor mutexes on games which use multithreaded descriptor writes nearly doubles framerate on recent hardware.
---
libs/vkd3d/command.c | 77 +++++----- libs/vkd3d/device.c | 31 ++-- libs/vkd3d/resource.c | 349 ++++++++++++++++++++++----------------------- libs/vkd3d/vkd3d_private.h | 176 ++++++++++++++++------- 4 files changed, 358 insertions(+), 275 deletions(-)