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 <kenneth@whitecape.org>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user