wined3d: Implement WINED3D_MAP_NOOVERWRITE support in adapter_vk_map_bo_address().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-04-17 20:21:11 +04:30 committed by Alexandre Julliard
parent 9529f08e1a
commit 3f459bb96d
1 changed files with 4 additions and 0 deletions

View File

@ -610,6 +610,9 @@ static void *adapter_vk_map_bo_address(struct wined3d_context *context,
vk_info = context_vk->vk_info; vk_info = context_vk->vk_info;
device_vk = wined3d_device_vk(context->device); device_vk = wined3d_device_vk(context->device);
if (map_flags & WINED3D_MAP_NOOVERWRITE)
goto map;
if (map_flags & WINED3D_MAP_READ) if (map_flags & WINED3D_MAP_READ)
{ {
if (!(vk_command_buffer = wined3d_context_vk_get_command_buffer(context_vk))) if (!(vk_command_buffer = wined3d_context_vk_get_command_buffer(context_vk)))
@ -647,6 +650,7 @@ static void *adapter_vk_map_bo_address(struct wined3d_context *context,
wined3d_context_vk_submit_command_buffer(context_vk, 0, NULL, NULL, 0, NULL); wined3d_context_vk_submit_command_buffer(context_vk, 0, NULL, NULL, 0, NULL);
wined3d_context_vk_wait_command_buffer(context_vk, bo->command_buffer_id); wined3d_context_vk_wait_command_buffer(context_vk, bo->command_buffer_id);
map:
if (!(map_ptr = wined3d_bo_vk_map(bo, context_vk))) if (!(map_ptr = wined3d_bo_vk_map(bo, context_vk)))
{ {
ERR("Failed to map bo.\n"); ERR("Failed to map bo.\n");