Skip to content

vulkan: Fix queue retrieval and family selection for frame warm up - #33

Merged
olehkuznetsov merged 1 commit into
android-graphics:devfrom
olehkuznetsov:warm-up-fix
Aug 13, 2026
Merged

olehkuznetsov merged 1 commit into
android-graphics:devfrom
olehkuznetsov:warm-up-fix

Conversation

@olehkuznetsov

Copy link
Copy Markdown

When initializing VulkanFrameWarmUp, vkGetDeviceQueue was previously called directly with hardcoded family 0 and queue 0.

If the application created the device with queue flags (such as VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT) or non-zero family indices, calling vkGetDeviceQueue causes a crash in Vulkan drivers (such as on Android).

This change:

  • Uses FindComputeQueueFamilyIndex to find the compute-capable queue family.
  • Uses GetDeviceQueue helper from decoder_util.h to properly dispatch vkGetDeviceQueue2 when queue creation flags are present.
  • Sets cmd_pool_info.queueFamilyIndex to the resolved compute queue family.

When initializing VulkanFrameWarmUp, vkGetDeviceQueue was previously
called directly with hardcoded family 0 and queue 0.

If the application created the device with queue flags (such as
VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT) or non-zero family indices,
calling vkGetDeviceQueue causes a crash in Vulkan drivers (such as on
Android).

This change:
- Uses FindComputeQueueFamilyIndex to find the compute-capable queue family.
- Uses GetDeviceQueue helper to properly dispatch vkGetDeviceQueue2 when
  queue creation flags are present.
- Sets cmd_pool_info.queueFamilyIndex to the resolved queue family.
@olehkuznetsov
olehkuznetsov merged commit 4b8e00f into android-graphics:dev Aug 13, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant