Which graphics card is used when working with OpenGL shaders over RDP?

孤者浪人 提交于 2019-11-28 12:42:31

问题


I'm taking an introductory OpenGL development course with a Surface Pro, and was hoping to connect to my more powerful desktop for development through the native Windows remote desktop tool. I'm having trouble with the shaders on my first test program, which leads to my question. Will the shader work be done by the graphics card on my Surface (RDP client) or my desktop (RDP host)?


回答1:


That depends on your remote system's configuration. Your usual consumer GPU with standard drivers will not provide any HW acceleration for the RDP whatsoever and you'll drop into a SW emulation mode. However there are special visualization server GPUs and drivers which hook into the RDP server implementation and provide GPU acceleration for it; very likely you don't have that though.

Note that it's ultimately just a driver issue. With the right drivers every GPU could do that. But HW vendors want to sell their special purpose devices, so they're locking that functionality to a specific product line.

I'm hoping, that the advances of the Linux open source graphics ecosystem will, as a sideshow, enable implementing such visualization servers with commodity hardware in the near future. As much as I disregard the Wayland protocol and condept, as much do I like the advances its development promotes toward the lower levels of the Linux graphics stack. Which may likely put some pressure on the Windows world to catch up with that.




回答2:


If you run your software from RDP session, you lose HW acceleration.

But, some QnA sites notice that RDP client will work with hardware accelerated graphics if the application is started from the local session before the connection.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/c8295ef8-3711-4576-9293-2c4965280165/opengl-and-remote-desktop?forum=winserverTS

So, the following trick is proposed.

  1. Run a batch file which disconnects the current RDP session and starts the application which needs HW accelerated graphics
  2. Wait several seconds till the application has started
  3. Reconnect to RDP.

The application will be started from the local session and will use HW accelerated graphics.

Here is a sample of the batch file, from my answer on the linked page:

@echo off
echo.
echo Remote Desktop will be temporarily disconnected . . . please reconnect after a few seconds.
echo.
pause
@echo on
REM The active session has an arrow as the first character
setlocal EnableDelayedExpansion
FOR /F %%A in ('qwinsta') do (
    set tempSessionName=%%A
    if "!tempSessionName:~0,1!"==">"  ( 
        @echo on
        tscon.exe !tempSessionName:~1! /v /dest:console 
        @echo off
    )   
)
@echo off
echo.
echo Starting MyProgram.exe . . .
@echo on
start MyProgram.exe
@echo off
echo.
pause


来源:https://stackoverflow.com/questions/18777487/which-graphics-card-is-used-when-working-with-opengl-shaders-over-rdp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!