From 261a242486adde570f19ff69e9d042c428ac2aae Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 19 Feb 2020 18:05:50 +0000 Subject: [PATCH] [d3d9] Disallow GetFrontBufferData for anything but D3DPOOL_SYSTEMMEM Fixes #1464 --- src/d3d9/d3d9_swapchain.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d9/d3d9_swapchain.cpp b/src/d3d9/d3d9_swapchain.cpp index 60ea67e2f..28c681931 100644 --- a/src/d3d9/d3d9_swapchain.cpp +++ b/src/d3d9/d3d9_swapchain.cpp @@ -172,6 +172,9 @@ namespace dxvk { D3D9CommonTexture* dstTexInfo = dst->GetCommonTexture(); D3D9CommonTexture* srcTexInfo = m_backBuffers[m_presentParams.BackBufferCount]->GetCommonTexture(); + if (unlikely(dstTexInfo->Desc()->Pool != D3DPOOL_SYSTEMMEM)) + return D3DERR_INVALIDCALL; + Rc dstBuffer = dstTexInfo->GetBuffer(dst->GetSubresource()); Rc srcImage = srcTexInfo->GetImage();