Module: wine Branch: master Commit: 7b19efd9d5ca38ed844bbbebcec3b2cdd650a48c URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b19efd9d5ca38ed844bbbebce...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Aug 22 21:02:46 2011 +0200
wined3d: Just call resource_unload() in updateSurfaceDesc().
Instead of trying to duplicate the functionality.
---
dlls/wined3d/device.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 0fa385c..3e616da 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5455,16 +5455,8 @@ static HRESULT updateSurfaceDesc(struct wined3d_surface *surface, while (surface->pow2Height < pPresentationParameters->BackBufferHeight) surface->pow2Height <<= 1; }
- if (surface->texture_name) - { - struct wined3d_context *context = context_acquire(device, NULL); - ENTER_GL(); - glDeleteTextures(1, &surface->texture_name); - LEAVE_GL(); - context_release(context); - surface->texture_name = 0; - surface->flags &= ~SFLAG_CLIENT; - } + surface->resource.resource_ops->resource_unload(&surface->resource); + if (surface->pow2Width != pPresentationParameters->BackBufferWidth || surface->pow2Height != pPresentationParameters->BackBufferHeight) {