GPU: drawing queue at high priority and the process in the card's high class (VICTORY_QUEUE_HIGH, VICTORY_GPU_PRIO, on; =0 off) #3921

Open
101Leafy wants to merge 1 commit from upstream-pr/3921 into main
101Leafy commented 2026-12-01 01:27:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by 101Leafy on 2026-12-01T01:27:12Z.


Over 61 runs the twelve unchanged passes took from 24 to 52 ms a frame for the same work and bytes. The slow runs were the ones with other programs busy on the card beside the game. Every pass slowed, the long dispatches most, which is what sharing the card in time slices looks like.

The drawing queue is now made at D3D12_COMMAND_QUEUE_PRIORITY_HIGH, and the process asks for the high class in the card's scheduler (D3DKMTSetProcessSchedulingPriorityClass, class 4, which needs no admin rights; realtime is not used). The result of both goes to the log.

On by default. VICTORY_QUEUE_HIGH=0 keeps the queue at normal priority. VICTORY_GPU_PRIO=0 (or normal) leaves the process class alone, VICTORY_GPU_PRIO=above asks for above normal instead.

cargo clippy -p victory-gpu -- -D warnings is clean.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5577031834 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3921). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-12-01T01:27:12Z. --- Over 61 runs the twelve unchanged passes took from 24 to 52 ms a frame for the same work and bytes. The slow runs were the ones with other programs busy on the card beside the game. Every pass slowed, the long dispatches most, which is what sharing the card in time slices looks like. The drawing queue is now made at `D3D12_COMMAND_QUEUE_PRIORITY_HIGH`, and the process asks for the high class in the card's scheduler (`D3DKMTSetProcessSchedulingPriorityClass`, class 4, which needs no admin rights; realtime is not used). The result of both goes to the log. On by default. `VICTORY_QUEUE_HIGH=0` keeps the queue at normal priority. `VICTORY_GPU_PRIO=0` (or `normal`) leaves the process class alone, `VICTORY_GPU_PRIO=above` asks for above normal instead. `cargo clippy -p victory-gpu -- -D warnings` is clean.
passerbyyhx commented 2026-12-01 14:08:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T14:08:42Z.


I checked the actual D3D12 queue and process scheduling settings at 25ac4c69 in fresh processes on an RTX 4090 Laptop and Microsoft WARP. Both reported the same (queue priority, process class) values from ID3D12CommandQueue::GetDesc and D3DKMTGetProcessSchedulingPriorityClass:

Environment Queue Process class
Defaults 100 4
VICTORY_QUEUE_HIGH=0, VICTORY_GPU_PRIO=0 0 2
VICTORY_QUEUE_HIGH=0, VICTORY_GPU_PRIO=above 0 3
VICTORY_GPU_PRIO=normal 100 2

All eight processes started in class 2. This checks that the requested settings took effect. Frame time under contention remains unmeasured.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7313765184 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3921#issuecomment-7313765184). Originally posted by [passerbyyhx](https://github.com/passerbyyhx) on 2026-12-01T14:08:42Z. --- I checked the actual D3D12 queue and process scheduling settings at `25ac4c69` in fresh processes on an RTX 4090 Laptop and Microsoft WARP. Both reported the same `(queue priority, process class)` values from `ID3D12CommandQueue::GetDesc` and `D3DKMTGetProcessSchedulingPriorityClass`: | Environment | Queue | Process class | |---|---:|---:| | Defaults | 100 | 4 | | `VICTORY_QUEUE_HIGH=0`, `VICTORY_GPU_PRIO=0` | 0 | 2 | | `VICTORY_QUEUE_HIGH=0`, `VICTORY_GPU_PRIO=above` | 0 | 3 | | `VICTORY_GPU_PRIO=normal` | 100 | 2 | All eight processes started in class 2. This checks that the requested settings took effect. Frame time under contention remains unmeasured.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3921:upstream-pr/3921'
git switch 'upstream-pr/3921'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3921'
git switch 'upstream-pr/3921'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3921'
git switch 'upstream-pr/3921'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3921'
git switch 'main'
git merge --squash 'upstream-pr/3921'
git switch 'main'
git merge --ff-only 'upstream-pr/3921'
git switch 'main'
git merge 'upstream-pr/3921'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!3921
No description provided.