Gradients are broken with glamor when RepeatReflect is set

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 23 17:24:35 UTC 2018


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


More information about the xorg mailing list