sensics / OSVR-RenderManager

Apache License 2.0
64 stars 45 forks source link

Direct Rendering on AMD gives error: Could not create presentable surface 0 #314

Open raunaqatmeta opened 7 years ago

raunaqatmeta commented 7 years ago

When trying to run the RenderManager examples like: RenderManagerD3DPresentExample3D.exe, RenderManagerOpenGLSharedContextPresentExample.exe, RenderManagerD3DATWDoubleBufferExample.exe and the other examples which are shipped with OSVR I get the following error only on AMD cards:

error [RenderManager]: RenderManagerAMDD3D11::OpenDisplay(): Could not create presentable surface 0

I am using a custom display in my headset and have direct rendering working with Nvidia' s direct mode without any problem with my current configuration. It seems like the error is thrown by the NDA repository implementation of direct to display from AMD.

Is there something I am missing? I don't believe AMD requires me to whitelist the HMD. It is interesting to note that EnableOSVRDirectModeAMD.exe and DisableOSVRDirectModeAMD.exe works with the AMD card without any problem.

I am pasting the error log here:

Apr 17 15:30:12.602 info [createRenderManager]: Display descriptor reports vendor as MVN Apr 17 15:30:12.602 info [createRenderManager]: No built-in match found, but vendor could match PNPID format, so adding as a candidate MVN Apr 17 15:30:12.617 info [OSVR: com.osvr.renderManager]: OSVR client context initialized for com.osvr.renderManager Apr 17 15:30:12.618 info [OSVR: com.osvr.renderManager]: Got connection to main OSVR server Apr 17 15:30:12.700 info [OSVR: com.osvr.renderManager]: Connected 0 of 0 unconnected paths successfully Apr 17 15:30:12.706 info [OSVR: com.osvr.renderManager]: Connection process took 87ms: have connection to server, have path tree Apr 17 15:30:12.706 info [OSVR]: Z:\j\workspace\OSVR-Core-Build-Win\BIT\64\TRACING\OFF\VS\12\host\windows\src\osvr\Common\ClientInterface.cpp:38: Interface initialized for /me/head Apr 17 15:30:12.707 info [OSVR]: Z:\j\workspace\OSVR-Core-Build-Win\BIT\64\TRACING\OFF\VS\12\host\windows\src\osvr\Client\TrackerRemoteFactory.cpp:93: Constructed a TrackerHandler for com_osvr_Meta/Meta@localhost:3883 sensor 0 Apr 17 15:30:12.707 info [OSVR: com.osvr.renderManager]: Successfully produced handler for /me/head Apr 17 15:30:12.722 info [RenderManager]: RenderManagerD3D11Base::SetDeviceAndContext: Created D3D11 device Apr 17 15:30:12.723 info [RenderManager]: RenderManagerD3D11Base::OpenDisplay(): Using display adapter Radeon (TM) RX 480 Graphics Apr 17 15:30:16.162 info [RenderManager]: Mfr: ce36 PID: ea60 Apr 17 15:30:16.169 info [RenderManager]: Matches the filter! Apr 17 15:30:16.169 info [RenderManager]: Opening display described as Perm: N:Meta2 M:MVN P:0xEA60 Apr 17 15:30:17.124 error [RenderManager]: RenderManagerAMDD3D11::OpenDisplay(): Could not create presentable surface 0 Could not open display

rpavlik commented 7 years ago

Hmm - it looks like it's matching the filter, so it should be working. I have some improvements to the AMD submodule that just hadn't gotten integrated into the main repo - see https://github.com/sensics/OSVR-RenderManager/pull/316 - which might help.

raunaqatmeta commented 7 years ago

I don't have access to the NDA repositories as yet. I am using the RenderManger being shipped by OSVR out of the box. Would it be possible to get a build for this RenderManager from the amd-update branch? When do you think this update can be merged into main and make its way into a publicly released dll?

rpavlik commented 7 years ago

I just need someone to "review" the submodule update pull request, which shouldn't be difficult since the actual changes were merged earlier. Then a build will automatically be produced.

On Tue, Apr 18, 2017 at 2:37 PM raunaqatmeta notifications@github.com wrote:

I don't have access to the NDA repositories as yet. I am using the RenderManger being shipped by OSVR out of the box. Would it be possible to get a build for this RenderManager from the amd-update branch? When do you think this update can be merged into main and make its way into a publicly released dll?

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/sensics/OSVR-RenderManager/issues/314#issuecomment-294956314, or mute the thread https://github.com/notifications/unsubscribe-auth/AADuyYdscJc_P2PYQxxI_D1P0dyR92tAks5rxRDngaJpZM4M_qAB .

-- Ryan A. Pavlik, Ph.D. CTO - OSVR Platform Sensics, Inc. www.sensics.com

--

Latest news and blog posts (subscribe here http://sensics.com/subscribe-to-our-mailing-list/ to get weekly updates):

Apr 9: The unique requirements of public VR http://sensics.com/unique-requirements-public-vr/

Apr 3: Suffering, Art and VR Standards http://sensics.com/suffering-art-vr-standards/

Apr 1: Unholy alliance http://vrguy.blogspot.com/2017/04/unholy-alliance.html

raunaqbn commented 7 years ago

@rpavlik Is there any place I can access the build once its ready?

rpavlik commented 7 years ago

https://gist.github.com/rpavlik/2f581216ad670071bd2c26ae1ca155d5

raunaqbn commented 7 years ago

I tried using the builds as follows:

  1. Got the OSVR core and render manager 7z builds using the scripts you pointed me to.
  2. Configured the OSVR render manager and copied over my osvr plugin.
  3. Copied over the Render Manager bin (and examples) into the OSVR core bin.
  4. Ran the OSVR server. I could get all the head position information accurately.
  5. Ran the sample native applications packaged with the render manager build i got from the scripts.

I still see the same errors as before. Do let me know if I made a mistake.

raunaqbn commented 7 years ago

@rpavlik : Another data point: The AMD GPU works with the SteamVR - OSVR plugin in direct mode. I am guessing this is because the surface creation is handled by the steam compositor. However the AMD direct mode still seems to have this issue.