Vulkan: stable main FBO extent for temporal/Forward+/post queries#128
Merged
cursor[bot] merged 1 commit intomainfrom Apr 20, 2026
Merged
Conversation
Store main FBO color attachment dimensions when attachments are built and have vk_get_render_target_width/height prefer them while FBO is active. Auxiliary passes that temporarily overwrite vk.renderWidth no longer skew Forward+, post params, temporal resets, or scissor clamping. Document the behavior in RENDERER_2026_ARCHITECTURE_PASS.md. Co-authored-by: Tim Fox <timfox@outlook.com>
There was a problem hiding this comment.
Security review complete for this PR diff.
I did not find any medium/high/critical vulnerabilities introduced by these changes.
Validated areas:
- Data flow around
vk.mainColorWidth/vk.mainColorHeightassignment and reads - Bounds/fallback behavior when attachment state is created/destroyed
- Potential attacker-controlled input paths to memory/indexing/synchronization sinks
Result: changes are limited to renderer-internal extent bookkeeping and do not expose a plausible security exploit path in the modified code.
Sent by Cursor Automation: Find vulnerabilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Several subsystems (
vk_get_render_target_width/height, Forward+ packing, post FX params, temporal size checks) previously depended onvk.renderWidth, which auxiliary passes (shadow atlases, etc.) temporarily overwrite.Changes
vk.mainColorWidth/vk.mainColorHeightwhen the FBO color image is created invk_attachments.c, and clear it when the color image is destroyed.vk.fboActiveand those fields are non-zero,vk_get_render_target_width/heightprefer them over the transientvk.renderWidthpair.docs/RENDERER_2026_ARCHITECTURE_PASS.md.Validation
./scripts/compile_engine.sh vulkan(Release)./scripts/smoke_test.shctest -R 'smoke_test|renderer_regression_check'