refactor(test-apps): migrate Windows cube_handle capture to xrCaptureAtlasEXT [#396 W6]#400
Open
dfattal wants to merge 1 commit into
Open
refactor(test-apps): migrate Windows cube_handle capture to xrCaptureAtlasEXT [#396 W6]#400dfattal wants to merge 1 commit into
dfattal wants to merge 1 commit into
Conversation
…AtlasEXT [#396 W6] W6 consumer migration (test apps). All four Windows cube_handle_* apps now use the runtime-owned capture (XR_EXT_atlas_capture) instead of per-API GPU readbacks, behind one shared helper. Refactor (test_apps/common): - New dxr_capture::RequestRuntimeAtlasCapture(xr, appName, cols, rows, hwnd) in atlas_capture.cpp (sr_common_base): the single, graphics-API-agnostic capture path — 3D-mode guard + MakeCaptureAtlasPrefix numbering + xrCaptureAtlasEXT (PROJECTION_ONLY) + flash + logging. Collapses each app's ~30-line I-key block to one call. Migration (d3d11/d3d12/gl/vk_win): - main.cpp: capture block -> RequestRuntimeAtlasCapture(); dropped the per-API CaptureAtlasRegion* fallback (test apps always run against this repo's runtime). - xr_session.cpp (d3d12/gl/vk): detect + enable + resolve XR_EXT_atlas_capture, mirroring d3d11. Dead-code removal: - Deleted atlas_capture_d3d11.cpp + atlas_capture_d3d12.cpp (Windows-only, now unused) and their declarations; removed the D3D11 readback from sr_common and the per-API TUs from the d3d12/gl/vk app CMakeLists. - Kept atlas_capture_{gl,vk}.cpp + atlas_capture_metal.mm — the macOS cube_handle apps still use them and are NOT migrated here (can't build/verify on Windows; follow-up on a Mac). Verified e2e (in-process, real display): d3d11 (helper refactor) and d3d12 (new PFN resolve) each press-I -> a tight 1280x360 two-view PNG via xrCaptureAtlasEXT; gl/vk build + link with the identical pattern. Net -350 lines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 tasks
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.
Summary
W6 consumer migration (test apps) of #396. All four Windows
cube_handle_*apps now capture the atlas via the runtime (XR_EXT_atlas_capture) instead of per-API GPU readbacks, behind one shared helper — net −350 lines.Refactor (
test_apps/common)dxr_capture::RequestRuntimeAtlasCapture(xr, appName, cols, rows, hwnd)inatlas_capture.cpp(sr_common_base): the single graphics-API-agnostic capture path — 3D-mode guard +MakeCaptureAtlasPrefixnumbering +xrCaptureAtlasEXT(PROJECTION_ONLY) + flash + logging. Each app's ~30-lineI-key block → one call.Migration (d3d11 / d3d12 / gl / vk
_win)main.cpp: capture block →RequestRuntimeAtlasCapture(); dropped the per-APICaptureAtlasRegion*fallback (test apps always run against this repo's runtime, which exports the ext).xr_session.cpp(d3d12/gl/vk): detect + enable + resolveXR_EXT_atlas_capture, mirroring d3d11.Dead-code removal
atlas_capture_d3d11.cpp+atlas_capture_d3d12.cpp(Windows-only, now unused) and their declarations; removed the D3D11 readback fromsr_commonand the per-API TUs from the d3d12/gl/vk app CMakeLists.atlas_capture_{gl,vk}.cpp+atlas_capture_metal.mm— the macOScube_handleapps still use them and are not migrated here (can't build/verify on Windows; follow-up on a Mac).Verification (in-process, real display)
I→ a tight 1280×360 two-view PNG viaxrCaptureAtlasEXT(xrCaptureAtlasEXT: resolved+Atlas capture requested).Follow-ups
cube_handle_{metal,gl,vk}_macosmigration (needs a Mac) — thenatlas_capture_{gl,vk}.cpp+atlas_capture_metal.mmcan go too.🤖 Generated with Claude Code