On Thursday, May 31, 2018 8:46:25 AM PDT Jason Ekstrand wrote: > --- > src/intel/common/gen_gem.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > 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 > + */
/** * This returns a 48-bit address with the high 16 bits zeroed. * * It's 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; return v & ((1ull << 48) - 1); > +} > + > #endif /* GEN_GEM_H */ > Also type in title, s/cannon/canon/ With those changes, Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev