mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
feat: Cardboard VR mode with ARM64 SteamVR (#704)
* feat: add Cardboard mode with side-by-side lens-distorted eyes and 3DoF head tracking * fix: derive the Cardboard field of view from the panel and recentre fully when far from upright * feat: share the Cardboard head pose with the guest and add a SteamVR driver for it * feat: run SteamVR's compositor on Turnip/KGSL with a display-extension layer and a driver-direct HMD * feat: show SteamVR frames in Cardboard mode through a driver-side presenter and a fake direct-mode display * feat: install and start SteamVR for Cardboard mode from the session drawer * docs: describe Cardboard mode and the SteamVR path * feat: drive SteamVR hands from the game pad and keep the Cardboard headset out of standby * docs: record where the SteamVR dashboard stops * fix: map Cardboard head tracking to the screen's axes and keep turns about the real vertical as yaw * fix: give Cardboard its previous picture back when SteamVR stops * fix: report sem_otime from emulated SysV semaphores so SteamVR's web helper can start * fix: bridge SteamVR's shared semaphores across processes and keep Steam alive while SteamVR runs * feat: present SteamVR straight to DroidDeck's compositor at panel resolution * docs: update Cardboard VR notes for the dashboard, semaphore bridge and direct presenter * fix: keep Wine and FEX signal handlers in the VR layer; add semaphore tracing * fix: clear a stale SteamVR active marker on status * fix: clear only an old SteamVR active marker * fix: unblock SteamVR clients on Turnip and keep Steam's web helper alive across SteamVR runs * fix: judge shared waits before a submit's own signals and on Vulkan 1.0 devices * docs: record VR games, SteamVR Home and OpenXR results on the Thor * docs: add Cardboard VR learnings from the Thor bring-up * docs: add Cardboard VR screenshots from the Thor * fix: keep the VR layer's display stand-in to SteamVR runs and clear a leftover marker at session start * fix: report SteamVR start and stop failures from the helper's exit code
This commit is contained in:
1 parent
92d038b428
commit
f4b0ab6867
57 files changed
+17799
-15
No files matched your search
@@ -0,0 +1,34 @@
|
||||
// Puts SteamVR's eye textures on the screen for the Cardboard driver (driver_droiddeck.cpp).
|
||||
//
|
||||
// The driver-direct component hands each frame over as two eye textures: shared Vulkan images,
|
||||
// dmabufs on Linux. The presenter imports them into a Vulkan device of its own and draws them side by
|
||||
// side into a fullscreen X11 window on gamescope's Xwayland, marked as an external overlay so gamescope
|
||||
// shows it above whatever app has focus. DroidDeck's compositor, in Cardboard mode with a
|
||||
// side-by-side source, then puts the lens distortion on it for the viewer.
|
||||
//
|
||||
// SteamVR compositor -> eye textures -> [presenter: blit L|R] -> X11 overlay -> gamescope
|
||||
// -> DroidDeck compositor -> Cardboard lens pass -> panel
|
||||
//
|
||||
// Everything is loaded at runtime (libvulkan.so.1, libX11.so.6): the driver links against nothing
|
||||
// the cross build image lacks.
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace droiddeck {
|
||||
|
||||
struct EyeFrame {
|
||||
uint64_t texture[2]; // SharedTextureHandle_t per eye
|
||||
float bounds[2][4]; // uMin, vMin, uMax, vMax per eye
|
||||
};
|
||||
|
||||
class Presenter {
|
||||
public:
|
||||
// Called from CreateSwapTextureSet: the three images of one set, as SteamVR made them.
|
||||
static void AddTextures(const uint64_t handles[3], const int fds[3], uint32_t vkFormat, uint32_t width, uint32_t height);
|
||||
static void RemoveTexture(uint64_t handle);
|
||||
// Called from Present: the frame's eye textures; returns at once (a thread of its own presents).
|
||||
static void Submit(const EyeFrame &frame);
|
||||
static void Shutdown();
|
||||
};
|
||||
|
||||
} // namespace droiddeck
|
||||
Reference in new issue
Block a user