9#ifndef __LIBDRAGON_RSPQ_INTERNAL_H
10#define __LIBDRAGON_RSPQ_INTERNAL_H
148#define rspq_int_write(cmd_id, ...) rspq_write(0, cmd_id, ##__VA_ARGS__)
162typedef struct rspq_block_s {
173typedef struct __attribute__((packed)) {
175 uint64_t combiner_mipmapmask;
176 uint32_t blend_step0;
177 uint32_t blend_step1;
178 uint64_t other_modes;
184typedef struct __attribute__((packed)) {
195typedef struct rsp_queue_s {
204 uint32_t rspq_rdp_buffers[2];
215 } __attribute__((aligned(16), packed))
rsp_queue_t;
218#define RSPQ_DATA_ADDRESS 8
227static inline bool rspq_in_block(
void) {
A buffer that piggybacks onto rspq_block_t to store RDP commands.
Definition rdpq_internal.h:74
Low-level RSP hardware library.
rspq_block_t * rspq_block
Pointer to the current block being built, or NULL.
Definition rspq.c:338
Constants for the RSPQ subsystem.
#define RSPQ_MAX_OVERLAYS
Maximum number of overlays that can be registered.
Definition rspq_constants.h:20
#define RSPQ_MAX_BLOCK_NESTING_LEVEL
Maximum number of nested block calls.
Definition rspq_constants.h:32
uint16_t padding2
Padding.
Definition rspq_internal.h:214
@ RSPQ_CMD_TEST_WRITE_STATUS
RSPQ Command: Test and write SP_STATUS register.
Definition rspq_internal.h:111
@ RSPQ_CMD_INVALID
RSPQ command: Invalid.
Definition rspq_internal.h:25
@ RSPQ_CMD_CALL
RSPQ command: Call a block.
Definition rspq_internal.h:52
@ RSPQ_CMD_DMA
RSPQ command: DMA transfer.
Definition rspq_internal.h:73
@ RSPQ_CMD_JUMP
RSPQ command: Jump to another buffer.
Definition rspq_internal.h:41
@ RSPQ_CMD_RDP_WAIT_IDLE
RSPQ command: Wait for RDP to be idle.
Definition rspq_internal.h:123
@ RSPQ_CMD_SWAP_BUFFERS
RSPQ Command: Swap lowpri/highpri buffers.
Definition rspq_internal.h:99
@ RSPQ_CMD_RDP_SET_BUFFER
RSPQ Command: send a new buffer to RDP and/or configure it for new commands.
Definition rspq_internal.h:136
@ RSPQ_CMD_RDP_APPEND_BUFFER
RSPQ Command: send more data to RDP (appended to the end of the current buffer)
Definition rspq_internal.h:144
@ RSPQ_CMD_NOOP
RSPQ command: No-op.
Definition rspq_internal.h:32
@ RSPQ_CMD_WRITE_STATUS
RSPQ Command: write SP_STATUS register.
Definition rspq_internal.h:81
@ RSPQ_CMD_RET
RSPQ command: Return from a block.
Definition rspq_internal.h:61
uint32_t rspq_rdp_sentinel
Current RDP RDRAM end pointer (when rdp_current reaches this, the buffer is full)
Definition rspq_internal.h:206
uint32_t rspq_rdp_current
Current RDP RDRAM write pointer (normally DP_END)
Definition rspq_internal.h:205
uint32_t rspq_dram_highpri_addr
Address of the highpri queue (special slot in the pointer stack)
Definition rspq_internal.h:200
rspq_ovl_table_t rspq_ovl_table
Overlay table.
Definition rspq_internal.h:196
bool rspq_in_highpri(void)
True if we are currently in highpri mode.
Definition rspq.c:1086
uint32_t rspq_dram_lowpri_addr
Address of the lowpri queue (special slot in the pointer stack)
Definition rspq_internal.h:199
uint8_t rdp_syncfull_ongoing
True if a SYNC_FULL is currently ongoing.
Definition rspq_internal.h:209
rdpq_block_t * rdp_block
Option RDP static buffer (with RDP commands)
Definition rspq_internal.h:164
uint8_t rdp_target_bitdepth
Current RDP target buffer bitdepth.
Definition rspq_internal.h:208
volatile int __rspq_syncpoints_done[4]
ID of the last syncpoint reached by RSP (plus padding).
Definition rspq.c:345
rspq_rdp_mode_t rdp_mode
RDP current render mode definition.
Definition rspq_internal.h:202
void rspq_block_run_rsp(int nesting_level)
Notify that a RSP command is going to run a block.
Definition rspq.c:1193
uint32_t rspq_dram_addr
Current RDRAM address being processed.
Definition rspq_internal.h:212
uint32_t nesting_level
Nesting level of the block.
Definition rspq_internal.h:163
uint64_t rdp_scissor_rect
Current RDP scissor rectangle.
Definition rspq_internal.h:203
uint16_t current_ovl
Current overlay ID.
Definition rspq_internal.h:213
uint32_t rdp_fill_color
Current RDP fill color.
Definition rspq_internal.h:207
uint8_t padding
Padding.
Definition rspq_internal.h:211
rsp_queue_t * __rspq_get_state(void)
Return a pointer to a copy of the current RSPQ state.
Definition rspq.c:734
rsp_ucode_t * rspq_overlay_ucodes[RSPQ_MAX_OVERLAYS]
Registered overlays.
Definition rspq.c:280
uint8_t rdpq_debug
Debug mode flag.
Definition rspq_internal.h:210
RSP Queue data in DMEM.
Definition rspq_internal.h:195
A rspq block: pre-recorded array of commands.
Definition rspq_internal.h:162
Table of registered overlays (as stored in DMEM)
Definition rspq_internal.h:184
RDP render mode definition.
Definition rspq_internal.h:173
RSP ucode definition.
Definition rsp.h:282