Commit d640018a authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Only set SFLAG_DYNLOCK when map_binding = sysmem.

All other map bindings are never freed. Setting SFLAG_DYNLOCK if map_binding != sysmem might only keep a heap memory allocation around (e.g. after device_reset) that is never used.
parent 5630cb5d
......@@ -3068,7 +3068,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
* mapped regularly do not throw away the system memory copy. This avoids
* the need to download the surface from OpenGL all the time. The surface
* is still downloaded if the OpenGL texture is changed. */
if (!(surface->flags & SFLAG_DYNLOCK))
if (!(surface->flags & SFLAG_DYNLOCK) && surface->map_binding == WINED3D_LOCATION_SYSMEM)
{
if (++surface->lockCount > MAXLOCKCOUNT)
{
......
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