From 09547e1bcee7df3444dd8682770d1b31da1a5822 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 27 Aug 2010 16:08:55 +1000 Subject: r600g : add basic loop support. Adds BGNLOOP, BRK, CONT, ENDLOOP support, ported from r600c. 17 piglits more on r300g.tests. --- src/gallium/drivers/r600/r600_asm.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/r600/r600_asm.h') diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h index dbd885caf9..bb4f4b77b3 100644 --- a/src/gallium/drivers/r600/r600_asm.h +++ b/src/gallium/drivers/r600/r600_asm.h @@ -127,11 +127,23 @@ struct r600_bc_cf { #define FC_NONE 0 #define FC_IF 1 #define FC_LOOP 2 +#define FC_REP 3 +#define FC_PUSH_VPM 4 +#define FC_PUSH_WQM 5 struct r600_cf_stack_entry { int type; struct r600_bc_cf *start; - struct r600_bc_cf *mid; /* used to store the else point */ + struct r600_bc_cf **mid; /* used to store the else point */ + int num_mid; +}; + +#define SQ_MAX_CALL_DEPTH 0x00000020 +struct r600_cf_callstack { + unsigned fc_sp_before_entry; + int sub_desc_index; + int current; + int max; }; struct r600_bc { @@ -149,6 +161,9 @@ struct r600_bc { u32 fc_sp; struct r600_cf_stack_entry fc_stack[32]; + + unsigned call_sp; + struct r600_cf_callstack callstack[SQ_MAX_CALL_DEPTH]; }; int r600_bc_init(struct r600_bc *bc, enum radeon_family family); -- cgit v1.2.3