⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 registry.h

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************
<module>
* Name         : Registry.h
* Title        : PVR D3DM registry flags and structures.
* Author(s)    : Imagination Technologies
* Created      : 2 March 2004
*
* Copyright    : 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.
*
* Description  : PVR D3DM registry flags and structures.
*
* Platform     : Windows CE
*
</module>

$Log: registry.h $

********************************************************************************/
#if !defined (_REGISTRY_H_)
#define _REGISTRY_H__

#define D3DMREG_DECLARE_STRINGS

/*****************************************************************************
 Registry flags
*****************************************************************************/
#define	D3DMREG_SOFTEN_PUNCH_THROUGH	0x00000001
#define	D3DMREG_TEXTURE_SUPER_SAMPLE	0x00000004
#define D3DMREG_TEXTURE_TRILIN_FILTER	0x00000008
#define	D3DMREG_AUTO_MIP_MAP			0x00000020
#define	D3DMREG_RHW_RENDERING			0x00000080
#define D3DMREG_DISABLE_XSUPERSAMPLE	0x00004000
#define D3DMREG_DISABLE_YSUPERSAMPLE	0x00008000
#define D3DMREG_2XAA_YSUPERSAMPLE		0x00010000
#define D3DMREG_DISABLE_TASNAPPING		0x00040000
#define D3DMREG_ENABLE_TASMALLCULL		0x00080000
#define D3DMREG_ENABLE_TAHALFOFFSET		0x00100000
#define D3DMREG_ENABLE_ISPHALFOFFSET	0x00200000
#define D3DMREG_COMPLEX_SCENE			0x00800000
#define D3DMREG_DISABLE_ALTEST			0x02000000
#define D3DMREG_DISABLE_ALTEST_OPAQUE	0x04000000
#define D3DMREG_DISABLE_YUV				0x10000000

#define D3DMREG_DEFAULT_FLAGS			0

/*****************************************************************************
 Flags2 word...
*****************************************************************************/
#define D3DMREG2_DISABLE_RENDER_ON_LOCK	 0x00000001
#define	D3DMREG2_DISABLE_MIPMAP			 0x00000002
#define	D3DMREG2_ONLYUSELASTFOGCOLOUR	 0x00000004
#define D3DMREG2_ZERO_TEXTURE_MEMORY	 0x00000008
#define D3DMREG2_DUPLICATE_APPNAME		 0x00000010

/* 
	Flags2 default (if Flags2 not present in registry) 
*/
#define D3DMREG2_DEFAULT_FLAGS			0			

/*****************************************************************************
 Internal flags..
*****************************************************************************/
#define D3DMREGI_ENABLE_STATSDISPLAY	0x00000001
#define D3DMREGI_ENABLE_TIMINGSTATS		0x00000002
#define D3DMREGI_ENABLE_FRAMENUM		0x00000004
#define D3DMREGI_DISABLE_MIPFILTER		0x00000008
#define D3DMREGI_DISABLE_TSP			0x00000010
#define D3DMREGI_NOTWIDDLEDTEXTURES		0x00000020

/*****************************************************************************
 HAL Registry data structure. Any changes to this structure MUST be reflected
 in ppszDXFlagStrings table in pvrdxah.h
*****************************************************************************/
typedef struct _PVR_REG_DATA_
{
	DWORD	dwFlags;
	DWORD	dwFlags2;
	DWORD	dwIFlags;
	DWORD	dwMIPMapThreshold;
	DWORD	dwZBiasScale;
} PVR_REG_DATA, *PPVR_REG_DATA;

/*****************************************************************************
 Function prototypes.
*****************************************************************************/
IMG_VOID GetD3DMRegSettings(DWORD dwDevCookie, PPVR_REG_DATA psRegData);

IMG_BOOL HostReadRegistryInt(IMG_UINT32 ui32DevCookie, IMG_CHAR *pszKey, IMG_CHAR *pszValue, IMG_UINT32 *pui32Data);

/*****************************************************************************
App hint stuff
*****************************************************************************/

typedef struct _D3DM_APP_HINT_
{
	char 					*ptszVarName;	/* Name of registry entry									*/
	DWORD					dwOrdinal;		/* Ordinal for hint											*/
	DWORD					dwType;			/* Type of app hint (see below)								*/
	DWORD  					dwValue;		/* Default value for this app hint or..						*/
	DWORD					dwFIndex;		/* Flag word index in which to set...						*/
	DWORD 					dwFlag;			/* Bitmask for "flags" word(s) or pszVarName for "ganged"	*/
	DWORD					dwValidHW;		/* Indicates which HW versions hint is valid for.			*/
	struct _D3DM_APP_HINT_	*psMore;		/* Pointer to "child" style hints.							*/
} D3DM_APP_HINT, *PD3DM_APP_HINT;

/*
	Mask for hint base type.
*/
#define D3DM_AHINTTYPE_BASEMASK			0x000000FF

/*
	Indicates that app hint is simple on/off flag.
*/
#define D3DM_AHINTTYPE_SIMPLEFLAG		1

/*
	Indicates that app hint is a 32 bit signed/unsigned integer or float value
*/
#define D3DM_AHINTTYPE_VAL32			2

/*
	Indicates that entry has "child" flags associated with it. psMore will point to further 
	PVR3D_APP_HINT structures. Note, a child app hint is only inserted into registry when
	parent is "opened". Note2, child entries specify default state when hint is enabled i.e
	HAL will ignore them unless parent default is enabled or enabled by UI.
*/
#define D3DM_AHINTTYPE_CHILDFLAGS		3

/*
	Indicates that entry has "child" flags associated with it. Similar to _CHILDFLAGS,
	differs in that child values are all stored in string specified by parent pszVarName.
	Note, this is overriden by any child that also specifies a pszVarName.
*/
#define D3DM_AHINTTYPE_GANGEDFLAGS		4

/*
	Indicates that app hint results in multiple values being set in registry.
	dwValue will point to list of hints to set. Note, parent pszVarName will
	normally be NULL.
*/
#define D3DM_AHINTTYPE_GROUP			5

/*
	Indicates that app hint is public i.e exposed by control panel.
*/
#define D3DM_AHINTTYPE_PUBLIC			0x00000100

/*
	Indicates that exposed state can't be the logical inverse of the driver state.
*/
#define D3DM_AHINTTYPE_NOINVERT			0x00000200

/*
	Indicates that child/ganged flag member is exclusive i.e. all other member must 
	be disabled when this one is set. This can be applied to whole branches within 
	a child/ganged tree. Note, in this last case it is the resposibility of the
	UI to obey exclusivity, the driver will not validate flag combinations.
*/
#define D3DM_AHINTTYPE_EXCLUSIVE		0x00000400

/*
	Tells driver to ignore entry when processing table. This is useful when tree 
	structure is primarily expressing the control panel layout, in this case the 
	driver will normally just pull the strings from elsewhere in the table.
*/
#define D3DM_AHINTTYPE_DRVIGNORE		0x00000800

/*
	Indicates end of app hint list.
*/
#define D3DM_AHINTTYPE_END				0xFFFFFFFF

/*****************************************************************************
 Flag and value word strings.
*****************************************************************************/
#ifdef D3DMREG_DECLARE_STRINGS
static char	*ppszDXFlagStrings[] = 
{
	"Flags",
	"Flags2",
	"IFlags",
	"MIPMapThreshold",
	"ZBiasScale",
	""
};
#else
extern TCHAR	**pptszD3DFlagStrings;
#endif

/*
	Lookup defines, these must match mapping into both the string table and
	the PVR_REG_DATA struct.
*/
#define D3DM_AHVALIDX_FLAGS				0
#define D3DM_AHVALIDX_FLAGS2			1
#define D3DM_AHVALIDX_IFLAGS			2
#define D3DM_AHVALIDX_MMTHRESH			3
#define D3DM_AHVALIDX_ZBSCALE			4

/*****************************************************************************
 Ordinal values for public hints.
*****************************************************************************/
#define D3DM_AHINTORD_ENABLETEXSS		4
#define D3DM_AHINTORD_ENABLETLF			5
#define D3DM_AHINTORD_ENABLESOFTPT		12
#define D3DM_AHINTORD_USERHW			15
#define D3DM_AHINTORD_NORENDTILLFLIP	17

#define D3DM_AHINTORD_SSENABLE2X2		18
#define D3DM_AHINTORD_SSENABLEX			19
#define D3DM_AHINTORD_SSENABLEY			20
#define D3DM_AHINTORD_SSNONE			21
#define D3DM_AHINTORD_SSCONTROL			22

/*****************************************************************************
 Child, Ganged & Grouped app hints.....
*****************************************************************************/
#ifdef D3DMREG_DECLARE_STRINGS

/*****************************************************************************
 FSAA control...
*****************************************************************************/
static D3DM_APP_HINT psPVRD3DSSCtlVert[] =
{
	{
		"DisableXSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		1,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_XSUPERSAMPLE,
		0,
		0
	},
	{
		"DisableYSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		0,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_YSUPERSAMPLE,
		0,
		0
	},

	{0,0,D3DM_AHINTTYPE_END,0,0,0,0,0}
};

static D3DM_APP_HINT psPVRD3DSSCtlHoriz[] =
{

	{
		"DisableXSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		0,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_XSUPERSAMPLE,
		0,
		0
	},
	{
		"DisableYSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		1,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_YSUPERSAMPLE,
		0,
		0
	},

	{0,0,D3DM_AHINTTYPE_END,0,0,0,0,0}
};

static D3DM_APP_HINT psPVRD3DSSCtl2x2[] =
{
	{
		"DisableXSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		0,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_XSUPERSAMPLE,
		0,
		0
	},
	{
		"DisableYSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		0,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_YSUPERSAMPLE,
		0,
		0
	},

	{0,0,D3DM_AHINTTYPE_END,0,0,0,0,0}
};

static D3DM_APP_HINT psPVRD3DSSCtlNone[] =
{
	{
		"DisableXSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		0,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_XSUPERSAMPLE,
		0,
		0
	},
	{
		"DisableYSS",
		0,
		D3DM_AHINTTYPE_SIMPLEFLAG,
		0,
		D3DM_AHVALIDX_FLAGS,
		D3DMREG_DISABLE_YSUPERSAMPLE,
		0,
		0
	},

	{0,0,D3DM_AHINTTYPE_END,0,0,0,0,0}
};

/*
	The child branch...
*/
static D3DM_APP_HINT psPVRD3DSSControl[] =
{
	{
		0,
		D3DM_AHINTORD_SSENABLE2X2,
		D3DM_AHINTTYPE_GROUP | D3DM_AHINTTYPE_EXCLUSIVE | D3DM_AHINTTYPE_PUBLIC,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -