Skip to content
Snippets Groups Projects
Commit 25a4bb53 authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

gl-renderer: add shader bit input_is_premult


Add a new shader requirements bit input_is_premult which says whether
the texture sampling results in premultiplied alpha or not. Currently
this can be deduced fully from the shader texture variant, but in the
future there might a protocol extension to explicitly control it. Hence
the need for a new bit.

yuva2rgba() is changed to produce straight alpha always. This makes
sample_input_texture() sometimes produce straight or premultiplied
alpha. The input_is_premult bit needs to match sample_input_texture()
behavior. Doing this should save three multiplications in the shader for
straight alpha formats.

pipeline_premult() function is added, because in the future another
pipeline working on straight alpha will be needed.

Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent 819054ce
Loading
This commit is part of merge request !637. Comments created here will be created in the context of that merge request.
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment