P3: -gr_sync_validation reports itself enabled but never turns on synchronization validation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Start in VulkanRenderer::initializeInstance, where the non-OpenXR path passes the bare createInfo to vk::createInstanceUnique. Compare it with the OpenXR branch, which passes the head of createInstanceChain. Build in Debug with Vulkan, run with -gr_sync_validation, and check fs2_open.log for SYNC-HAZARD lines. Done when the flag alone reports the same hazards that VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true reports.
Written by the indexing model from the issue text.
Description
Problem
-gr_sync_validation does not turn on Vulkan synchronization validation. The log says "Vulkan: Synchronization validation enabled (-gr_sync_validation)", but no synchronization hazards are ever reported, so a clean run with the flag proves nothing. Outside OpenXR, vk::createInstanceUnique is passed the bare createInfo instead of the head of the structure chain, so the validation-features struct (and the debug messenger meant to catch messages during instance creation) never reaches the driver. The OpenXR branch passes the chain correctly.
Steps to reproduce
- Build current master (tested on 8afa31842) in Debug with Vulkan, MediaVPs 5.0.2, no other mods.
- Run SM1-01 with
-vulkan -gr_sync_validationfor about 20 seconds of gameplay.fs2_open.log: the "Synchronization validation enabled" line, 0 lines containingSYNC-HAZARD. - Run the same thing again with the environment variable
VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true(which turns the same check on from the validation layer's side).fs2_open.log: 10SYNC-HAZARD-WRITE-AFTER-WRITElines fromvkCmdClearAttachmentsin the same 20 seconds.
Expected vs. actual behavior
- Expected: the flag alone reports the same hazards as step 3.
- Actual: the flag alone reports none, while the log claims it is on.
Proposed fixes
- In
VulkanRenderer::initializeInstance, passcreateInstanceChain.get<vk::InstanceCreateInfo>()tovk::createInstanceUnique, as the OpenXR branch already does. - Same change, plus a one-time check after instance creation that logs whether the layer accepted synchronization validation, so the log line reflects what actually happened.
- Same change, plus a note in the flag's help text that
VK_KHRONOS_VALIDATION_VALIDATE_SYNC=trueworks as a fallback on older builds.
The hazards in step 3 are reported as observed; I have not looked into whether each is a real problem.
- Dominant language
- C++
- Stars
- 488
- Forks
- 184
- Avg merge
- 5d 35m
- Merged PRs (30d)
- 29
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scp-fs2open/fs2open.github.com
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
scp-fs2open/fs2open.github.com#7969 ·
Maintainers usually reply within 1 day
-
P4: Standalone web API can read past its request buffer on a large request bodyPossibly taken @dustinspace217 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
scp-fs2open/fs2open.github.com#7965 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
scp-fs2open/fs2open.github.com#7956 ·
Maintainers usually reply within 1 day
-
bug HUD LLM-suggested
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
scp-fs2open/fs2open.github.com#7953 ·
Maintainers usually reply within 1 day
-
P4: Lua io.AxisInverted always failsPossibly taken @Goober5000 claimed this 30 days ago. Openbug controls LLM-suggested
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
scp-fs2open/fs2open.github.com#7946 · 3 comments ·
Maintainers usually reply within 1 day
All issues in scp-fs2open/fs2open.github.com
Similar issues
-
bug libcudf
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
level/task module/cloud monitoring type/maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LadybirdBrowser/ladybird#13809 ·
Maintainers usually reply within 1 day
-
bug module:nodes tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rocketride-org/rocketride-server#3020 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 9 days