vaCopySurfaceGLX produces corrupt image
- Dominant language
- C
- Stars
- 784
- Forks
- 314
- PR merge metrics
- No merged PRs in 30d
Description
I have an app that uses vaCopySurfaceGLX. On some systems it works OK but others it produces a highly contoured magenta & yellow coloured image.
The problem is evident on an i7 8700 (Coffee Lake) system with integrated graphics running Ubuntu 20.04.1 with mesa 20.0.8. However an old i5 661 (Iron Lake) and the same Ubuntu 20.04.1 works fine. The problem persists when using libva built from git master. I've also tried building the latest intel-vaapi-driver but no change.
I believe there is a bug in the function create_tfp_surface() when it creates a framebuffer by calling glXChooseFBConfig. If I add 'GLX_ALPHA_SIZE, 8,' to the attribute list the problem is fixed. This should be included as the GLX_RENDER_TYPE is set to GLX_RGBA_BIT.
I have attached a patch that corrects the problem:
[0001-GLX-Specify-an-alpha-size-when-requesting-a-GLX-fram.patch.txt](https://github.com/intel/libva/files/5552819/0001-GLX-Specify-an-alpha-size-when-requesting-a-GLX-fram.patch.txt)
Contributor guide
Assessment
This issue has not been assessed yet.