diff options
author | Robert Bragg <[email protected]> | 2012-01-10 22:16:26 +0000 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2012-01-11 12:16:47 -0500 |
commit | 670f182a1f0401f34b1fb7ead50644589737f0d2 (patch) | |
tree | 5160c24346db79d47699271e374ddba55be3add5 /.emacs-dirvars | |
parent | 765ed3a6a9317607311bac1dcb0edee13ebcee16 (diff) |
egl_dri2/wayland: handle creating xrgb8888 images
When creating an EGLImage from a struct wl_buffer * this ensures
that we create an XRGB8888 image if the wayland buffer doesn't have an
alpha channel. To determine if a wl_buffer has a valid alpha channel
this patch adds an internal wayland_drm_buffer_has_alpha() function.
It's important to get the internal format for an EGLImage right so that
if a GL texture is later created from the image then the GL driver will
know if it should sample the alpha from the texture or flatten it to
a constant of 1.0.
This avoids needing fragment program workarounds in wayland compositors
to manually ignore the alpha component of textures created from wayland
buffers.
krh: Edited to use wl_buffer_get_format() instead of wl_buffer_has_alpha().
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to '.emacs-dirvars')
0 files changed, 0 insertions, 0 deletions