Commit 7b19efd9 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Just call resource_unload() in updateSurfaceDesc().

Instead of trying to duplicate the functionality.
parent b4742253
......@@ -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)
{
......
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