Commit 36ba1e4f authored by Patrick To's avatar Patrick To Committed by Commit Bot

Remove conflicting checks in OpenXrTestHelper::EndSession

xrEndSession should only be called in the XR_ERROR_SESSION_NOT_STOPPING
per the OpenXr spec, so checking for the running state isn't necessary.

Bug: 1116111
Change-Id: I089846d868441d8cd2d6d9bd82534859966d8772
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357511Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Commit-Queue: Patrick To <patrto@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#798277}
parent d560e5cf
......@@ -358,8 +358,8 @@ XrResult OpenXrTestHelper::BeginSession() {
}
XrResult OpenXrTestHelper::EndSession() {
RETURN_IF_FALSE(IsSessionRunning(), XR_ERROR_SESSION_NOT_RUNNING,
"EndSession session is not running");
// Per OpenXR 1.0 spec: "An application can only call xrEndSession when the
// session is in the XR_SESSION_STATE_STOPPING state"
RETURN_IF(session_state_ != XR_SESSION_STATE_STOPPING,
XR_ERROR_SESSION_NOT_STOPPING,
"Session state is not XR_ERROR_SESSION_NOT_STOPPING");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment