📄 queue.h
字号:
/*!****************************************************************************
@File queue.h
@Title Command Queue API
@Author Imagination Technologies
@date 02/09/2003
@Copyright Copyright 2003-2004 by Imagination Technologies Limited.
All rights reserved. No part of this software, either
material or conceptual may be copied or distributed,
transmitted, transcribed, stored in a retrieval system
or translated into any human or computer language in any
form by any means, electronic, mechanical, manual or
other-wise, or disclosed to third parties without the
express written permission of Imagination Technologies
Limited, Unit 8, HomePark Industrial Estate,
King's Langley, Hertfordshire, WD4 8LZ, U.K.
@Platform generic
@Description Internal structures and definitions for command queues and synchronisation
@DoxygenVer
******************************************************************************/
/******************************************************************************
Modifications :-
$Log: queue.h $
*****************************************************************************/
#ifndef QUEUE_H
#define QUEUE_H
#if defined(__cplusplus)
extern "C" {
#endif
/*!
* Macro to Read Offset in given command queue
*/
#define UPDATE_QUEUE_ROFF(psQueue, ui32Size) \
psQueue->ui32ReadOffset = (psQueue->ui32ReadOffset + ui32Size) \
& (psQueue->ui32QueueSize - 1);
/*!
* Information about the blit command in progress to allow for cleanup.
* This will be attached to the dev info structure.
* This is set up by the blit command processor as a cmd is removed from a queue.
* On command completion, this structure becomes free, bInUse==FALSE.
*/
typedef struct _BLTSYNCS {
IMG_BOOL bInUse; /*!< Is this sync structure in use */
PVRSRV_SYNC_INFO *psDstSync; /*!< Dest surface sync structure to update on completion */
IMG_UINT32 ui32NumSrcSyncs; /*!< How many sources do we need to update on completion... */
PVRSRV_SRCSYNC_INFO apsSrcSyncs[PVRSRV_MAX_BLT_SRC];
/*!< ... and where they are */
IMG_BOOL bUpdatePrimary; /*!< Optionally update single shot display. */
}BLTSYNCS;
/*!
* Information about the render command in progress to allow for cleanup.
* This will be attached to the dev info structure.
* This is set up by the render command processor as a cmd is removed from a queue.
* On command completion, this structure becomes free, bInUse==FALSE.
*/
typedef struct _RENDERSYNCS {
IMG_BOOL bInUse; /*!< Is this sync structure in use */
IMG_BOOL bRenderBlit;
IMG_BOOL bPartialRender; /*!< Is this a partial render */
PVRSRV_SYNC_INFO *psDstSync; /*!< Dest surface sync structure to update on completion */
IMG_UINT32 ui32NumSrcSyncs; /*!< How many sources do we need to update on completion... */
PVRSRV_SRCSYNC_INFO apsSrcSyncs[PVRSRV_MAX_RENDER_SRC];
/*!< ... and where they are */
IMG_UINT32 ui32CurrentRenderData; /*!< index into region header, hwcontextid and RTA state */
PVR3DIF_3DCTL *ps3DCtl; /*!< RTA KM structure */
#if defined(SUPPORT_3D_BLIT)
IMG_BOOL bOverlay;
PVR3DIF_BLITCTL *psBlitCtl;
PVR3DIF_OVL_BLITCTL *psOvlBlitCtl;
#endif
IMG_UINT32 ui32RegionIndex;
IMG_UINT32 ui32HWContextID;
IMG_BOOL bUpdatePrimary; /*!< Optionally update single shot display. */
}RENDERSYNCS;
/*!
* Element of internal vsync flip queue.
* Implemented as a linked list.
* Once used, an element is moved to the tail of the list and
* marked invalid.
* There should never be valid commands after invalid commands in the queue.
* New commands are inserted behind the last valid command, searching from the head.
* Commands are consumed from the head.
*/
typedef struct _VSYNC_FLIP_CMD_INFO {
IMG_BOOL bValidCmd; /*!< Is this entry valid */
IMG_UINT32 ui32FlipPhysAddr; /*!< See PVRSRV_FLIP_CMD_INFO */
IMG_UINT32 ui32FlipInterval; /*!< See PVRSRV_FLIP_CMD_INFO */
PVRSRV_SYNC_INFO *psFromSyncInfo; /*!< See PVRSRV_FLIP_CMD_INFO */
PVRSRV_SYNC_INFO *psToSyncInfo; /*!< See PVRSRV_FLIP_CMD_INFO */
IMG_UINT32* pui32OverlayConfig; /*!< Pointer to buffer containing overlay register configuration data.
Format is: register ADDRESS followed by DATA to be written. */
IMG_UINT32 ui32OverlayConfigSize; /*!< Size of the overlay configuration (number of DWORDS). */
IMG_BOOL bThisIsOverlayFlip;
struct _VSYNC_FLIP_CMD_INFO *psNext; /*!< Next command in queue - potentially invalid */
}VSYNC_FLIP_CMD_INFO;
PVRSRV_ERROR PVRSRVProcessQueues(PVRSRV_DEV_INFO *psDevInfo);
PVRSRV_ERROR InitVsyncFlipQueue (PVRSRV_DEV_INFO *psDevInfo);
IMG_VOID DeInitVsyncFlipQueue (PVRSRV_DEV_INFO *psDevInfo);
IMG_VOID ProcessVsyncFlip (PVRSRV_DEV_INFO *psDevInfo);
#if defined(__linux__) && defined(__KERNEL__)
#include <linux/types.h>
off_t
QueuePrintQueues (char * buffer, size_t size, off_t off);
#endif
#if defined (__cplusplus)
}
#endif
#endif /* QUEUE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -