Skip to content

Commit

Permalink
OpenVR SDK 1.0.17
Browse files Browse the repository at this point in the history
IVRProperties:
* Prop_CameraStreamFormat_Int32 - value from the openvr_driver.h ECameraVideoStreamFormat indicating the expected delivery format of the device
* TrackedProp_IPCReadFailure

IVRTrackedCamera:
* CameraVideoStreamFrameHeader_t:: ulFrameExposureTime - additional field which carries the time in absolute system ticks of when the frame exposure happened, and the time of the frames pose.
* CVS_FORMAT_YUYV16 - new opener_driver.h ECameraVideoStreamFormat value indicating 16-bit YUYV raw image encoding

OpenVR C API:
 * Fixed cNewInput and rchRenderModelComponentName having an incorrect type

IVRCompositor FrameTiming:
* Added frame prediction and throttling bits to reprojection flags.  Use the macros VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES and VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES for easy access.  These values can be used to provide a better job at updating game simulation time for rendered frames when unable to meet native refresh rate requirements.
* Added m_nNumVSyncsReadyForUse for tracking how long each frame took to render.
* Added m_nNumVSyncsToFirstView for tracking how many vsync intervals before a given frame was first viewed (i.e. scanned out).  This may differ from NumVSyncsReadyForUse if the frame was predicted further ahead since frames will never be displayed earlier than the time they were predicted to.
* See https://developer.valvesoftware.com/wiki/SteamVR/Frame_Timing for more details.

Driver API:
* Added TrackingResult_Fallback_RotationOnly, which drivers can return if they have lost positional tracking but wish to still provide rotation-only tracking.

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4759625]
  • Loading branch information
JoeLudwig committed Oct 16, 2018
1 parent 6aacebd commit 1fb1030
Show file tree
Hide file tree
Showing 23 changed files with 302 additions and 174 deletions.
Binary file modified bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux32/libopenvr_api.so.dbg
Binary file not shown.
Empty file added bin/linux64/empty.dir
Empty file.
Binary file modified bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified bin/win32/openvr_api.pdb
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll
Binary file not shown.
Binary file modified bin/win64/openvr_api.pdb
Binary file not shown.
45 changes: 39 additions & 6 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ enum ETrackingResult

TrackingResult_Running_OK = 200,
TrackingResult_Running_OutOfRange = 201,

TrackingResult_Fallback_RotationOnly = 300,
};

typedef uint32_t DriverId_t;
Expand Down Expand Up @@ -257,6 +259,7 @@ static const PropertyTypeTag_t k_unHapticVibrationPropertyTag = 35;
static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36;

static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40;
static const PropertyTypeTag_t k_unJsonPropertyTag = 41;

static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000;
static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000;
Expand Down Expand Up @@ -310,6 +313,7 @@ enum ETrackedDeviceProperty
Prop_NeverTracked_Bool = 1038, // Used for devices that will never have a valid pose by design
Prop_NumCameras_Int32 = 1039,
Prop_CameraFrameLayout_Int32 = 1040, // EVRTrackedCameraFrameLayout value
Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value

// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
Expand Down Expand Up @@ -440,6 +444,7 @@ enum ETrackedDeviceProperty
// Properties that are set internally based on other information provided by drivers
Prop_ControllerType_String = 7000,
Prop_LegacyInputProfile_String = 7001,
Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers

// Vendors are free to expose private debug data in this reserved region
Prop_VendorSpecific_Reserved_Start = 10000,
Expand Down Expand Up @@ -467,6 +472,7 @@ enum ETrackedPropertyError
TrackedProp_PermissionDenied = 10,
TrackedProp_InvalidOperation = 11,
TrackedProp_CannotWriteToWildcards = 12,
TrackedProp_IPCReadFailure = 13,
};


Expand Down Expand Up @@ -747,6 +753,7 @@ enum EVREventType
VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding
VREvent_Input_ActionManifestReloaded = 1703, // no data
VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest
VREvent_Input_TrackerActivated = 1706,

VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast
VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast
Expand Down Expand Up @@ -1472,6 +1479,8 @@ struct CameraVideoStreamFrameHeader_t
uint32_t nFrameSequence;

TrackedDevicePose_t standingTrackedDevicePose;

uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks
};

// Screenshot types
Expand Down Expand Up @@ -2143,7 +2152,7 @@ namespace vr

class CVRSettingHelper
{
IVRSettings *m_pSettings = nullptr;
IVRSettings *m_pSettings;
public:
CVRSettingHelper( IVRSettings *pSettings )
{
Expand Down Expand Up @@ -2252,13 +2261,15 @@ namespace vr
static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution";
static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
Expand Down Expand Up @@ -2290,6 +2301,7 @@ namespace vr
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth";
static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";

//-----------------------------------------------------------------------------
// null keys
Expand All @@ -2310,6 +2322,7 @@ namespace vr
static const char * const k_pch_UserInterface_Section = "userinterface";
static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized";
static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";

Expand All @@ -2332,9 +2345,7 @@ namespace vr
//-----------------------------------------------------------------------------
// perf keys
static const char * const k_pch_Perf_Section = "perfcheck";
static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
static const char * const k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD";
static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
static const char * const k_pch_Perf_TestData_Float = "perfTestData";
Expand Down Expand Up @@ -2410,6 +2421,12 @@ namespace vr
static const char* const k_pch_WebInterface_WebEnable_Bool = "WebEnable";
static const char* const k_pch_WebInterface_WebPort_String = "WebPort";

//-----------------------------------------------------------------------------
// vrwebhelper keys
static const char* const k_pch_VRWebHelper_Section = "VRWebHelper";
static const char* const k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled";
static const char* const k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort";

//-----------------------------------------------------------------------------
// tracking overrides - keys are device paths, values are the device paths their
// tracking/pose information overrides
Expand Down Expand Up @@ -2629,6 +2646,19 @@ const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicate
// NumFramePresents > 1 also indicates the scene texture was reused,
// and also the number of times that it was presented in total.

const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if
// it detects the application is taking too long to render. These two
// bits will contain the count of additional frames (normally zero).
// Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from
// the latest frame timing entry.

const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application.
// Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from
// the latest frame timing entry.

#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 )
#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 )

/** Provides a single frame's timing information to the app */
struct Compositor_FrameTiming
{
Expand Down Expand Up @@ -2668,6 +2698,9 @@ struct Compositor_FrameTiming
float m_flCompositorRenderStartMs;

vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame

uint32_t m_nNumVSyncsReadyForUse;
uint32_t m_nNumVSyncsToFirstView;
};

/** Cumulative stats for current application. These are not cleared until a new app connects,
Expand Down Expand Up @@ -3777,7 +3810,7 @@ class IVRTrackedCamera
virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0;
};

static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003";
static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_004";

} // namespace vr

Expand Down
Loading

0 comments on commit 1fb1030

Please sign in to comment.