1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-11 19:24:11 +01:00

[d3d11] Fixup incorrect MiscFlags in D3D11Device::OpenSharedResourceGeneric()

So texture sharing works with vkd3d-proton before correcting flags
there.
This commit is contained in:
Paul Gofman 2023-07-05 20:07:07 -06:00 committed by Philip Rebohle
parent fc952a3ca3
commit 4893788d9b

View File

@ -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 {