[PATCH] remove damagePostOp() from DamageDamageRegion()

Aaron Plattner aplattner at nvidia.com
Wed Aug 27 09:56:23 PDT 2008


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.

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