Repository navigation
Fix Vulkan descriptor bindings on first-frame draws - #19
Merged
Merged
Conversation
themuffinator
marked this pull request as ready for review
October 1, 2026 15:47
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Single-texture menu draws bind the uniform buffer and diffuse texture but can leave descriptor set 2 unbound. The fragment shader still statically uses its depth-fade sampler, including when the specialization constant disables sampling. This matches the reporter's LLDB trace, which faults in MoltenVK's resource binding while encoding an indexed draw.
The main descriptor binder now supplies the missing sampler, fills leading and trailing gaps with descriptors of the correct type, restores the current dynamic uniform offset, and bounds restores to the device's pipeline layout. Existing active samplers and unchanged-state caching are preserved. The RTX backend already supplies a depth-sampler fallback; this fixes the raster Vulkan path.
Refs #17. This is a draft pending native Apple Silicon confirmation.
Validation:
VUID-vkCmdDrawIndexed-None-08600errors for unbound set 2. Patched startup, 4x MSAA, and depth fade disabled each produce zero of those errors.vid_restartpass with validation disabled; engine screenshots verify rendering..tmp. The external-output case passes with its repository boundary simulated. All 33 Vulkan sweep script tests pass.Separate pre-existing findings: startup still reports three depth/stencil aspect-mask validation errors and one invalid debug image-view name. With validation enabled, map loading also reuses a stale depth-fade descriptor and crashes in the NVIDIA driver; both the original and patched builds reproduce it. These are outside this descriptor-binding fix.
Apple Silicon retest: build this branch and repeat the original windowed launch:
Native macOS execution was unavailable during this work, so resolution of the reported SIGSEGV remains to be confirmed.