Skip to content

Vulkan HAL: associate externally supplied density images with render targets - #5

Draft
matthargett wants to merge 3 commits into
review-base/wgpu-30.0.1from
vulkan/fragment-density-eye-attachments
Draft

matthargett wants to merge 3 commits into
review-base/wgpu-30.0.1from
vulkan/fragment-density-eye-attachments

Conversation

@matthargett

@matthargett matthargett commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

For clients that explicitly enable fragment density maps with non-subsampled images on their Vulkan device, support the density attachment in the render pass, select the matching pipeline variant, and match each application view to the same array slice of the map. Ordinary devices do not compile the extra variant. This is a HAL experiment, without changes to WebGPU or WGSL. Pipeline variant creation cost and a more general public HAL descriptor remain review topics.

On Quest 1 Vulkan, per-eye 16x16 checkerboards produced 240 horizontal edges in center and periphery at zero foveation. At maximum, each eye still had 240 central edges and zero peripheral edges; switching back restored all 240. Two-pass and single-pass stereo silhouette tests passed with and without depth. Measured before presentation on the projection color image, not on a final blit.

Implementation and device TODOs

  • Implementation: Keep attachment lifetime, feature fallback and targets without atomic u64 covered; do not assume every adapter accepts density images.
  • On device: Compare peripheral/center raster in both eyes at off/max/off and rerun a non-density Vulkan control.

AGENTS.md · Qualification and PR index. Fork branch instructions.

@matthargett

Copy link
Copy Markdown
Member Author

The PowerPC job caught an unconditional AtomicU64 in the texture handle. c5e0db1 keeps the atomic path on targets with 64-bit atomics and uses the same mutex fallback pattern as Vulkan resource identities elsewhere in this module. The previously failing ppc32 check now passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant