[DRAFT] OpenXR: Use the XR_FB_foveation_vulkan
extension to generate the density map for VRS
#99768
+1,267
−628
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.
This builds on top of PR #99551
But instead of manually building the density map, it uses the
XR_FB_foveation_vulkan
extension to get the density map from the OpenXR runtime.So, you can use the same foveation settings that are currently used for OpenGL (setting the "Foveation Level" or "Foveation Dynamic"), and that should get used by the OpenXR runtime in order to build the density map that we're using.
I'm not crazy about the interdependencies this PR makes between
OpenXRFBFoveationExtension
,OpenXRVulkanExtension
andOpenXRSwapChainInfo
, but I'm not sure there's a way around it? I'll spend some more time thinking about if there's a more decoupled way to do this.This marked as a DRAFT both because it depends on PR #99551, which isn't merged, but also it's just kind of hacking itself into the renderer. We need some way to use the manually built density map when the
XR_FB_foveation_vulkan
extension isn't available.