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

wined3d: Request VK_MEMORY_PROPERTY_HOST_CACHED_BIT for WINED3D_RESOURCE_ACCESS_MAP_R buffers.

Unsurprisingly, reading for uncached memory may be very slow. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ddd55cad
......@@ -1394,6 +1394,8 @@ static BOOL wined3d_buffer_vk_create_buffer_object(struct wined3d_buffer_vk *buf
memory_type = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
if (!(resource->usage & WINED3DUSAGE_DYNAMIC))
memory_type |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
if (resource->access & WINED3D_RESOURCE_ACCESS_MAP_R)
memory_type |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
if (!(wined3d_context_vk_create_bo(context_vk, resource->size, usage, memory_type, &buffer_vk->bo)))
{
......
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