Skip to content

Commit

Permalink
[d3d11] Return error when mapping an already mapped image
Browse files Browse the repository at this point in the history
Final Fantasy XIV does this. Should avoid some unnecessary work.
  • Loading branch information
doitsujin committed Jul 5, 2019
1 parent 2f64f5b commit 1cc531e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/d3d11/d3d11_context_imm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ namespace dxvk {
if (unlikely(Subresource >= pResource->CountSubresources()))
return E_INVALIDARG;

if (unlikely(pResource->GetMapType(Subresource) != D3D11_MAP(~0u)))
return E_OUTOFMEMORY;

pResource->SetMapType(Subresource, MapType);

VkFormat packedFormat = m_parent->LookupPackedFormat(
Expand Down

0 comments on commit 1cc531e

Please sign in to comment.