[PATCH 1/5] wined3d: Add a performance warning for mapping a dynamic surface without WINED3D_MAP_DISCARD.

Henri Verbeet hverbeet at codeweavers.com
Thu Apr 18 02:35:11 CDT 2013


---
 dlls/wined3d/surface.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f7e99ab..e9c0b52 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -894,6 +894,9 @@ static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD
     }
     else
     {
+        if (surface->resource.usage & WINED3DUSAGE_DYNAMIC)
+            WARN_(d3d_perf)("Mapping a dynamic surface without WINED3D_MAP_DISCARD.\n");
+
         /* surface_load_location() does not check if the rectangle specifies
          * the full surface. Most callers don't need that, so do it here. */
         if (rect && !rect->top && !rect->left
-- 
1.8.1.5




More information about the wine-patches mailing list