intel / intel/libva

vaCopySurfaceGLX produces corrupt image

Open
#473 6 comments 0 reactions 1 assignee Claimed by @XinfengZhang View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.