[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: Gradients are broken with glamor when RepeatReflect is set
From:       Chris Wilson <chris () chris-wilson ! co ! uk>
Date:       2018-01-23 17:24:35
Message-ID: 151672827598.13096.12521507555320149163 () mail ! alporthouse ! com
[Download RAW message or body]

Quoting Clemens Eisserer (2018-01-23 17:03:04)
> Hi,
> 
> Great to see movement regading this issue.
> 
> > It's broken with llvmpipe/softpipe as well. Does it render correctly
> > with glamor on i965? If so, maybe it's a Gallium non-driver issue.
> 
> Glamor on Intel Gen5 (Arrendale) procudes results consistent with
> radeonsi/llvmpipe.
> So it seems the shader is the culprit.

Radial shader (which we think is correct):
	t = abs(fract(t * 0.5 + 0.5) * 2.0 - 1.0);

Linear shader (note unnormalized):
	distance = abs(mod(distance + _pt_distance, 2.0 * _pt_distance) - _pt_distance);

Which makes the same mistake as I did in using mod() instead of the GL
definition of fract(). Simplest fix will be to normalize distance and
then use the correct transformation from the radial shader.
-Chris
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic