i965/fs: Reorder fs_reg for better packing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Matt Turner
2014-02-19 18:53:00 -08:00
parent 5ceadd29b0
commit 0fc1a77e14

View File

@@ -85,9 +85,13 @@ public:
bool is_contiguous() const; bool is_contiguous() const;
fs_reg &apply_stride(unsigned stride); fs_reg &apply_stride(unsigned stride);
/** Smear a channel of the reg to all channels. */
fs_reg &set_smear(unsigned subreg);
/** Register file: GRF, MRF, IMM. */ /** Register file: GRF, MRF, IMM. */
enum register_file file; enum register_file file;
/** Register type. BRW_REGISTER_TYPE_* */
enum brw_reg_type type;
/** /**
* Register number. For MRF, it's the hardware register. For * Register number. For MRF, it's the hardware register. For
* GRF, it's a virtual register number until register allocation * GRF, it's a virtual register number until register allocation
@@ -101,14 +105,11 @@ public:
* For uniforms, this is in units of 1 float. * For uniforms, this is in units of 1 float.
*/ */
int reg_offset; int reg_offset;
/** Register type. BRW_REGISTER_TYPE_* */ /**
enum brw_reg_type type; * Offset in bytes from the start of the register. Values up to a
bool negate; * backend_reg::reg_offset unit are valid.
bool abs; */
struct brw_reg fixed_hw_reg; int subreg_offset;
/** Smear a channel of the reg to all channels. */
fs_reg &set_smear(unsigned subreg);
/** Value for file == IMM */ /** Value for file == IMM */
union { union {
@@ -117,16 +118,15 @@ public:
float f; float f;
} imm; } imm;
/** struct brw_reg fixed_hw_reg;
* Offset in bytes from the start of the register. Values up to a
* backend_reg::reg_offset unit are valid. fs_reg *reladdr;
*/
int subreg_offset; bool negate;
bool abs;
/** Register region horizontal stride */ /** Register region horizontal stride */
uint8_t stride; uint8_t stride;
fs_reg *reladdr;
}; };
static inline fs_reg static inline fs_reg