__DRIdrawable * driReadPriv)
{
radeonContextPtr radeon;
- struct radeon_framebuffer *rdrfb;
struct gl_framebuffer *drfb, *readfb;
if (!driContextPriv) {
if (radeon->glCtx->DrawBuffer == drfb) {
if(driDrawPriv != NULL) {
- rdrfb = (struct radeon_framebuffer *)drfb;
if (driDrawPriv->swap_interval == (unsigned)-1) {
- int i;
driDrawPriv->vblFlags =
(radeon->radeonScreen->irq != 0)
? driGetDefaultVBlankFlags(&radeon->
: VBLANK_FLAG_NO_IRQ;
driDrawableInitVBlank(driDrawPriv);
- rdrfb->vbl_waited = driDrawPriv->vblSeq;
-
- for (i = 0; i < 2; i++) {
- if (rdrfb->color_rb[i])
- rdrfb->color_rb[i]->vbl_pending = driDrawPriv->vblSeq;
- }
}
radeon_window_moved(radeon);
}
int has_surface;
GLuint pf_pending; /**< sequence number of pending flip */
- GLuint vbl_pending; /**< vblank sequence number of pending flip */
__DRIdrawable *dPriv;
/* r6xx+ tiling */
struct gl_framebuffer base;
struct radeon_renderbuffer *color_rb[2];
-
- GLuint vbl_waited;
-
- /* buffer swap */
- int64_t swap_ust;
- int64_t swap_missed_ust;
-
- GLuint swap_count;
- GLuint swap_missed_count;
-
- /* Drawable page flipping state */
- GLboolean pf_active;
- GLint pf_current_page;
- GLint pf_num_pages;
-
};
#endif
-static int getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo );
-
#ifndef RADEON_INFO_TILE_CONFIG
#define RADEON_INFO_TILE_CONFIG 0x6
#endif
return (const __DRIconfig **)configs;
}
-/**
- * Get information about previous buffer swaps.
- */
-static int
-getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo )
-{
- struct radeon_framebuffer *rfb;
-
- if ( (dPriv == NULL) || (dPriv->driContextPriv == NULL)
- || (dPriv->driContextPriv->driverPrivate == NULL)
- || (sInfo == NULL) ) {
- return -1;
- }
-
- rfb = dPriv->driverPrivate;
- sInfo->swap_count = rfb->swap_count;
- sInfo->swap_ust = rfb->swap_ust;
- sInfo->swap_missed_count = rfb->swap_missed_count;
-
- sInfo->swap_missed_usage = (sInfo->swap_missed_count != 0)
- ? driCalculateSwapUsage( dPriv, 0, rfb->swap_missed_ust )
- : 0.0;
-
- return 0;
-}
-
const struct __DriverAPIRec driDriverAPI = {
.DestroyScreen = radeonDestroyScreen,
#if defined(RADEON_R200)
.DestroyBuffer = radeonDestroyBuffer,
.MakeCurrent = radeonMakeCurrent,
.UnbindContext = radeonUnbindContext,
- .GetSwapInfo = getSwapInfo,
- .GetDrawableMSC = driDrawableGetMSC32,
- .WaitForMSC = driWaitForMSC32,
- .WaitForSBC = NULL,
- .SwapBuffersMSC = NULL,
/* DRI2 */
.InitScreen2 = radeonInitScreen2,
};