wined3d: Just call resource_unload() in updateSurfaceDesc().
Instead of trying to duplicate the functionality.
This commit is contained in:
parent
b474225386
commit
7b19efd9d5
|
@ -5455,16 +5455,8 @@ static HRESULT updateSurfaceDesc(struct wined3d_surface *surface,
|
||||||
while (surface->pow2Height < pPresentationParameters->BackBufferHeight) surface->pow2Height <<= 1;
|
while (surface->pow2Height < pPresentationParameters->BackBufferHeight) surface->pow2Height <<= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (surface->texture_name)
|
surface->resource.resource_ops->resource_unload(&surface->resource);
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
if (surface->pow2Width != pPresentationParameters->BackBufferWidth
|
if (surface->pow2Width != pPresentationParameters->BackBufferWidth
|
||||||
|| surface->pow2Height != pPresentationParameters->BackBufferHeight)
|
|| surface->pow2Height != pPresentationParameters->BackBufferHeight)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue