By not tracking the front buffer correctly, i.e. performing the exchange
on every swap, GL_FRONT was no longer pointing at the updated buffer and
neither was the root pixmap. So both X and GL would read the wrong
buffer was the flip was pending.
The other issue was that we would feed the old front buffer back to the
application as a future back buffer (due to buffer caching) and so the
kernel would duly insert a WAIT_EVENT for the pending flip to complete
before allowing rendering to affect it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the client exits before the async page-flip completes then we still
need to decrement the pending flip count in order to correctly flip the
scanout next time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Before the xserver is patched to send notification of release of the
scratch pixmaps, we cannot associated GPU resources with them. In
practice, the only advantage for doing so is for SHM pixmaps...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I went a step too far... I still need some define in order to switch
between uxa/sna at compile time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
DRI2 presumes that the pixmap->serialNumber can be used as unique id.
If it changes revokes *all* the buffers, it presumes a new pixmap has
been attached to the window, for example after a reconfiguration event
(resizing of a window, or a mode switch). However, as we updated the
root pixmap upon a pageflip, we were triggering revocations everytime,
causing further revocations and massive aperture thrashing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As the introduction of the unrolled fill_boxes() was bypassing the
effective optimisation in fill_one().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
By working around the broken shaders, we emitted the CA rectangle in the
middle of a sequence of glyphs and left the state setup for CA. So we
need to reset the pipeline state at the start of every composite blt.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Clip the operation extents before passing to the backend to setup the
operation, so that we only need to upload the minimum amount of data
necessary, or avoid tiling etc.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We can write into the bo if it has no outstanding requests, whereas we
were checking to see it was last on the gpu instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order that we remember to flush the contents back to the GPU
before we wake up the DRI clients, we need to add those dirty
pixmaps to the flushing list. I caught the obvious place, the
central move-to-cpu, but I missed a couple of paths were we
optimise the copy onto the shadow.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we will immediately attempt to replace it with an inactive when
moving the data to the GPU, short-circuit that replacement.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
These only existed to work around an include order problem, when kgem
was intended to be entirely separable from sna. Moving the function
pointer into kgem simplifies matters.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we check for retirement everytime we wakeup, it is seldom useful to
check again until we know we have invoked an operation that may block.
But when we do check, we do not want to scan the entire active list
looking for flushing candidates, so track those on a separate list.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So that we can simply query it from each of the Zaphod instances without
blocking. Requires a fixed kernel...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
And bump configure.ac to require dri2proto >= 2.6, because
DRI2BufferStencil and DRI2BufferHiz were introduced in that version.
When a client requests DRI2BufferHiz or DRI2BufferStencil,
I830DRI2CreateBuffer() now returns a Y-tiled buffer. The stencil buffer is
handled as a special case due its quirky pitch requirements.
CC: Eric Anholt <eric@anholt.net>
CC: Ian Romanick <idr@freedesktop.org>
CC: Kristian Høgsberg <krh@bitplanet.net
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>