Vertex clipping and primitive types

Sam Spilsbury smspillaz at gmail.com
Thu Sep 19 15:58:11 PDT 2013


On 20/09/2013 5:09 AM, "Bill Spitzak" <spitzak at gmail.com> wrote:
>
>
>
> Sam Spilsbury wrote:
>>
>>
>> The point is to any arbitrary geometry against a rectangle. This is used
to ensure that redraw areas only stick to damage areas.
>>
> I suspect the most efficient thing to do is to clip against the bounding
box of the obscuring object, even if that produces excess redraw, due to
the complexity of arbitrary clip exceeding the time saved from the smaller
redraw. It may be useful to do an accurate test for no-intersection, and if
they intersect produce a 4-sided intersection of both bounding boxes. Also
watch out for antialiased edges, the mathematically correct intersection
test may give a false negative.

Hi Bill.

I don't known if occlusion optimization is done yet, but we already clip
geometry against damage boxes (see the texture_region dance). Occlusion
detection is somewhat orthogonal to what in talking about here.

What I've been talking about here is that this clipping doesn't support
arbitrary nonlinear transforms (eg vertex mesh), and then there is the
additional problem of where primitive types need to be specified.

In any case, pq and I worked out a semi-suitable design for this yesterday.
The shell provides a function to the renderer used to generate multiple
arrays of source transformation points (think texcoords) and then provides
a function to Weston core (also available to the renderer) to transform a
source point to a destination point (which it can do however it likes).
Core used this second function to calculate the final clip box, as damage
is submitted to Weston in buffer-space and also to do input transformation.
The renderer uses it to get the destination mesh from then source mesh. The
primitive types in that instance become an implementation detail on the
renderer side, so we can pick whatever is best and clip it to the damage
boxes properly.

In any event, I think a first implementation is probably a better test of
how well this works than lots of discussion.

Sam.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130920/65f7aef8/attachment.html>


More information about the wayland-devel mailing list