Module: wine Branch: master Commit: e600f7d0822c58ed557fe4b3aaa729f67ce01f95 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e600f7d0822c58ed557fe4b3aa...
Author: Felix Nawothnig flexo@holycrap.org Date: Sun Apr 8 00:56:45 2007 +0200
wined3d: Issue an error when the render target is read back without SFLAG_INDRAWABLE being set.
---
dlls/wined3d/surface.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index af90b61..526c311 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1788,6 +1788,7 @@ static BOOL palette9_changed(IWineD3DSurfaceImpl *This) {
static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; + IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; GLenum format, internal, type; CONVERT_TYPES convert; int bpp; @@ -1862,7 +1863,13 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { TRACE("Updated target %d\n", This->glDescription.target); } return WINED3D_OK; - } + } else + /* The only place where LoadTexture() might get called when isInDraw=1 + * is ActivateContext where lastActiveRenderTarget is preloaded. + */ + if(iface == device->lastActiveRenderTarget && device->isInDraw) + ERR("Reading back render target but SFLAG_INDRAWABLE not set\n"); + /* Otherwise: System memory copy must be most up to date */
if(This->CKeyFlags & DDSD_CKSRCBLT) {