mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 04:54:15 +01:00
[d3d9] Fix behavior on multiple image unlocks
This commit is contained in:
parent
bb227fa850
commit
77020760f1
@ -4980,9 +4980,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
UINT Subresource = pResource->CalcSubresource(Face, MipLevel);
|
UINT Subresource = pResource->CalcSubresource(Face, MipLevel);
|
||||||
|
|
||||||
// We weren't locked anyway!
|
// Don't allow multiple unlockings, except for D3DRTYPE_TEXTURE
|
||||||
if (unlikely(!pResource->GetLocked(Subresource)))
|
if (unlikely(!pResource->GetLocked(Subresource))) {
|
||||||
return D3D_OK;
|
if (pResource->GetType() == D3DRTYPE_TEXTURE)
|
||||||
|
return D3D_OK;
|
||||||
|
else
|
||||||
|
return D3DERR_INVALIDCALL;
|
||||||
|
}
|
||||||
|
|
||||||
MapTexture(pResource, Subresource); // Add it to the list of mapped resources
|
MapTexture(pResource, Subresource); // Add it to the list of mapped resources
|
||||||
pResource->SetLocked(Subresource, false);
|
pResource->SetLocked(Subresource, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user