summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_inst.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_inst.h b/src/mesa/drivers/dri/i965/brw_inst.h
index 7a8c210118c..51082dc77a5 100644
--- a/src/mesa/drivers/dri/i965/brw_inst.h
+++ b/src/mesa/drivers/dri/i965/brw_inst.h
@@ -683,9 +683,9 @@ brw_inst_bits(const brw_inst *inst, unsigned high, unsigned low)
high %= 64;
low %= 64;
- const uint64_t mask = (((1ull << (high - low + 1)) - 1) << low);
+ const uint64_t mask = (1ull << (high - low + 1)) - 1;
- return (inst->data[word] & mask) >> low;
+ return (inst->data[word] >> low) & mask;
}
/**
@@ -731,9 +731,9 @@ typedef struct {
static inline unsigned
brw_compact_inst_bits(brw_compact_inst *inst, unsigned high, unsigned low)
{
- const uint64_t mask = (((1ull << (high - low + 1)) - 1) << low);
+ const uint64_t mask = (1ull << (high - low + 1)) - 1;
- return (inst->data & mask) >> low;
+ return (inst->data >> low) & mask;
}
/**