fix(image): scope sampled-image upload barriers to the real consumer stage (#54) #86
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics!86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-54"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ImageVulkan<T>hardcodedVK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHRas the consuming pipeline stage in every layout transition (Create, Update, UpdateRegion, and the compressed-asset Update). The UI font atlas, however, is sampled by a compute shader (drawTextis aGraphicsComputeShader), so the upload barrier's dst scope never actually covered its real consumer — a correctness gap (relying on an incidental submit/barrier boundary elsewhere), not merely lost overlap.Fix
Parameterize the consuming stage per image:
consumerStagemember, set once atCreate(defaultVK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR— preserves existing RT callers like Sponzaalbedoand the Decompression examplecheckerImage).Update/UpdateRegion/ compressedUpdatenow uses the storedconsumerStagefor both the entry-barrier src scope and the exit-barrier dst scope.FontAtlas::InitializepassesVK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, so the atlas's hot dirty-rect uploads (UpdateRegion) now barrier against the actual compute consumer.No layouts or lifetimes change — this only narrows/corrects the stage scope.
Testing
crafter-build test— 6 passed (incl.FontAtlasDirtyRect).Resolves #54