filename | src/pvr2/pvr2.h |
changeset | 337:cdd757aa8e8c |
prev | 335:fb890e1814c0 |
next | 338:8c68d9097846 |
author | nkeynes |
date | Sun Jan 28 11:36:00 2007 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Invalidate palette textures when the palette changes (fixes a few texture bugs) Fix odd/even selection in pvr2_display_frame |
file | annotate | diff | log | raw |
1.1 --- a/src/pvr2/pvr2.h Sat Jan 27 12:03:53 2007 +00001.2 +++ b/src/pvr2/pvr2.h Sun Jan 28 11:36:00 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: pvr2.h,v 1.31 2007-01-27 12:03:53 nkeynes Exp $1.6 + * $Id: pvr2.h,v 1.32 2007-01-28 11:36:00 nkeynes Exp $1.7 *1.8 * PVR2 (video chip) functions and macros.1.9 *1.10 @@ -84,6 +84,12 @@1.11 #define PVR2_POLY_MODE_CLAMP_S 0x000100001.12 #define PVR2_POLY_MODE_CLAMP_T 0x000080001.14 +#define PVR2_POLY_FOG_LOOKUP 0x000000001.15 +#define PVR2_POLY_FOG_VERTEX 0x004000001.16 +#define PVR2_POLY_FOG_DISABLED 0x008000001.17 +#define PVR2_POLY_FOG_LOOKUP2 0x00C000001.18 +1.19 +1.20 #define PVR2_TEX_FORMAT_ARGB1555 0x000000001.21 #define PVR2_TEX_FORMAT_RGB565 0x080000001.22 #define PVR2_TEX_FORMAT_ARGB4444 0x100000001.23 @@ -97,6 +103,8 @@1.24 #define PVR2_TEX_FORMAT_MASK 0x380000001.25 #define PVR2_TEX_UNTWIDDLED 0x040000001.26 #define PVR2_TEX_STRIDE 0x020000001.27 +#define PVR2_TEX_IS_PALETTE(mode) ( (mode & PVR2_TEX_FORMAT_MASK) == PVR2_TEX_FORMAT_IDX4 || (mode&PVR2_TEX_FORMAT_MASK) == PVR2_TEX_FORMAT_IDX8 )1.28 +1.30 #define PVR2_TEX_ADDR(x) ( ((x)&0x01FFFFF)<<3 );1.31 #define PVR2_TEX_IS_MIPMAPPED(x) ( (x) & PVR2_TEX_MIPMAP )1.32 @@ -337,6 +345,7 @@1.33 #define POLY2_DEST_BLEND(poly2) ( pvr2_poly_dstblend[((poly2)>>26)&0x07] )1.34 #define POLY2_SRC_BLEND_TARGET(poly2) ((poly2)&0x02000000)1.35 #define POLY2_DEST_BLEND_TARGET(poly2) ((poly2)&0x01000000)1.36 +#define POLY2_FOG_MODE(poly2) ((poly2)&0x00C00000)1.37 #define POLY2_COLOUR_CLAMP_ENABLE(poly2) ((poly2)&0x00200000)1.38 #define POLY2_ALPHA_ENABLE(poly2) ((poly2)&0x00100000)1.39 #define POLY2_TEX_ALPHA_ENABLE(poly2) (((poly2)&0x00080000) == 0 )
.