mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[d3d9] Fix behavior on multiple image unlocks
This commit is contained in:
parent
bb227fa850
commit
77020760f1
1 changed files with 7 additions and 3 deletions
|
@ -4980,9 +4980,13 @@ namespace dxvk {
|
|||
|
||||
UINT Subresource = pResource->CalcSubresource(Face, MipLevel);
|
||||
|
||||
// We weren't locked anyway!
|
||||
if (unlikely(!pResource->GetLocked(Subresource)))
|
||||
return D3D_OK;
|
||||
// Don't allow multiple unlockings, except for D3DRTYPE_TEXTURE
|
||||
if (unlikely(!pResource->GetLocked(Subresource))) {
|
||||
if (pResource->GetType() == D3DRTYPE_TEXTURE)
|
||||
return D3D_OK;
|
||||
else
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
MapTexture(pResource, Subresource); // Add it to the list of mapped resources
|
||||
pResource->SetLocked(Subresource, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue