mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
st/oxr: Skip oxr_session_end if connected to Unreal 4.
This commit is contained in:
parent
4709ab85ca
commit
e4a40a6e4e
|
@ -167,15 +167,14 @@ detect_engine(struct oxr_logger *log, struct oxr_instance *inst, const XrInstanc
|
|||
static void
|
||||
apply_quirks(struct oxr_logger *log, struct oxr_instance *inst)
|
||||
{
|
||||
#if 0
|
||||
// This is no longer needed.
|
||||
inst->quirks.skip_end_session = false;
|
||||
inst->quirks.disable_vulkan_format_depth_stencil = false;
|
||||
|
||||
if (starts_with("UnrealEngine", inst->appinfo.detected.engine.name) && //
|
||||
inst->appinfo.detected.engine.major == 4 && //
|
||||
inst->appinfo.detected.engine.minor <= 27 && //
|
||||
inst->appinfo.detected.engine.patch <= 0) {
|
||||
inst->quirks.disable_vulkan_format_depth_stencil = true;
|
||||
inst->appinfo.detected.engine.minor <= 27) {
|
||||
inst->quirks.skip_end_session = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
XrResult
|
||||
|
|
|
@ -1509,6 +1509,8 @@ struct oxr_instance
|
|||
{
|
||||
//! Unreal has a bug in the VulkanRHI backend.
|
||||
bool disable_vulkan_format_depth_stencil;
|
||||
//! Unreal 4 has a bug calling xrEndSession; the function should just exit
|
||||
bool skip_end_session;
|
||||
} quirks;
|
||||
|
||||
//! Debug messengers
|
||||
|
|
|
@ -164,6 +164,11 @@ oxr_session_begin(struct oxr_logger *log, struct oxr_session *sess, const XrSess
|
|||
XrResult
|
||||
oxr_session_end(struct oxr_logger *log, struct oxr_session *sess)
|
||||
{
|
||||
// there is a bug in Unreal 4 where calling this function will result in a crash, so skip it.
|
||||
if (sess->sys->inst->quirks.skip_end_session) {
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
struct xrt_compositor *xc = sess->compositor;
|
||||
|
||||
if (!is_running(sess)) {
|
||||
|
|
Loading…
Reference in a new issue