mirror of
https://github.com/reactos/wine.git
synced 2025-02-27 08:15:36 +00:00
wined3d: Set the surface location to SFLAG_INSYSMEM for depth stencils on Reset.
This commit is contained in:
parent
3687207a04
commit
35bdc00479
@ -7048,9 +7048,13 @@ static void updateSurfaceDesc(IWineD3DSurfaceImpl *surface, WINED3DPRESENT_PARAM
|
|||||||
surface->resource.allocatedMemory = NULL;
|
surface->resource.allocatedMemory = NULL;
|
||||||
surface->resource.heapMemory = NULL;
|
surface->resource.heapMemory = NULL;
|
||||||
surface->resource.size = IWineD3DSurface_GetPitch((IWineD3DSurface *) surface) * surface->pow2Width;
|
surface->resource.size = IWineD3DSurface_GetPitch((IWineD3DSurface *) surface) * surface->pow2Width;
|
||||||
/* INDRAWABLE is a sane place for implicit targets / depth stencil after the reset */
|
/* INDRAWABLE is a sane place for implicit targets after the reset, INSYSMEM is more appropriate for depth stencils. */
|
||||||
|
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) {
|
||||||
|
IWineD3DSurface_ModifyLocation((IWineD3DSurface *) surface, SFLAG_INSYSMEM, TRUE);
|
||||||
|
} else {
|
||||||
IWineD3DSurface_ModifyLocation((IWineD3DSurface *) surface, SFLAG_INDRAWABLE, TRUE);
|
IWineD3DSurface_ModifyLocation((IWineD3DSurface *) surface, SFLAG_INDRAWABLE, TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI reset_unload_resources(IWineD3DResource *resource, void *data) {
|
static HRESULT WINAPI reset_unload_resources(IWineD3DResource *resource, void *data) {
|
||||||
TRACE("Unloading resource %p\n", resource);
|
TRACE("Unloading resource %p\n", resource);
|
||||||
|
@ -572,7 +572,11 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
|
|||||||
* uninitialized drawable. That's pointless and we'd have to allocate the texture /
|
* uninitialized drawable. That's pointless and we'd have to allocate the texture /
|
||||||
* sysmem copy here.
|
* sysmem copy here.
|
||||||
*/
|
*/
|
||||||
|
if (This->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) {
|
||||||
|
IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE);
|
||||||
|
} else {
|
||||||
IWineD3DSurface_ModifyLocation(iface, SFLAG_INDRAWABLE, TRUE);
|
IWineD3DSurface_ModifyLocation(iface, SFLAG_INDRAWABLE, TRUE);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Load the surface into system memory */
|
/* Load the surface into system memory */
|
||||||
IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL);
|
IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user