📄 services_stub.h
字号:
// Services Stub:
#include "img_defs.h"
#include "img_types.h"
//Needs MemInfo
typedef int PVRSRV_ERROR ;
// needs MEMBLK
#define PVRSRV_OK 0
typedef struct _RESMAN_ITEM_ *PRESMAN_ITEM; /*!< forward reference */
/*!
*****************************************************************************
* Implementation details for memory handling
*****************************************************************************/
typedef struct _PVRSRV_MEMBLK_
{
IMG_SYS_PHYADDR sSysPhysAddr; /*!< Address of the memory in the CPU's physical address map */
IMG_DEV_VIRTADDR sDevVirtAddr; /*!< Address of the memory in the IMG MMUs address space */
IMG_HANDLE hBuffer; /*!< Stores the BM_HANDLE for the underlying memory management */
PRESMAN_ITEM psResItem; /*!< Pointer to resource item for allocate */
} PVRSRV_MEMBLK;
// needs SYNC_INFO
/*!
*****************************************************************************
* Structure providing implementation details for serialisation and
* synchronisation of operations. This is the fundamental unit on which operations
* are synced, and would typically be included in any data structures that require
* serialised accesses etc. e.g. MEM_INFO structures
*
*****************************************************************************/
typedef struct _PVRSRV_SYNC_INFO_
{
IMG_UINT32 ui32NextWriteOp; /*!< Index of the next write operation that will be
created on this sync info object. Increases by one each time
a write operation is added. */
volatile IMG_UINT32 *pui32LastWriteOp; /*!< Kernel virtual address of a field in frame buffer that holds the
number of the last write operation that has completed on this sync info */
volatile IMG_UINT32 ui32ReadOpsComplete; /*!< Number of Read operations that completed since the last write operation */
IMG_UINT32 ui32ReadOpsPending; /*!< Number of read operations submitted since the last write op */
volatile IMG_UINT32 ui32LastWriteOpVal; /*!< pui32LastWriteOp points to this */
volatile IMG_UINT32 ui32PresentBlitCountPending;/*!< required to flush read dependencies before TA'ing a scene */
volatile IMG_UINT32 ui32PresentBlitCountComplete;/*!< required to flush read dependencies before TA'ing a scene */
struct _PVRSRV_SYNC_INFO_ *psKernSyncInfo; /*!< Kernel side implementation details */
} PVRSRV_SYNC_INFO;
/*!
*****************************************************************************
* Memory Management (externel interface)
*****************************************************************************/
typedef struct _PVRSRV_MEM_INFO_
{
struct _PVRSRV_MEM_INFO_ *psMemInfoKM;
IMG_PVOID pvLinAddr; /*!< Address of the memory in the address space of the process that allocated the memory */
IMG_DEV_VIRTADDR uiDevAddr; /*!< Address of the memory in the owning devices */
/*!< address space */
IMG_UINT32 *pui32Flags; /*!< Flags indicating the uses the memory was allocated with */
IMG_UINT32 ui32AllocSize; /*!< Size of the allocated buffer in bytes */
PVRSRV_SYNC_INFO *psSyncInfo; /*!< Structure used with the command queue/sync mechanism */
PVRSRV_MEMBLK sMemBlk; /*!< Internal implementation details. Do not use outside services code. */
IMG_PVOID pvSysBackupBuffer; /*!< Address of the backup buffer used in a save/restore of the surface */
} PVRSRV_MEM_INFO, *PPVRSRV_MEM_INFO;
//device type
/*!
*****************************************************************************
* List of known device types.
*****************************************************************************/
typedef enum _PVRSRV_DEVICE_TYPE_
{
PVRSRV_DEVICE_TYPE_UNKNOWN = 0 ,
PVRSRV_DEVICE_TYPE_MBX1 = 1 ,
PVRSRV_DEVICE_TYPE_MBX1_LITE = 2 ,
PVRSRV_DEVICE_TYPE_M24VA = 3,
PVRSRV_DEVICE_TYPE_JDISPLAY = 4,
PVRSRV_DEVICE_TYPE_CRTC = 5,
PVRSRV_DEVICE_TYPE_PDP = 6,
PVRSRV_DEVICE_TYPE_DMAC = 7,
PVRSRV_DEVICE_TYPE_RENESAS_LCD = 8,
PVRSRV_DEVICE_TYPE_CLCDC = 9,
PVRSRV_DEVICE_TYPE_FORCE_I32 = 0x7fffffff
} PVRSRV_DEVICE_TYPE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -