Commit 20cb5b2d authored by Eric Anholt's avatar Eric Anholt

glamor: Clarify some logic in RepeatFix handling.

wh ratios are != 1.0 only when large, so with that we can simplify
down how we end up with RepeatFix being used.
Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
parent 07f0d90e
......@@ -565,22 +565,15 @@ glamor_set_composite_texture(glamor_screen_private *glamor_priv, int unit,
* GLES2 doesn't support RepeatNone. We need to fix it anyway.
*
**/
if (repeat_type != RepeatNone)
repeat_type += RepeatFix;
else if (glamor_priv->gl_flavor == GLAMOR_GL_ES2
|| glamor_pixmap_priv_is_large(pixmap_priv)) {
if (picture->transform)
repeat_type += RepeatFix;
}
if (repeat_type >= RepeatFix) {
if (glamor_pixmap_priv_is_large(pixmap_priv) ||
(glamor_priv->gl_flavor == GLAMOR_GL_ES2 && repeat_type == RepeatNone &&
picture->transform)) {
glamor_pixmap_fbo_fix_wh_ratio(wh, pixmap, pixmap_priv);
if ((wh[0] != 1.0 || wh[1] != 1.0)
|| (glamor_priv->gl_flavor == GLAMOR_GL_ES2
&& repeat_type == RepeatFix))
glUniform4fv(wh_location, 1, wh);
else
repeat_type -= RepeatFix;
glUniform4fv(wh_location, 1, wh);
repeat_type += RepeatFix;
}
glUniform1i(repeat_location, repeat_type);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment