servo / webxr

Bindings for WebXR
Mozilla Public License 2.0
81 stars 23 forks source link

openxr backend triggers d3d debug warnings #112

Open jdm opened 4 years ago

jdm commented 4 years ago
D3D11 WARNING: ID3D11DeviceContext::OMSetRenderTargets: Resource being set to OM RenderTarget slot 0 is still bound on input! [ STATE_SETTING WARNING #9: DEVICE_OMSETRENDERTARGETS_HAZARD]
D3D11 WARNING: ID3D11DeviceContext::OMSetRenderTargets[AndUnorderedAccessViews]: Forcing VS shader resource slot 2 to NULL. [ STATE_SETTING WARNING #3: DEVICE_VSSETSHADERRESOURCES_HAZARD]

Not clear yet if this is important or not, but they appear every frame.

jdm commented 4 years ago

To reproduce this, apply the following diff to Servo:

diff --git a/support/hololens/ServoApp/ServoControl/OpenGLES.cpp b/support/hololens/ServoApp/ServoControl/OpenGLES.cpp                                                index 8889ee23d7..bf7d41830b 100644                                                                                                                                   --- a/support/hololens/ServoApp/ServoControl/OpenGLES.cpp                                                                                                             +++ b/support/hololens/ServoApp/ServoControl/OpenGLES.cpp                                                                                                             @@ -53,6 +53,9 @@ void OpenGLES::Initialize() {                                                                                                                              EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE,                                                                                                                                  EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE,

+      EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE,
+      EGL_TRUE,
+
       // EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that
       // enables ANGLE to automatically call
       // the IDXGIDevice3::Trim method on behalf of the application when it gets
@@ -72,6 +75,10 @@ void OpenGLES::Initialize() {
       // default display attributes.
       EGL_PLATFORM_ANGLE_TYPE_ANGLE,
       EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
+
+      EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE,
+      EGL_TRUE,
+
       EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE,
       9,
       EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE,
@@ -89,6 +96,10 @@ void OpenGLES::Initialize() {
       // attributes and the 9_3 display attributes.
       EGL_PLATFORM_ANGLE_TYPE_ANGLE,
       EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
+
+      EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE,
+      EGL_TRUE,
+
       EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE,
       EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE,
       EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE,