intel/compiler: Get rid of the global compaction table pointers
[mesa.git] / src / intel / compiler / brw_eu.h
index 1d509eb026ceef1e228570f615f76c27fb692106..c4b44f3ced34fb5e99084c7ce6eac28ce4ed0f2c 100644 (file)
@@ -137,6 +137,12 @@ struct brw_codegen {
    int loop_stack_array_size;
 };
 
+struct brw_label {
+   int offset;
+   int number;
+   struct brw_label *next;
+};
+
 void brw_pop_insn_state( struct brw_codegen *p );
 void brw_push_insn_state( struct brw_codegen *p );
 unsigned brw_get_default_exec_size(struct brw_codegen *p);
@@ -162,10 +168,21 @@ void brw_set_default_swsb(struct brw_codegen *p, struct tgl_swsb value);
 
 void brw_init_codegen(const struct gen_device_info *, struct brw_codegen *p,
                      void *mem_ctx);
+bool brw_has_jip(const struct gen_device_info *devinfo, enum opcode opcode);
+bool brw_has_uip(const struct gen_device_info *devinfo, enum opcode opcode);
+const struct brw_label *brw_find_label(const struct brw_label *root, int offset);
+void brw_create_label(struct brw_label **labels, int offset, void *mem_ctx);
 int brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
-                         const struct brw_inst *inst, bool is_compacted);
+                         const struct brw_inst *inst, bool is_compacted,
+                         int offset, const struct brw_label *root_label);
+const struct brw_label *brw_label_assembly(const struct gen_device_info *devinfo,
+                                           const void *assembly, int start, int end,
+                                           void *mem_ctx);
+void brw_disassemble_with_labels(const struct gen_device_info *devinfo,
+                                 const void *assembly, int start, int end, FILE *out);
 void brw_disassemble(const struct gen_device_info *devinfo,
-                     const void *assembly, int start, int end, FILE *out);
+                     const void *assembly, int start, int end,
+                     const struct brw_label *root_label, FILE *out);
 const unsigned *brw_get_program( struct brw_codegen *p, unsigned *sz );
 
 bool brw_try_override_assembly(struct brw_codegen *p, int start_offset,
@@ -220,6 +237,7 @@ ALU2(MUL)
 ALU1(FRC)
 ALU1(RNDD)
 ALU1(RNDE)
+ALU1(RNDU)
 ALU1(RNDZ)
 ALU2(MAC)
 ALU2(MACH)
@@ -333,6 +351,14 @@ brw_urb_desc(const struct gen_device_info *devinfo,
    }
 }
 
+static inline uint32_t
+brw_urb_desc_msg_type(ASSERTED const struct gen_device_info *devinfo,
+                      uint32_t desc)
+{
+   assert(devinfo->gen >= 7);
+   return GET_BITS(desc, 3, 0);
+}
+
 /**
  * Construct a message descriptor immediate with the specified sampler
  * function controls.
@@ -1253,7 +1279,6 @@ enum brw_conditional_mod brw_negate_cmod(enum brw_conditional_mod cmod);
 enum brw_conditional_mod brw_swap_cmod(enum brw_conditional_mod cmod);
 
 /* brw_eu_compact.c */
-void brw_init_compaction_tables(const struct gen_device_info *devinfo);
 void brw_compact_instructions(struct brw_codegen *p, int start_offset,
                               struct disasm_info *disasm);
 void brw_uncompact_instruction(const struct gen_device_info *devinfo,