freedreno/ir3: don't DCE ij_pix if used for pre-fs-texture-fetch
[mesa.git] / src / freedreno / ir3 / ir3.h
index b595202cbda7f33750a73faeb63eabc29e0b2f1f..8b8788a8a97571a84fcc32177423b2e977d40e64 100644 (file)
@@ -267,6 +267,13 @@ struct ir3_instruction {
                struct {
                        int off;              /* component/offset */
                } fo;
+               struct {
+                       /* for sysvals, identifies the sysval type.  Mostly so we can
+                        * identify the special cases where a sysval should not be DCE'd
+                        * (currently, just pre-fs texture fetch)
+                        */
+                       gl_system_value sysval;
+               } input;
        };
 
        /* transient values used during various algorithms: */
@@ -1055,13 +1062,13 @@ void ir3_print(struct ir3 *ir);
 void ir3_print_instr(struct ir3_instruction *instr);
 
 /* depth calculation: */
+struct ir3_shader_variant;
 int ir3_delayslots(struct ir3_instruction *assigner,
                struct ir3_instruction *consumer, unsigned n);
 void ir3_insert_by_depth(struct ir3_instruction *instr, struct list_head *list);
-void ir3_depth(struct ir3 *ir);
+void ir3_depth(struct ir3 *ir, struct ir3_shader_variant *so);
 
 /* copy-propagate: */
-struct ir3_shader_variant;
 void ir3_cp(struct ir3 *ir, struct ir3_shader_variant *so);
 
 /* group neighbors and insert mov's to resolve conflicts: */