mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 04:54:15 +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(
|
INT STDMETHODCALLTYPE D3D9UserDefinedAnnotation::BeginEvent(
|
||||||
D3DCOLOR Color,
|
D3DCOLOR Color,
|
||||||
LPCWSTR Name) {
|
LPCWSTR Name) {
|
||||||
|
D3D9DeviceLock lock = m_container->LockDevice();
|
||||||
m_container->EmitCs([color = Color, labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
|
m_container->EmitCs([color = Color, labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
|
||||||
VkDebugUtilsLabelEXT label;
|
VkDebugUtilsLabelEXT label;
|
||||||
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
|
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
|
||||||
@ -143,6 +144,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
INT STDMETHODCALLTYPE D3D9UserDefinedAnnotation::EndEvent() {
|
INT STDMETHODCALLTYPE D3D9UserDefinedAnnotation::EndEvent() {
|
||||||
|
D3D9DeviceLock lock = m_container->LockDevice();
|
||||||
m_container->EmitCs([](DxvkContext *ctx) {
|
m_container->EmitCs([](DxvkContext *ctx) {
|
||||||
ctx->endDebugLabel();
|
ctx->endDebugLabel();
|
||||||
});
|
});
|
||||||
@ -155,6 +157,7 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE D3D9UserDefinedAnnotation::SetMarker(
|
void STDMETHODCALLTYPE D3D9UserDefinedAnnotation::SetMarker(
|
||||||
D3DCOLOR Color,
|
D3DCOLOR Color,
|
||||||
LPCWSTR Name) {
|
LPCWSTR Name) {
|
||||||
|
D3D9DeviceLock lock = m_container->LockDevice();
|
||||||
m_container->EmitCs([color = Color, labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
|
m_container->EmitCs([color = Color, labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
|
||||||
VkDebugUtilsLabelEXT label;
|
VkDebugUtilsLabelEXT label;
|
||||||
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
|
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user