From 92ee9c7ef119c93fee341c3c8af6f701f3977523 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Tue, 4 Feb 2020 22:37:44 +0000 Subject: [PATCH] [d3d9] Error on StretchRect when not D3DPOOL_DEFAULT --- src/d3d9/d3d9_device.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 748de112d..3fbc0743c 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -851,6 +851,10 @@ namespace dxvk { D3D9CommonTexture* dstTextureInfo = dst->GetCommonTexture(); D3D9CommonTexture* srcTextureInfo = src->GetCommonTexture(); + if (unlikely(dstTextureInfo->Desc()->Pool != D3DPOOL_DEFAULT || + srcTextureInfo->Desc()->Pool != D3DPOOL_DEFAULT)) + return D3DERR_INVALIDCALL; + Rc dstImage = dstTextureInfo->GetImage(); Rc srcImage = srcTextureInfo->GetImage();