{"record":{"id":"5b2a4419be0a526f","repo":"stride3d/stride","slug":"the-current-device-doesn-t-support-primary-stereo","errorCode":null,"errorMessage":"The current device doesn't support primary stereo","messagePattern":"The current device doesn't support primary stereo","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.VirtualReality/OpenXR/OpenXRHmd.cs","lineNumber":191,"sourceCode":"            // Changing the form_factor may require changing the view_type too.\n            var view_type = ViewConfigurationType.PrimaryStereo;\n            uint view_config_count = 0;\n\n            Xr.EnumerateViewConfiguration(Instance, SystemId, 0, ref view_config_count, viewConfigurationTypes: null).CheckResult();\n\n            var viewconfigs = new ViewConfigurationType[view_config_count];\n            fixed (ViewConfigurationType* viewconfigspnt = &viewconfigs[0])\n                Xr.EnumerateViewConfiguration(Instance, SystemId, view_config_count, ref view_config_count, viewconfigspnt).CheckResult();\n            Logger.Debug(\"Available config types: \");\n            var viewtype_found = false;\n            for (int i = 0; i < view_config_count; i++)\n            {\n                Logger.Debug(\"    \" + viewconfigs[i]);\n                viewtype_found |= view_type == viewconfigs[i];\n            }\n            if (!viewtype_found)\n            {\n                throw new Exception(\"The current device doesn't support primary stereo\");\n            }\n\n            uint view_count = 0;\n            Xr.EnumerateViewConfigurationView(Instance, SystemId, view_type, 0, ref view_count, null).CheckResult();\n            var viewconfig_views = new ViewConfigurationView[view_count];\n            for (int i = 0; i < view_count; i++)\n            {\n                viewconfig_views[i].Type = StructureType.ViewConfigurationView;\n                viewconfig_views[i].Next = null;\n            }\n            fixed (ViewConfigurationView* viewspnt = &viewconfig_views[0])\n                Xr.EnumerateViewConfigurationView(Instance, SystemId, view_type, (uint)viewconfig_views.Length, ref view_count, viewspnt).CheckResult();\n\n            // get size\n            renderSize.Width = (int)Math.Round(viewconfig_views[0].RecommendedImageRectWidth * RenderFrameScaling) * 2; // 2 views in one frame\n            renderSize.Height = (int)Math.Round(viewconfig_views[0].RecommendedImageRectHeight * RenderFrameScaling);\n\n            SessionCreateInfo session_create_info;","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.VirtualReality/OpenXR/OpenXRHmd.cs#L173-L209","documentation":"OpenXRHmd.Enable enumerates the view configurations the runtime supports and requires that the primary stereo view type be present, since Stride's OpenXR path only implements stereo rendering. If no supported view configuration matches the desired stereo type, it throws an Exception stating the current device doesn't support primary stereo.","triggerScenarios":"Calling Enable with an OpenXR runtime whose enumerated view configurations do not include the primary stereo view type (e.g. a runtime exposing only monoscopic or a nonstandard configuration), so viewtype_found stays false after the loop.","commonSituations":"Using an emulator, monoscopic viewer, or exotic OpenXR runtime; misconfigured/default OpenXR runtime selected on the machine; runtimes that only support non-primary configurations.","solutions":["Select a stereo-capable OpenXR runtime (SteamVR, Oculus, Windows Mixed Reality) via the system OpenXR runtime settings.","Update the runtime/driver to a version that advertises XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO.","Verify the headset is connected so the runtime exposes the stereo view configuration.","Check the debug-logged viewconfig list in the exception context to see what the runtime actually supports."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// C#\n// before Enable: ensure a stereo-capable runtime is the active OpenXR runtime\nbool stereoAvailable = openxrRuntime.SupportsViewConfiguration(ViewConfigurationType.PrimaryStereo);","typeGuard":null,"tryCatchPattern":"// C#\ntry { hmd.Enable(); }\ncatch (Exception ex) when (ex.Message.Contains(\"primary stereo\"))\n{\n    Logger.Warning(\"Active OpenXR runtime does not support stereo; disabling VR\");\n    vrAvailable = false;\n}","preventionTips":["Use a mainstream stereo runtime (SteamVR/Oculus/WMR) as the active OpenXR runtime","Check runtime view configurations before enabling VR","Update runtime and headset drivers to versions advertising PRIMARY_STEREO"],"tags":["vr","openxr","device-capability","stereo"],"backgroundTag":"operation-not-supported","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}