Module: wine Branch: master Commit: f257daf390362d88972502551b6fe2d15996f0d6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f257daf390362d88972502551...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Feb 17 23:01:36 2022 -0600
wined3d: Do not allocate upload bufers for resources pinned to system memory.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/cs.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 9f4a39cfe7e..027a6786717 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3092,6 +3092,12 @@ static bool wined3d_cs_map_upload_bo(struct wined3d_device_context *context, str return NULL; }
+ if (resource->pin_sysmem) + { + TRACE("Not allocating an upload buffer because system memory is pinned for this resource.\n"); + return NULL; + } + if (flags & WINED3D_MAP_DISCARD) { if (!device->adapter->adapter_ops->adapter_alloc_bo(device, resource, sub_resource_idx, &addr))