nir: Move nir_def directly after nir_instr

This way, all instruction types have the nir_def at the same offset.

Acked-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
This commit is contained in:
Konstantin Seurer 2025-11-07 14:30:52 +01:00 committed by Marge Bot
parent 013a6bfc70
commit e231aec0c9

View file

@ -1540,6 +1540,9 @@ typedef struct nir_alu_instr {
/** Base instruction */
nir_instr instr;
/** Destination */
nir_def def;
/** Opcode */
nir_op op;
@ -1573,9 +1576,6 @@ typedef struct nir_alu_instr {
*/
uint32_t fp_fast_math : 9;
/** Destination */
nir_def def;
/** Sources
*
* The size of the array is given by :c:member:`nir_op_info.num_inputs`.
@ -1656,6 +1656,9 @@ typedef enum {
typedef struct nir_deref_instr {
nir_instr instr;
/** Destination to store the resulting "pointer" */
nir_def def;
/** The type of this deref instruction */
nir_deref_type deref_type;
@ -1698,9 +1701,6 @@ typedef struct nir_deref_instr {
unsigned align_offset;
} cast;
};
/** Destination to store the resulting "pointer" */
nir_def def;
} nir_deref_instr;
/**
@ -1893,10 +1893,10 @@ typedef struct nir_call_instr {
typedef struct nir_intrinsic_instr {
nir_instr instr;
nir_intrinsic_op intrinsic;
nir_def def;
nir_intrinsic_op intrinsic;
/** number of components if this is a vectorized intrinsic
*
* Similarly to ALU operations, some intrinsics are vectorized.
@ -2405,6 +2405,9 @@ typedef struct nir_tex_instr {
/** Base instruction */
nir_instr instr;
/** Destination */
nir_def def;
/** Dimensionality of the texture operation
*
* This will typically match the dimensionality of the texture deref type
@ -2429,9 +2432,6 @@ typedef struct nir_tex_instr {
/** Texture opcode */
nir_texop op;
/** Destination */
nir_def def;
/** Array of sources
*
* This array has :c:member:`nir_tex_instr.num_srcs` elements
@ -2761,10 +2761,10 @@ typedef struct nir_phi_src {
typedef struct nir_phi_instr {
nir_instr instr;
nir_def def;
/** list of nir_phi_src */
struct exec_list srcs;
nir_def def;
} nir_phi_instr;
static inline nir_phi_src *