[PATCH 05/13] glamor: Add glamor_program based 0-width dashed lines

Eric Anholt eric at anholt.net
Wed May 14 11:37:51 PDT 2014

Keith Packard <keithp at keithp.com> writes:

> Markus Wick <markus at selfnet.de> writes:
>> Am 2014-05-06 00:02, schrieb Keith Packard:
>>> +static const char on_off_fs_exec[] =
>>> +    "       float pattern = texture2D(dash, vec2(dash_offset, 
>>> 0.5)).w;\n"
>>> +    "       if (pattern == 0.0)\n"
>>> +    "               discard;\n";
>> Did you care about the sampler configuration? eg with linear filtering, 
>> you don't have to get exactly 0.0. Maybe it's better to check in this 
>> way:
>> if (pattern < 0.5)
> If the sampler is filtering, then we're going to get the wrong answer. I
> do note that I'm not explicitly setting the filtering for the dash
> texture; do I need to?

You've got this in glamor_create_tex():


So as long as nothing changes that (like, say, glamor_render.c doing
linear filtering from the pixmap), you're safe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140514/f8ff9fd2/attachment-0001.sig>

More information about the xorg-devel mailing list