From 67b1ee4f9b4fd2066579ab91d61eeca0b4ea7dbb Mon Sep 17 00:00:00 2001 From: Christopher Egert Date: Thu, 21 May 2020 01:39:24 +0200 Subject: [PATCH] [d3d9] Only allow ColorFill on surfaces in D3DPOOL_DEFAULT Both nine and native nvidia d3d9 seems to do this, this fixes a crash in spacemail by xplsv. --- src/d3d9/d3d9_device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index d91c3d342..97341f91d 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -1035,6 +1035,9 @@ namespace dxvk { D3D9CommonTexture* dstTextureInfo = dst->GetCommonTexture(); + if (unlikely(dstTextureInfo->Desc()->Pool != D3DPOOL_DEFAULT)) + return D3DERR_INVALIDCALL; + VkExtent3D mipExtent = dstTextureInfo->GetExtentMip(dst->GetSubresource()); VkOffset3D offset = VkOffset3D{ 0u, 0u, 0u };