Skip to content

Commit

Permalink
[d3d11] Fixup incorrect MiscFlags in D3D11Device::OpenSharedResourceG…
Browse files Browse the repository at this point in the history
…eneric()

So texture sharing works with vkd3d-proton before correcting flags
there.
  • Loading branch information
Paul Gofman authored and doitsujin committed Jul 16, 2023
1 parent fc952a3 commit 4893788
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/d3d11/d3d11_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4893788

Please sign in to comment.