|
#define | RDPQ_CMD_DEBUG_SHOWLOG 0x00010000 |
| RDP Debug command: turn on/off logging.
|
|
#define | RDPQ_CMD_DEBUG_MESSAGE 0x00020000 |
| RDP Debug command: debug message.
|
|
#define | RDPQ_DEBUG_DEBUG 0 |
| Internal debugging of rdpq_debug.
|
|
#define | intdebugf(...) ({ }) |
| Like debugf, but guarded by RDPQ_DEBUG_DEBUG.
|
|
#define | BITS(v, b, e) ((unsigned int)((v) << (63-(e)) >> (63-(e)+(b)))) |
| Extract bits from word.
|
|
#define | BIT(v, b) BITS(v, b, b) |
| Extract bit from word.
|
|
#define | SBITS(v, b, e) (int)BITS((int64_t)(v), b, e) |
| Extract bits from word as signed quantity.
|
|
#define | CMD(v) BITS((v), 56, 61) |
| Extract command ID from RDP command word.
|
|
#define | CMD_IS_TRI(cmd) ((cmd) >= 0x8 && (cmd) <= 0xF) |
| Check if a command is a triangle.
|
|
#define | FX(n) (1.0f / (1<<(n))) |
| Multiplication factor to convert a number to fixed point with precision n.
|
|
#define | FX32(hi, lo) ((int16_t)(hi) + (lo) * (1.f / 65536.f)) |
| Convert a 16.16 fixed point number into floating point.
|
|
#define | EMIT_TYPE 0x3 |
| Type of message (mask)
|
|
#define | EMIT_CRASH 0x0 |
| Message is a RDP crash.
|
|
#define | EMIT_ERROR 0x1 |
| Message is an error.
|
|
#define | EMIT_WARN 0x2 |
| Message is a warning.
|
|
#define | EMIT_CTX_SOM 0x4 |
| Message context must show last SOM.
|
|
#define | EMIT_CTX_CC 0x8 |
| Message context must show last CC.
|
|
#define | EMIT_CTX_TEX 0x10 |
| Message context must show last SET_TEX_IMAGE.
|
|
#define | EMIT_CTX_TILES (0xFF << 5) |
| Message context must show SET_TILE (mask)
|
|
#define | EMIT_CTX_TILE(n) (0x20 << (n)) |
| Message context must show tile n.
|
|
#define | EMIT_CTX_TILESIZE 0x2000 |
| Message context must show LOAD_TILE/SET_TILE_SIZE instead of SET_TILE.
|
|
#define | __VALIDATE(flags, cond, msg, ...) |
| Internal validation macros (for both errors and warnings)
|
|
#define | VALIDATE_CRASH(cond, msg, ...) __VALIDATE(0, cond, msg, ##__VA_ARGS__) |
| Check and trigger a RDP crash.
|
|
#define | VALIDATE_CRASH_SOM(cond, msg, ...) __VALIDATE(4, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a crash, with SOM context.
|
|
#define | VALIDATE_CRASH_CC(cond, msg, ...) __VALIDATE(8, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a crash, with CC context.
|
|
#define | VALIDATE_CRASH_TEX(cond, msg, ...) __VALIDATE(16, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a crash, with SET_TEX_IMAGE context.
|
|
#define | VALIDATE_CRASH_TILE(cond, tidx, msg, ...) __VALIDATE(EMIT_CRASH | EMIT_CTX_TILE(tidx), cond, msg, ##__VA_ARGS__) |
| Validate and trigger a crash, with tile context.
|
|
#define | VALIDATE_CRASH_TILESIZE(cond, tidx, msg, ...) __VALIDATE(EMIT_CRASH | EMIT_CTX_TILE(tidx) | EMIT_CTX_TILESIZE, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a crash, with tile extents context.
|
|
#define | VALIDATE_ERR(cond, msg, ...) __VALIDATE(1, cond, msg, ##__VA_ARGS__) |
| Check and trigger a RDP validation error.
|
|
#define | VALIDATE_ERR_SOM(cond, msg, ...) __VALIDATE(5, cond, msg, ##__VA_ARGS__) |
| Validate and trigger an error, with SOM context.
|
|
#define | VALIDATE_ERR_CC(cond, msg, ...) __VALIDATE(9, cond, msg, ##__VA_ARGS__) |
| Validate and trigger an error, with CC context.
|
|
#define | VALIDATE_ERR_TEX(cond, msg, ...) __VALIDATE(17, cond, msg, ##__VA_ARGS__) |
| Validate and trigger an error, with SET_TEX_IMAGE context.
|
|
#define | VALIDATE_ERR_TILE(cond, tidx, msg, ...) __VALIDATE(EMIT_ERROR | EMIT_CTX_TILE(tidx), cond, msg, ##__VA_ARGS__) |
| Validate and trigger an error, with tile context.
|
|
#define | VALIDATE_ERR_TILESIZE(cond, tidx, msg, ...) __VALIDATE(EMIT_ERROR | EMIT_CTX_TILE(tidx) | EMIT_CTX_TILESIZE, cond, msg, ##__VA_ARGS__) |
| Validate and trigger an error, with tile extents context.
|
|
#define | VALIDATE_WARN(cond, msg, ...) __VALIDATE(2, cond, msg, ##__VA_ARGS__) |
| Check and trigger a RDP validation warning.
|
|
#define | VALIDATE_WARN_SOM(cond, msg, ...) __VALIDATE(6, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a warning, with SOM context.
|
|
#define | VALIDATE_WARN_CC(cond, msg, ...) __VALIDATE(10, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a warning, with CC context.
|
|
#define | VALIDATE_WARN_TEX(cond, msg, ...) __VALIDATE(18, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a warning, with SET_TEX_IMAGE context.
|
|
#define | VALIDATE_WARN_TILE(cond, tidx, msg, ...) __VALIDATE(EMIT_WARN | EMIT_CTX_TILE(tidx), cond, msg, ##__VA_ARGS__) |
| Validate and trigger an error, with tile context.
|
|
#define | VALIDATE_WARN_TILESIZE(cond, tidx, msg, ...) __VALIDATE(EMIT_WARN | EMIT_CTX_TILE(tidx) | EMIT_CTX_TILESIZE, cond, msg, ##__VA_ARGS__) |
| Validate and trigger a warning, with tile extents context.
|
|
RDP Command queue: debugging helpers.