Commit 9d124c35f63fc4c8ce8525e477e747f94595be17

Charlie Lao 2024-05-21T10:36:27

Vulkan: Store QueueIndex in DeviceQueueMap VkGetDeviceQueue call takes two indices: queueFamilyIndex and queueIndex. Right now DeviceQueueMap only stores queueFamilyIndex. This CL also stores queueIndex in the DeviceQueueMap. In later CL, we are going to expose this queueIndex to vk::Context and vk::ImageHelper along with queueFamilyIndex. In order to do it in a cleaner way, this CL mostly involves cleanup. Previously DeviceQueueMap is a subclass of angle::PackedEnumMap. In this CL, DeviceQueueMap has mQueueAndIndices data member that maps priority to devicePriority/queueIndex/VkQueue. Previously DeviceQueueMap was created in Renderer::createDeviceAndQueue() and then passed to CommandQueue::init(), which copies to mQueueMap. This CL removes the copy. It now calls mQueueMap.initialize() directly from CommandQueue::init(). This CL also cleans up relationship between QueueFamily and DeviceQueueMap. Before this CL, QueueFamily::initializeQueueMap() initialiazes DeviceQueueMap object. After this CL, that logic now moves to DeviceQueueMap::initialize(). QueueFamily no longer modifies DeviceQueueMap class. No functional change is expected. Bug: b/337135577 Change-Id: I3f96fb78aedc89d96d6235b060c88b769bdd1e24 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5553066 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>