Commit e600f7d0 authored by Felix Nawothnig's avatar Felix Nawothnig Committed by Alexandre Julliard

wined3d: Issue an error when the render target is read back without SFLAG_INDRAWABLE being set.

parent 2d0016c5
...@@ -1788,6 +1788,7 @@ static BOOL palette9_changed(IWineD3DSurfaceImpl *This) { ...@@ -1788,6 +1788,7 @@ static BOOL palette9_changed(IWineD3DSurfaceImpl *This) {
static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
GLenum format, internal, type; GLenum format, internal, type;
CONVERT_TYPES convert; CONVERT_TYPES convert;
int bpp; int bpp;
...@@ -1862,7 +1863,13 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { ...@@ -1862,7 +1863,13 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
TRACE("Updated target %d\n", This->glDescription.target); TRACE("Updated target %d\n", This->glDescription.target);
} }
return WINED3D_OK; 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 */ /* Otherwise: System memory copy must be most up to date */
if(This->CKeyFlags & DDSD_CKSRCBLT) { if(This->CKeyFlags & DDSD_CKSRCBLT) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment