KhronosGroup / OpenXR-CTS

Conformance test suite for OpenXR

Home Page:https://www.khronos.org/conformance/adopters/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android Platform CTS test pass issue

Lagrange1027 opened this issue · comments

Hi,dear Ryan A. Pavlik :
I have developed my openxr runtime on android platform.And when i try pass the cts test,i have encounted a problem .
my problem is that: In my runtime i try to get the ANativeWindow by activity.getwindow.takesurface(callback) like NaitveActivity and that result to the NaitveActivity can not get the ANativeWindow any more . And with my runtime the
HelloXR work all fine ,but when i try to pass the cts,it dosen't wotk at all because before run cts test, it will check whether AndroidApplicationNativeWindow is nullpointer, the code is bellow:

   /// Run the actual conformance tests only when all required android components are present
    if (testThreadStarted == false && **AndroidApplicationNativeWindow != NULL**) {
        testThreadStarted = true;
        androidTestThread = std::thread([&]() {
            ATTACH_THREAD;
            ALOGV("... begin conformance test ...");

I find the AndroidApplicationNativeWindow hasn't been used in HelloXR and CTS at all , dose the nullpointer check really need before cts test? I look forward to your reply ,thanks!

Hi,rpavlik:
I look forward to your reply ,thanks very much!

An issue (number 1537) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#1537 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

I find the AndroidApplicationNativeWindow hasn't been used in HelloXR and CTS at all , dose the nullpointer check really need before cts test? I look forward to your reply ,thanks!

https://github.com/KhronosGroup/OpenXR-CTS/search?q=AndroidApplicationNativeWindow Looks like this NULL checking for AndroidApplicationNativeWinow doesn't exist anymore.

It still appears to exist in my code here. I suspect the issue is in your runtime: you can't just take the surface, as you've noticed this breaks ANativeWindow. Does it work if you remove the null check? or does that just make it fail later?

You can look how Monado does it: we inject an additional surface, either owned by the service, or directly into the activity. I think this is probably how you have to do it.

The check for AndroidApplicationNativeWindow is to make sure that the app has fully started before the tests begin. By stealing the app's surface, the check will always fail.

The check for the native window has now been changed to accomodate systems where there is no native window allocated for XR applications. I'm pretty sure your "stealing the native window" will break some applications, but regardless, I think you'll find the latest devel branch of the CTS will work for you.