http://bugs.winehq.org/show_bug.cgi?id=59857 --- Comment #19 from Rodney <rod.huffaker@gmail.com> --- Found and fixed two related sources of D2D resource churn while working on a different application (RootsMagic 11) that hit the same kind of unbounded growth under Wine. Patches attached: 1. Attachment 82112 (d2d1-buffer-pooling) -- d2d_device_context_draw_geometry()/fill_geometry() in dlls/d2d1/device.c create a new D3D11 buffer via CreateBuffer for every DrawGeometry/FillGeometry call and free it right after, across up to 10 buffer roles (fill, bezier fill, arc fill, outline, bezier outline, arc outline). This replaces that with a small set of reusable DYNAMIC buffers per device context, updated via Map(D3D11_MAP_WRITE_DISCARD) instead of recreated on every call. 2. Attachment 82113 (d2d1-shader-caching) -- d2d_device_init() recompiles the built-in shape shaders via D3DCompile on every ID2D1Device creation, even though the shader source never changes. Some applications create many short-lived ID2D1Device wrappers around one stable underlying DXGI device; this caches the compiled shader blobs at process scope instead of per device. Both patches apply cleanly against current Wine source. In my own reproduction (RootsMagic's pedigree/family-tree view), a single busy render burst produced roughly 2,500 resource creations/sec, and the churn was severe enough to reliably exhaust a 32-bit process's address space (Out of memory, process had to be killed). After both patches, the same scenario works normally and a ~40 minute real-usage session showed zero allocation failures, versus thousands of failed allocations in the same scenario before. These don't address the ntdll heap subheap-retention behavior described above, but they remove a specific, very high-frequency source of transient buffer/shader-object churn in d2d1 that matches the "tens of thousands of D2D draw calls per second with transient geometry" workload signature described in this bug. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.