pan/mdg: eliminate references to ins->load_store.op
[mesa.git] / src / panfrost / midgard / compiler.h
index 8d7af77a324671bc9253d153071036adb620166e..134d1ed6d2c92530cca498cc3493acc28d58a3ce 100644 (file)
@@ -178,6 +178,12 @@ typedef struct midgard_instruction {
         /* Use this in conjunction with `type` */
         unsigned op;
 
+        /* This refers to midgard_outmod_float or midgard_outmod_int.
+         * In case of a ALU op, use midgard_is_integer_out_op() to know which
+         * one is used.
+         * If it's a texture op, it's always midgard_outmod_float. */
+        unsigned outmod;
+
         union {
                 midgard_load_store_word load_store;
                 midgard_vector_alu alu;
@@ -556,9 +562,7 @@ v_mov(unsigned src, unsigned dest)
                 .dest = dest,
                 .dest_type = nir_type_uint32,
                 .op = midgard_alu_op_imov,
-                .alu = {
-                        .outmod = midgard_outmod_int_wrap
-                },
+                .outmod = midgard_outmod_int_wrap
         };
 
         return ins;
@@ -591,9 +595,8 @@ v_load_store_scratch(
                 .dest = ~0,
                 .src = { ~0, ~0, ~0, ~0 },
                 .swizzle = SWIZZLE_IDENTITY_4,
+                .op = is_store ? midgard_op_st_int4 : midgard_op_ld_int4,
                 .load_store = {
-                        .op = is_store ? midgard_op_st_int4 : midgard_op_ld_int4,
-
                         /* For register spilling - to thread local storage */
                         .arg_1 = 0xEA,
                         .arg_2 = 0x1E,