mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 06:00:25 +02:00
aurora: add asynchronous OpenXR stereo replay bridge
This commit is contained in:
1 parent
8c8e4561e9
commit
d8788de919
17 files changed
+1521
-74
No files matched your search
@@ -19,16 +19,25 @@ struct EyeImage {
|
||||
struct SinkFrame {
|
||||
uint64_t frameToken = 0;
|
||||
uint32_t logicalFrame = 0;
|
||||
AuroraStereoFrameMode mode = AURORA_STEREO_FRAME_IMMERSIVE_REPLAY;
|
||||
std::array<EyeImage, AURORA_STEREO_EYE_COUNT> eyes{};
|
||||
};
|
||||
|
||||
// Runs synchronously on the frame worker after both eye replays have been
|
||||
// encoded and before its command buffer is submitted. Backend interop code
|
||||
// can append copies/import transitions to the same encoder here.
|
||||
using SinkCallback = void (*)(wgpu::CommandEncoder& encoder, const SinkFrame& frame, void* userdata) noexcept;
|
||||
using SinkCallback = bool (*)(wgpu::CommandEncoder& encoder, const SinkFrame& frame, void* userdata) noexcept;
|
||||
// Called immediately after the command buffer containing the sink's encoded
|
||||
// work is submitted to Dawn's queue, while Aurora's queue-submit mutex remains
|
||||
// held. It may enqueue native work on that same queue, but must not wait or
|
||||
// call back into Aurora. This is the handoff point for backend-native follow-up
|
||||
// work; its completion notification may wake the owner thread to release the
|
||||
// acquired OpenXR images and end the frame.
|
||||
using SubmitCallback = void (*)(const SinkFrame& frame, void* userdata) noexcept;
|
||||
|
||||
// Internal Aurora hook: D3D12/Vulkan OpenXR interop owns this registration.
|
||||
// Registration changes must happen while the frame worker is idle.
|
||||
void set_sink(SinkCallback callback, void* userdata) noexcept;
|
||||
void set_sink(SinkCallback callback, SubmitCallback submitted, void* userdata) noexcept;
|
||||
inline void set_sink(SinkCallback callback, void* userdata) noexcept { set_sink(callback, nullptr, userdata); }
|
||||
|
||||
} // namespace aurora::stereo
|
||||
Reference in new issue
Block a user