Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- This is a bit unfortunate, because, but for this patch, we could get rid of wined3d_map_persistent() entirely. On the other hand, this could potentially go away if we change to a different scheme for determining when to unmap buffers.
dlls/wined3d/cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 5d3a2cc9076..f92c584500b 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3131,7 +3131,10 @@ static bool wined3d_cs_map_upload_bo(struct wined3d_device_context *context, str if (bo) { map_ptr += bo->memory_offset; - if (!bo->coherent) + /* If we are not mapping all buffers persistently, use + * UPDATE_SUB_RESOURCE as a means of telling the CS thread to try + * to unmap the resource, so that we can free VA space. */ + if (!bo->coherent || !wined3d_map_persistent()) client->mapped_upload.flags |= UPLOAD_BO_UPLOAD_ON_UNMAP; } map_desc->data = resource_offset_map_pointer(resource, sub_resource_idx, map_ptr, box);