diff options
author | Jason Ekstrand <[email protected]> | 2018-05-29 14:37:35 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-04 14:03:03 -0700 |
commit | 6a9525bf6729a8d2bb9c6a7b10ebdc9925c55463 (patch) | |
tree | 6cfc2dc22432553411c09a4662ed6a9f2d074b3a /src/intel/compiler/brw_eu.h | |
parent | db9675f5a4c68e39bb777eb7003f01854fd235dc (diff) |
intel/eu: Switch to a logical state stack
Instead of the state stack that's based on copying a dummy instruction
around, we start using a logical stack of brw_insn_states. This uses a
bit less memory and is way less conceptually bogus.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_eu.h')
-rw-r--r-- | src/intel/compiler/brw_eu.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index d709d12b671..0f07eeb3d6d 100644 --- a/src/intel/compiler/brw_eu.h +++ b/src/intel/compiler/brw_eu.h @@ -46,6 +46,36 @@ extern "C" { #define BRW_EU_MAX_INSN_STACK 5 +struct brw_insn_state { + /* One of BRW_EXECUTE_* */ + unsigned exec_size:3; + + /* Group in units of channels */ + unsigned group:5; + + /* Compression control on gen4-5 */ + bool compressed:1; + + /* One of BRW_MASK_* */ + unsigned mask_control:1; + + bool saturate:1; + + /* One of BRW_ALIGN_* */ + unsigned access_mode:1; + + /* One of BRW_PREDICATE_* */ + enum brw_predicate predicate:4; + + bool pred_inv:1; + + /* Flag subreg. Bottom bit is subreg, top bit is reg */ + unsigned flag_subreg:2; + + bool acc_wr_control:1; +}; + + /* A helper for accessing the last instruction emitted. This makes it easy * to set various bits on an instruction without having to create temporary * variable and assign the emitted instruction to those. @@ -62,8 +92,8 @@ struct brw_codegen { /* Allow clients to push/pop instruction state: */ - brw_inst stack[BRW_EU_MAX_INSN_STACK]; - brw_inst *current; + struct brw_insn_state stack[BRW_EU_MAX_INSN_STACK]; + struct brw_insn_state *current; /** Whether or not the user wants automatic exec sizes * |