Skip to content

Fix: Set queue priority to 1.0f in all samples and docs#166

Merged
marty-johnson59 merged 1 commit intoKhronosGroup:mainfrom
gavrix32:fix/queue-priority
Nov 17, 2025
Merged

Fix: Set queue priority to 1.0f in all samples and docs#166
marty-johnson59 merged 1 commit intoKhronosGroup:mainfrom
gavrix32:fix/queue-priority

Conversation

@gavrix32
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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.

@SaschaWillems
Copy link
Copy Markdown
Collaborator

We agreed on using 0.5f instead for the samples and will change those. Can you update your PR accordingly?

@gavrix32
Copy link
Copy Markdown
Contributor Author

gavrix32 commented Nov 3, 2025

We agreed on using 0.5f instead for the samples and will change those. Can you update your PR accordingly?

Updated to 0.5f as requested. Thanks for the feedback!

@SaschaWillems
Copy link
Copy Markdown
Collaborator

Looks good to me.

We just merged a larger PR that reformats code, so in order to merge this you need to fix the merge conflicts.

@gavrix32 gavrix32 closed this Nov 9, 2025
@gavrix32 gavrix32 reopened this Nov 9, 2025
@marty-johnson59 marty-johnson59 merged commit 112dda1 into KhronosGroup:main Nov 17, 2025
10 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.

3 participants