Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.9.1
-
None
-
Qt 5.9.1
RDP host is Windows 7 SP1
Description
OpenGLWidget display is incorrect over RDP with 16/24 bpp. However 32bpp is OK.
The problem is in composition texture created with D3DUSAGE_RENDERTARGET. Format requested by Qt is D3DFMT_A8R8G8B8, but IDirect3DDevice9::CreateTexture creates texture in device format (HR=D3D_OK), i.e. for 16bpp host it is D3DFMT_R5G6B5. So composition texture (main widget) missing alpha channel. Thus blending OpenGLWidget emits incorrect result.
Attached simple example with background clear to green.
Steps to reproduce:
1) Connect to machine over RDP using 16bpp or 24 bpp (windows 7)
2) Start sample app (attached)
3) OpenGLWidget will be black (should be green)
1) Connect to machine over RDP using 32bpp (windows 7)
2) Start sample app (attached)
3) OpenGLWidget will be green (CORRECT)
Possible solution: composition texture should be device independent (D3D_USAGE_NONE, D3DPOOL_SYSTEMMEM), so blending works properly. Then blit composition texture to back buffer.
Possibly related: https://bugreports.qt.io/browse/QTBUG-45854