diff options
author | Matt Turner <[email protected]> | 2015-03-28 11:01:29 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-03-31 14:14:36 -0700 |
commit | 438c1c0080a00b073706a8708c5fd79dc42a7a15 (patch) | |
tree | 8a3a1b5c9085aecccc147c175b2381390768a18a /src | |
parent | ac6102bcc5dc85bf5bd1e25e0d94a91441673681 (diff) |
i965: Mark brw_inst_bits' brw_inst* parameter const.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_inst.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_inst.h b/src/mesa/drivers/dri/i965/brw_inst.h index 372aa2b89b2..d067b72896c 100644 --- a/src/mesa/drivers/dri/i965/brw_inst.h +++ b/src/mesa/drivers/dri/i965/brw_inst.h @@ -44,7 +44,7 @@ typedef struct brw_inst { uint64_t data[2]; } brw_inst; -static inline uint64_t brw_inst_bits(brw_inst *inst, +static inline uint64_t brw_inst_bits(const brw_inst *inst, unsigned high, unsigned low); static inline void brw_inst_set_bits(brw_inst *inst, unsigned high, unsigned low, @@ -61,7 +61,7 @@ brw_inst_set_##name(const struct brw_context *brw, \ } \ static inline uint64_t \ brw_inst_##name(const struct brw_context *brw, \ - brw_inst *inst) \ + const brw_inst *inst) \ { \ assert(assertions); \ (void) brw; \ @@ -101,7 +101,7 @@ brw_inst_set_##name(const struct brw_context *brw, \ brw_inst_set_bits(inst, high, low, value); \ } \ static inline uint64_t \ -brw_inst_##name(const struct brw_context *brw, brw_inst *inst) \ +brw_inst_##name(const struct brw_context *brw, const brw_inst *inst) \ { \ BOUNDS(hi4, lo4, hi45, lo45, hi5, lo5, hi6, lo6, hi7, lo7, hi8, lo8) \ return brw_inst_bits(inst, high, low); \ @@ -262,7 +262,7 @@ brw_inst_set_uip(const struct brw_context *brw, } static inline int32_t -brw_inst_uip(const struct brw_context *brw, brw_inst *inst) +brw_inst_uip(const struct brw_context *brw, const brw_inst *inst) { assert(brw->gen >= 6); @@ -289,7 +289,7 @@ brw_inst_set_jip(const struct brw_context *brw, } static inline int32_t -brw_inst_jip(const struct brw_context *brw, brw_inst *inst) +brw_inst_jip(const struct brw_context *brw, const brw_inst *inst) { assert(brw->gen >= 6); @@ -310,7 +310,7 @@ brw_inst_set_##name(const struct brw_context *brw, brw_inst *inst, int16_t v) \ brw_inst_set_bits(inst, high, low, (uint16_t) v); \ } \ static inline int16_t \ -brw_inst_##name(const struct brw_context *brw, brw_inst *inst) \ +brw_inst_##name(const struct brw_context *brw, const brw_inst *inst) \ { \ assert(assertions); \ (void) brw; \ @@ -544,21 +544,21 @@ F(pi_message_data, MD(7), MD(0)) * @{ */ static inline int -brw_inst_imm_d(const struct brw_context *brw, brw_inst *insn) +brw_inst_imm_d(const struct brw_context *brw, const brw_inst *insn) { (void) brw; return brw_inst_bits(insn, 127, 96); } static inline unsigned -brw_inst_imm_ud(const struct brw_context *brw, brw_inst *insn) +brw_inst_imm_ud(const struct brw_context *brw, const brw_inst *insn) { (void) brw; return brw_inst_bits(insn, 127, 96); } static inline float -brw_inst_imm_f(const struct brw_context *brw, brw_inst *insn) +brw_inst_imm_f(const struct brw_context *brw, const brw_inst *insn) { fi_type ft; (void) brw; @@ -611,7 +611,7 @@ brw_inst_set_##reg##_ia1_addr_imm(const struct brw_context *brw, \ } \ static inline unsigned \ brw_inst_##reg##_ia1_addr_imm(const struct brw_context *brw, \ - brw_inst *inst) \ + const brw_inst *inst) \ { \ if (brw->gen >= 8) { \ return brw_inst_bits(inst, g8_high, g8_low) | \ @@ -642,7 +642,7 @@ brw_inst_set_##reg##_ia16_addr_imm(const struct brw_context *brw, \ } \ static inline unsigned \ brw_inst_##reg##_ia16_addr_imm(const struct brw_context *brw, \ - brw_inst *inst) \ + const brw_inst *inst) \ { \ if (brw->gen >= 8) { \ return brw_inst_bits(inst, g8_high, g8_low) | \ @@ -666,7 +666,7 @@ BRW_IA16_ADDR_IMM(dst, 57, 52, 47, 56, 52) * Bits indices range from 0..127; fields may not cross 64-bit boundaries. */ static inline uint64_t -brw_inst_bits(brw_inst *inst, unsigned high, unsigned low) +brw_inst_bits(const brw_inst *inst, unsigned high, unsigned low) { /* We assume the field doesn't cross 64-bit boundaries. */ const unsigned word = high / 64; |