Skip to content

Conversation

gavrix32
Copy link

Replaced all instances of:

float queuePriority = 0.0f;

with:

float queuePriority = 1.0f;

Updated in both .adoc and .cpp files (33 total), to reflect best practice.

1.0f is the recommended queue priority, even in single-queue setups, to avoid confusion for beginners and ensure optimal execution priority.

@SaschaWillems SaschaWillems self-requested a review September 18, 2025 16:09
@SaschaWillems
Copy link
Collaborator

1.0f is the recommended queue priority, even in single-queue setups, to avoid confusion for beginners and ensure optimal execution priority.

Where is that coming from? Do you have sources for this?

@gavrix32
Copy link
Author

gavrix32 commented Sep 19, 2025

1.0f is the recommended queue priority, even in single-queue setups, to avoid confusion for beginners and ensure optimal execution priority.

Where is that coming from? Do you have sources for this?

The use of 1.0f is consistent with the official Khronos Hello Triangle sample, which sets full priority even for a single queue.

The Vulkan specification (section 5.3.4 – Queue Priority) defines 1.0f as the highest priority and 0.0f as the lowest. Using 1.0f avoids any unintended deprioritization and better reflects developer intent.

@SaschaWillems
Copy link
Collaborator

Using 1.0f avoids any unintended deprioritization and better reflects developer intent.

I have never heard of that nor did I ever experience that. What is that "deprioritization" part based on?

@gavrix32
Copy link
Author

Using 1.0f avoids any unintended deprioritization and better reflects developer intent.

I have never heard of that nor did I ever experience that. What is that "deprioritization" part based on?

It's not based on a known issue — just on the spec wording that higher-priority queues may get more time. I used “deprioritization” in the sense of avoiding future ambiguity if other queues were added. It’s mostly about explicit intent and clearer code, especially in tutorials.

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.

2 participants