From: Henri Verbeet hverbeet@codeweavers.com
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 ebaa0a9426864cfa6e36955f26ff4c66c1d5af76, and exposed by running the ddraw tests with the "no3d" renderer. --- dlls/wined3d/swapchain.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 84dcdb5b110..99d717641e1 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -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) {