mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 05:00:27 +02:00
Added foveated rendering for the Quest
- Eyes render under a VK_EXT_fragment_density_map: full rate around each eye's forward direction, 2x2 then 4x4 pixel blocks towards the edges ([vr] foveation = off|low|medium|high, default off). XR_FB_foveation cannot help here: the runtime's maps only shape passes drawing into its swapchain, and the eyes reach it through a copy. - aurora-main/patches/dawn/aurora_fdm.inc: Dawn enables the extension only on request and for dynamic rendering, flags every render pipeline, and chains an immutable RG8 map into any pass whose first color attachment is a view bound to one (ABI: include/aurora/dawn_fdm_abi.h). - android/Build-QuestDawn.ps1 builds the pinned Dawn revision with those patches for arm64 (dawn-build CI flags, protobuf off) into a cached package; Build-Quest.ps1 links it (-StockDawn opts out) and AuroraDawnProvider.cmake enables the ABI from its manifest. - lib/gfx/foveation.hpp generates the maps (32 px per texel, densities 255/127/63); an eye is foveated only when single_pass_eyes draws it in one render pass. Menus never are. - Live level from the headset panel's VR tab and the launcher; the launch decides whether the device has maps. debug.wiicompiled.foveation and debug.wiicompiled.fdm for A/B. - Tests: Foveation cases in gx_fifo_tests, mkw_vr_config_tests. Docs: OPENXR.md, quest-port.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ceeeba0332
commit
cc653272c8
30 files changed
+1527
-14
No files matched your search
@@ -265,6 +265,20 @@ elseif (_aurora_dawn_provider STREQUAL "package")
|
||||
"The package must be a Dawn install tree built with DAWN_ENABLE_INSTALL=ON.")
|
||||
endif ()
|
||||
|
||||
# A package built with Aurora's patches (android/Build-QuestDawn.ps1) describes them in
|
||||
# aurora-dawn.json. Only such a package has the fragment density map ABI
|
||||
# (include/aurora/dawn_fdm_abi.h); aurora_core compiles its callers against it.
|
||||
set(AURORA_DAWN_FDM_ABI 0 PARENT_SCOPE)
|
||||
if (EXISTS "${_dawn_pkg_dir}/aurora-dawn.json")
|
||||
file(READ "${_dawn_pkg_dir}/aurora-dawn.json" _aurora_dawn_manifest)
|
||||
string(JSON _aurora_dawn_fdm_abi ERROR_VARIABLE _aurora_dawn_manifest_error
|
||||
GET "${_aurora_dawn_manifest}" AuroraFdmAbi)
|
||||
if (NOT _aurora_dawn_manifest_error AND _aurora_dawn_fdm_abi GREATER 0)
|
||||
set(AURORA_DAWN_FDM_ABI ${_aurora_dawn_fdm_abi} PARENT_SCOPE)
|
||||
message(STATUS "aurora: Dawn package carries the fragment density map ABI ${_aurora_dawn_fdm_abi}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
_aurora_dawn_set_platform_backends()
|
||||
|
||||
get_target_property(_dawn_pkg_type dawn::webgpu_dawn TYPE)
|
||||
|
||||
@@ -45,6 +45,12 @@ if (AURORA_ENABLE_GX)
|
||||
# integration links everywhere.
|
||||
target_sources(aurora_core PRIVATE lib/webgpu/vulkan_interop.cpp)
|
||||
target_link_libraries(aurora_core PRIVATE dawn::webgpu_dawn)
|
||||
# Fragment density maps for foveated eye rendering, from a Dawn built with Aurora's patches; the
|
||||
# value is the package's ABI version (include/aurora/dawn_fdm_abi.h).
|
||||
target_sources(aurora_core PRIVATE lib/webgpu/fdm.cpp)
|
||||
if (AURORA_DAWN_FDM_ABI)
|
||||
target_compile_definitions(aurora_core PRIVATE AURORA_DAWN_FDM=${AURORA_DAWN_FDM_ABI})
|
||||
endif ()
|
||||
if (DAWN_ENABLE_VULKAN)
|
||||
target_compile_definitions(aurora_core PRIVATE DAWN_ENABLE_BACKEND_VULKAN)
|
||||
endif ()
|
||||
|
||||
Reference in new issue
Block a user