Giovanni Mascellani (@giomasce) commented about tests/shader_runner_vulkan.c:
break; }
+ case RESOURCE_TYPE_BUFFER_UAV: + format = vkd3d_get_vk_format(params->format); + + resource->buffer = create_buffer(runner, params->data_size, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, &resource->memory); + resource->buffer_view = create_buffer_view(runner, resource->buffer, format); + + VK_CALL(vkMapMemory(device, resource->memory, 0, VK_WHOLE_SIZE, 0, &data)); + memcpy(data, params->data, params->data_size); + VK_CALL(vkUnmapMemory(device, resource->memory));
That's probably out of scope (since the problem already exists), but I don't think we're guaranteed to have coherent memory here, so we should flush before unmapping. Or request coherent memory (though in practice we're probably going to get coherent memory anyway). -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/193#note_33078