On 17 Sep 2002, Michel D�nzer wrote:

> On Die, 2002-09-17 at 20:14, Leif Delgass wrote:
> > Don't you want to wait for the vblank _after_ the flip ioctl?  That way
> > you won't draw on the buffer being currently scanned until the vblank
> > indicates the buffers toggled.
> 
> That may be true if the flip only occurs on vertical blank, which isn't
> the case in the radeon driver to allow insanely high framerates.

Does that mean the Radeon starts scanning from the new offset immediately?  
On mach64, according to the docs, a change in CRTC_OFFSET_PITCH only takes
effect when the scanline counter is reset (e.g. on vblank or vline=0).  
So if you change the offset and start drawing before the vertical counter
resets, you clear the current buffer and start drawing on the current
front buffer, hence flickering/tearing.
 
> > BTW, with the current Radeon page flipping code without interrupts, how
> > does it avoid flickering?
> 
> Not at all, the flip occurs immediately.

But even if the card can process the flip before vblank, doesn't that 
still cause tearing/shearing?

> While it would be better to defer the flips until vertical blank and
> sleep afterwards until the vertical blank, that would require a
> mechanism to switch flipping behaviour. I'm afraid the kernel can't
> access environment variables? If not I can't think of a solution without
> another ioctl.
> 
> 
> > [...] framerate is capped to the vertical refresh (e.g. 
> > glxgears maxes out at the vertical refresh).  It seems like the main 
> > problem affecting the frame rate is the wait for idle in step 1.
> 
> You can't have framerates higher than the vertical refresh when syncing
> to vertical blanks, or how would you expect that to work?

I don't expect to be able to get higher than vertical refresh, I was just
pointing that out as a side-effect of the way I'm doing page flipping.  
Without interrupts, it slows things down even more to block until vblank
in the ioctl.  When I talk about step 1 (wait for 3D idle) reducing the
framerate I mean, for example in Quake3 where the framerate is ~21 without
page flipping, I _loose a few FPS with pageflipping.  I think this is
because I have to wait for idle every frame, instead of being able to have
two or three frames on the ring at a time.  I don't see a way around that
though, since there's no way to add the wait+flip to the ring.

-- 
Leif Delgass 
http://www.retinalburn.net




-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to