summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_asm.h
diff options
context:
space:
mode:
authorVadim Girlin <vadimgirlin@gmail.com>2013-04-02 19:33:40 +0400
committerVadim Girlin <vadimgirlin@gmail.com>2013-04-02 19:34:14 +0400
commit9be624b3ef32ae6311010cf05531e12051b647dc (patch)
treec4a771f66690477f9e0c794acd831383e3b5233d /src/gallium/drivers/r600/r600_asm.h
parent7e04227f3967fd4c4dd7a088cb42197d916925a5 (diff)
r600g: don't reserve more stack space than required v5
Reduced stack size allows to run more threads in some cases, improving performance for the shaders that use stack (that is, for the shaders with control flow instructions). E.g. with unigine-based apps. v4: implement exact computation taking into account wavefront size v5: add cases for RV620, RS880 Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Diffstat (limited to 'src/gallium/drivers/r600/r600_asm.h')
-rw-r--r--src/gallium/drivers/r600/r600_asm.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h
index c1aa3bae4e3..c052ceabfc7 100644
--- a/src/gallium/drivers/r600/r600_asm.h
+++ b/src/gallium/drivers/r600/r600_asm.h
@@ -173,16 +173,25 @@ struct r600_cf_stack_entry {
};
#define SQ_MAX_CALL_DEPTH 0x00000020
-struct r600_cf_callstack {
- unsigned fc_sp_before_entry;
- int sub_desc_index;
- int current;
- int max;
-};
#define AR_HANDLE_NORMAL 0
#define AR_HANDLE_RV6XX 1 /* except RV670 */
+struct r600_stack_info {
+ /* current level of non-WQM PUSH operations
+ * (PUSH, PUSH_ELSE, ALU_PUSH_BEFORE) */
+ int push;
+ /* current level of WQM PUSH operations
+ * (PUSH, PUSH_ELSE, PUSH_WQM) */
+ int push_wqm;
+ /* current loop level */
+ int loop;
+
+ /* required depth */
+ int max_entries;
+ /* subentries per entry */
+ int entry_size;
+};
struct r600_bytecode {
enum chip_class chip_class;
@@ -199,8 +208,7 @@ struct r600_bytecode {
uint32_t *bytecode;
uint32_t fc_sp;
struct r600_cf_stack_entry fc_stack[32];
- unsigned call_sp;
- struct r600_cf_callstack callstack[SQ_MAX_CALL_DEPTH];
+ struct r600_stack_info stack;
unsigned ar_loaded;
unsigned ar_reg;
unsigned ar_chan;