[d3d9] Fix for missing restriction check in UpdateSurface.

The spec of IDirect3DDevice9::UpdateSurface contains the following restriction:
- Neither surface can be created with multisampling.
  The only valid flag for both surfaces is D3DMULTISAMPLE_NONE.

This commit adds this check and returns D3DERR_INVALIDCALL
when source or destination surfaces are multisampled.
This commit is contained in:
Krzysztof Dobrowolski 2022-08-24 11:29:16 +02:00 committed by Joshie
parent 2890f690f6
commit 19b76825d0
1 changed files with 6 additions and 0 deletions

View File

@ -746,6 +746,12 @@ namespace dxvk {
if (unlikely(srcTextureInfo->Desc()->Format != dstTextureInfo->Desc()->Format))
return D3DERR_INVALIDCALL;
if (unlikely(srcTextureInfo->Desc()->MultiSample != D3DMULTISAMPLE_NONE))
return D3DERR_INVALIDCALL;
if (unlikely(dstTextureInfo->Desc()->MultiSample != D3DMULTISAMPLE_NONE))
return D3DERR_INVALIDCALL;
const DxvkFormatInfo* formatInfo = lookupFormatInfo(dstTextureInfo->GetFormatMapping().FormatColor);
VkOffset3D srcOffset = { 0u, 0u, 0u };