mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 01:24:11 +01:00
[d3d9] Fix race condition in PIX events
This commit is contained in:
parent
b8ce414820
commit
4e07302cbf
@ -127,6 +127,7 @@ namespace dxvk {
|
||||
INT STDMETHODCALLTYPE D3D9UserDefinedAnnotation::BeginEvent(
|
||||
D3DCOLOR Color,
|
||||
LPCWSTR Name) {
|
||||
D3D9DeviceLock lock = m_container->LockDevice();
|
||||
m_container->EmitCs([color = Color, labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
|
||||
VkDebugUtilsLabelEXT label;
|
||||
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
|
||||
@ -143,6 +144,7 @@ namespace dxvk {
|
||||
|
||||
|
||||
INT STDMETHODCALLTYPE D3D9UserDefinedAnnotation::EndEvent() {
|
||||
D3D9DeviceLock lock = m_container->LockDevice();
|
||||
m_container->EmitCs([](DxvkContext *ctx) {
|
||||
ctx->endDebugLabel();
|
||||
});
|
||||
@ -155,6 +157,7 @@ namespace dxvk {
|
||||
void STDMETHODCALLTYPE D3D9UserDefinedAnnotation::SetMarker(
|
||||
D3DCOLOR Color,
|
||||
LPCWSTR Name) {
|
||||
D3D9DeviceLock lock = m_container->LockDevice();
|
||||
m_container->EmitCs([color = Color, labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
|
||||
VkDebugUtilsLabelEXT label;
|
||||
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
|
||||
|
Loading…
Reference in New Issue
Block a user