|
1 | | -/* $NetBSD: summitreg.h,v 1.14 2025/01/26 05:20:57 macallan Exp $ */ |
| 1 | +/* $NetBSD: summitreg.h,v 1.15 2025/01/27 11:38:39 macallan Exp $ */ |
2 | 2 |
|
3 | 3 | /* |
4 | 4 | * Copyright (c) 2024 Michael Lorenz |
|
61 | 61 | #define FOE_BLEND_ROP 0x00000040 // IBO is used |
62 | 62 | #define FOE_DITHER 0x00000080 |
63 | 63 | #define VISFX_IBO 0x921110 // ROP in lowest nibble |
| 64 | +#define VISFX_CBR 0x92111c // constant colour for blending |
64 | 65 | #define VISFX_IAA0 0x921200 // XLUT, 16 entries |
65 | 66 | #define VISFX_IAA(n) (0x921200 + ((n) << 2)) |
66 | 67 | #define VISFX_OTR 0x921148 // overlay transparency |
|
151 | 152 | * 0x400 or 0x100 by themselves don't start a command either |
152 | 153 | */ |
153 | 154 |
|
| 155 | +/* |
| 156 | + * alpha blending operations |
| 157 | + * source and destination blend functions are in 0xf0 and 0x0f |
| 158 | + * how they're combined is in 0x700 |
| 159 | + */ |
| 160 | +#define IBO_ROP 0 /* ROP in lower 4 bit */ |
| 161 | +#define IBO_ADD 0x200 |
| 162 | +#define IBO_S_MINUS_D 0x400 /* source - dest */ |
| 163 | +#define IBO_D_MINUS_S 0x500 /* dest - source */ |
| 164 | +#define IBO_MIN 0x600 |
| 165 | +#define IBO_MAX 0x700 |
| 166 | + |
| 167 | +/* the blend functions seem to be: */ |
| 168 | +#define IBO_ZERO 0 |
| 169 | +#define IBO_ONE 1 |
| 170 | +#define IBO_SRC 4 /* src alpha */ |
| 171 | +#define IBO_ONE_MINUS_SRC 5 /* 1 - src alpha */ |
| 172 | +#define IBO_CBR 14 /* alpha from CBR */ |
| 173 | +#define IBO_ONE_MINUS_CBR 15 /* 1 - alpha from CBR */ |
| 174 | + |
| 175 | +#define SRC(n) ((n) << 4) |
| 176 | +#define DST(n) (n) |
154 | 177 | /* |
155 | 178 | * use unbuffered space for cursor registers |
156 | 179 | * The _POS, _INDEX and _DATA registers work exactly like on HCRX |
|
0 commit comments