Commit 0feb72f0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Handle client storage in surface_remove_pbo().

parent 317d5406
......@@ -1766,9 +1766,14 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
{
surface->resource.allocatedMemory = surface->dib.bitmap_data;
}
else if (!surface->resource.heapMemory)
else
{
surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), 0, surface->resource.size + RESOURCE_ALIGNMENT);
if (!surface->resource.heapMemory)
surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), 0, surface->resource.size + RESOURCE_ALIGNMENT);
else if (!(surface->flags & SFLAG_CLIENT))
ERR("Surface %p has heapMemory %p and flags %#x.\n",
surface, surface->resource.heapMemory, surface->flags);
surface->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)surface->resource.heapMemory
+ (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1));
}
......
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