wined3d: Make sure we have an active GL context in IWineD3DSurfaceImpl_UnLoad().
This commit is contained in:
parent
181442a6a2
commit
db5b126da6
|
@ -836,6 +836,7 @@ static void surface_remove_pbo(IWineD3DSurfaceImpl *This) {
|
|||
static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
|
||||
IWineD3DBaseTexture *texture = NULL;
|
||||
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
|
||||
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
|
||||
renderbuffer_entry_t *entry, *entry2;
|
||||
TRACE("(%p)\n", iface);
|
||||
|
||||
|
@ -866,6 +867,8 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
|
|||
IWineD3DSurface_ModifyLocation(iface, SFLAG_INSRGBTEX, FALSE);
|
||||
This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
|
||||
|
||||
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
|
||||
/* Destroy PBOs, but load them into real sysmem before */
|
||||
if(This->Flags & SFLAG_PBO) {
|
||||
surface_remove_pbo(This);
|
||||
|
|
Loading…
Reference in New Issue