Commit da574ed9 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Don't validate the frontbuffer's DRAWABLE location in…

wined3d: Don't validate the frontbuffer's DRAWABLE location in wined3d_swapchain_resize_buffers() when NO3D is set. In general, NO3D surfaces are always in SYSMEM. More importantly though, validating DRAWABLE will evict SYSMEM, but a subsequent wined3d_texture_no3d_load_location() won't recreate it because it's always supposed to be current. This fixes a regression introduced by commit ebaa0a94, and exposed by running the ddraw tests with the "no3d" renderer.
parent fa4be547
......@@ -2004,8 +2004,11 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha
ERR("Something's still holding the front buffer (%p).\n", swapchain->front_buffer);
swapchain->front_buffer = new_texture;
wined3d_texture_validate_location(swapchain->front_buffer, 0, WINED3D_LOCATION_DRAWABLE);
wined3d_texture_invalidate_location(swapchain->front_buffer, 0, ~WINED3D_LOCATION_DRAWABLE);
if (!(swapchain->device->wined3d->flags & WINED3D_NO3D))
{
wined3d_texture_validate_location(swapchain->front_buffer, 0, WINED3D_LOCATION_DRAWABLE);
wined3d_texture_invalidate_location(swapchain->front_buffer, 0, ~WINED3D_LOCATION_DRAWABLE);
}
for (i = 0; i < desc->backbuffer_count; ++i)
{
......
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