[PATCH] remove damagePostOp() from DamageDamageRegion()

Maarten Maathuis madman2003 at gmail.com
Wed Aug 27 10:22:05 PDT 2008

On Wed, Aug 27, 2008 at 6:56 PM, Aaron Plattner <aplattner at nvidia.com> wrote:
> On Tue, Aug 26, 2008 at 11:58:28PM +0200, Maarten Maathuis wrote:
>> This is a patch based on a suggestion by Michael Danzer, because it's
>> non-trivial i'm posting it first. The idea is that PostOp only needs
>> to be called after doing an actual rendering operation. Please voice
>> any concerns you might have.
>> I CC'ed Aaron Plattner because "he" might be the only out of tree user
>> of this symbol.
>> Maarten.
> Thanks for the heads-up, Maarten.  We do indeed use DamageDamageRegion to
> report damage from things like Xv and OpenGL rendering, and rely on it
> actually sending the events.  While we can certainly add calls to
> DamageDamagePostOp where necessary, it seems unfortunate to break existing
> drivers when it would be trivial to add a new function.
> Now might be a good time to reopen the discussion about fixing the Damage
> extension for asynchronous hardware.  There are two ways to solve this:
>  1. Add extensions to allow GL client rendering to wait for X rendering
>     associated with a particular Damage event using some sort of sync
>     barrier.
>  2. Defer sending Damage events until the damage has actually occurred.

(I forgot to send the message to the list as well)

You want an event that is sent once the rendering has actually exited
the pipeline?

If so that would "only" require only getting some kind of unique
damage identifier along with the rendering request. The rest would be
up to the hardware/driver using some kind of reference counting
mechanism. If so, why can't you make up your own identifiers?

> While 1 would be ideal, it's probably too complicated to spec and implement
> in a reasonable timeframe so it might be a good idea to think about
> implementing 2.  What we need for that is
>  a. reportAfter-like semantics for all damage objects, not just ones that
>     were explicitly marked with DamageSetReportAfterOp.
>  b. Deferring damageReportPostOp to after the rendering has actually
>     occurred, not just after it's been submitted to the hardware.
> The NVIDIA driver is not the only one that needs this; it'll be a problem
> for any driver for hardware that processes commands from OpenGL and X
> asynchronously.
> -- Aaron

More information about the xorg mailing list