dev_data->eventMap[event].needsSignaled = false;
dev_data->eventMap[event].stageMask = VK_PIPELINE_STAGE_HOST_BIT;
loader_platform_thread_unlock_mutex(&globalLock);
+ // Host setting event is visible to all queues immediately so update stageMask for any queue that's seen this event
+ // TODO : For correctness this needs separate fix to verify that app doesn't make incorrect assumptions about the
+ // ordering of this command in relation to vkCmd[Set|Reset]Events (see GH297)
+ for (auto queue_data : dev_data->queueMap) {
+ auto event_entry = queue_data.second.eventToStageMap.find(event);
+ if (event_entry != queue_data.second.eventToStageMap.end()) {
+ event_entry->second |= VK_PIPELINE_STAGE_HOST_BIT;
+ }
+ }
VkResult result = dev_data->device_dispatch_table->SetEvent(device, event);
return result;
}