Jason Ekstrand <ja...@jlekstrand.net> writes: > --- > src/intel/common/gen_gem.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> > > diff --git a/src/intel/common/gen_gem.h b/src/intel/common/gen_gem.h > index 842a455..eef6a5e 100644 > --- a/src/intel/common/gen_gem.h > +++ b/src/intel/common/gen_gem.h > @@ -40,4 +40,14 @@ gen_canonical_address(uint64_t v) > return (int64_t)(v << shift) >> shift; > } > > +/** > + * This is the opposite of gen_canonicalize_address > + */ > +static inline uint64_t > +gen_48b_address(uint64_t v) > +{ > + const int shift = 63 - 47; > + return (uint64_t)(v << shift) >> shift;
The cast from uint64_t to uint64_t seems like a bit of unnecessary distraction, but it's like the other one so either way: Reviewed-by: Scott D Phillips <scott.d.phill...@intel.com> > +} > + > #endif /* GEN_GEM_H */ _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev