Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gofman <pgofman@codeweavers.com>2023-07-06 05:07:07 +0300
committerPhilip Rebohle <25567304+doitsujin@users.noreply.github.com>2023-07-16 16:34:39 +0300
commit4893788d9b0919abab97ab261de78f63b9c7e6ca (patch)
treebe93d8adda203b4bc59737f5cd471695c91a677c
parentfc952a3ca360e32cdbae6404c39c22a09feddb86 (diff)
[d3d11] Fixup incorrect MiscFlags in D3D11Device::OpenSharedResourceGeneric()
So texture sharing works with vkd3d-proton before correcting flags there.
-rw-r--r--src/d3d11/d3d11_device.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp
index bc107eff..9398e484 100644
--- a/src/d3d11/d3d11_device.cpp
+++ b/src/d3d11/d3d11_device.cpp
@@ -2309,6 +2309,10 @@ namespace dxvk {
d3d11Desc.CPUAccessFlags = metadata.CPUAccessFlags;
d3d11Desc.MiscFlags = metadata.MiscFlags;
d3d11Desc.TextureLayout = metadata.TextureLayout;
+ if ((d3d11Desc.MiscFlags & D3D11_RESOURCE_MISC_SHARED_NTHANDLE) && !(d3d11Desc.MiscFlags & (D3D11_RESOURCE_MISC_SHARED | D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX))) {
+ Logger::warn("Fixing up wrong MiscFlags");
+ d3d11Desc.MiscFlags |= D3D11_RESOURCE_MISC_SHARED;
+ }
// Only 2D textures may be shared
try {