OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
943fecc
)
intel/common: Add an address de-canonicalization helper
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Thu, 31 May 2018 03:00:37 +0000
(20:00 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Thu, 31 May 2018 23:51:45 +0000
(16:51 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
src/intel/common/gen_gem.h
patch
|
blob
|
history
diff --git
a/src/intel/common/gen_gem.h
b/src/intel/common/gen_gem.h
index
842a455
..
7dd9ae6
100644
(file)
--- a/
src/intel/common/gen_gem.h
+++ b/
src/intel/common/gen_gem.h
@@
-40,4
+40,16
@@
gen_canonical_address(uint64_t v)
return (int64_t)(v << shift) >> shift;
}
+/**
+ * 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;
+}
+
#endif /* GEN_GEM_H */