Module: wine Branch: master Commit: 45a0e9596215589acf3b781ae6979fa41d4be7b0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=45a0e9596215589acf3b781ae6...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Jun 16 22:38:25 2011 +0200
wined3d: Only load the surface for partial updates in wined3d_device_update_surface().
---
dlls/wined3d/device.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 67c38aa..03f57ff 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4833,8 +4833,13 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, checkGLcall("glActiveTextureARB"); LEAVE_GL();
- /* Make sure the surface is loaded and up to date */ - surface_load_location(dst_surface, SFLAG_INTEXTURE, NULL); + /* Only load the surface for partial updates. For newly allocated texture + * the texture wouldn't be the current location, and we'd upload zeroes + * just to overwrite them again. */ + if (update_w == dst_w && update_h == dst_h) + surface_prepare_texture(dst_surface, gl_info, FALSE); + else + surface_load_location(dst_surface, SFLAG_INTEXTURE, NULL); surface_bind(dst_surface, gl_info, FALSE);
data.buffer_object = 0;