open-ecosystem-development / OpenXR-SDK

Apache License 2.0
2 stars 3 forks source link

Black window shown instead of volume slidebar in Wolvic #46

Closed svillar closed 1 year ago

svillar commented 2 years ago

This was initially reported in Wolvic.

The issue is that from inside Wolvic when the user clicks on the volume buttons in the 3DoF controller then a black opaque window is shown instead of the volume buttons. That slider is shown by the system not by Wolvic.

Actually we tried with the same version of Wolvic (1.2) in a Harmony 2.0 device and there is no issue. This must be a regression in Harmony 3.0.

dingsing2021 commented 1 year ago

some feedback from HVR SDK:we have test the XR demo on our side, no black window,and huawei vr screen app which use native openxr sdk that do not also happened. so we need more information, maybe you can reproduction this bug in the xr demo on your side, please share the xr demo project for us. or some configuration on wolvic. maybe be it cause by the opengl configuration , hvr sdk get the texture from the apps, and texImage2D add the volume bitmap, when the apps and the sdk both use GLES20, this bitmap does not cause the black windows in xr demo app.

我们验证我们的XRdemo在混合模式下,透明混合没有产生黑框,并且VR投屏应用也未出现黑色方框问题,问题出现的根因可能与wolvic app的一些opengl配置相关,sdk 是获取当前应用送入的纹理,texImage2D添加了一张音量的bitmap,在大家都使用GLES20的情况下,这张bitmap并未在demo内引起黑框现象 ,能否告知我们wolvic app的相关配置,或者demo在什么情况下也会产生黑框,我们好进一步定位问题;

felipeerias commented 1 year ago

@dingsing2021 We configure GL in the method BrowserEGLContext::Initialize (BrowserEGLContext.cpp line 27).

These are our EGL requirements for selecting a configuration:

We create the EGL context:

  EGLint contextAttribs[] = {
          EGL_CONTEXT_CLIENT_VERSION, 3,
          EGL_NONE
  };

  mContext = eglCreateContext(mDisplay, mConfig, EGL_NO_CONTEXT, contextAttribs);

And the window surface:

  const EGLint attribs[] = { EGL_NONE };
  mSurface = eglCreateWindowSurface(mDisplay, mConfig, mNativeWindow, attribs);

Later on, we configure our textures with:

glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));

Please let me know if there is any other information that could be useful.

/CC @svillar

dingsing2021 commented 1 year ago

feedback from HVR SDK: here is a way to workaround ,set the target_sdk to 30. we have tested in the demo project.

build_versions.target_sdk = 30 build_versions.target_sdk_wave = 30

https://github.com/Igalia/wolvic/blob/95470dbcb0e74f02c28cc7613c0b5c1d1b91b44f/versions.gradle

svillar commented 1 year ago

feedback from HVR SDK: here is a way to workaround ,set the target_sdk to 30. we have tested in the demo project.

build_versions.target_sdk = 30 build_versions.target_sdk_wave = 30

https://github.com/Igalia/wolvic/blob/95470dbcb0e74f02c28cc7613c0b5c1d1b91b44f/versions.gradle

Thanks. We'll verify that it works and upload a patch soon.

svillar commented 1 year ago

I can confirm that solves the issue for us. We should still identify why v31 causes that issue, but in the meantime it's a good workaround.