mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
anv: Optimize anv_address_physical when ANV_ALWAYS_SOFTPIN
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11236>
This commit is contained in:
parent
921bd2d1c7
commit
c7e1488037
1 changed files with 5 additions and 2 deletions
|
|
@ -1643,10 +1643,13 @@ anv_address_is_null(struct anv_address addr)
|
|||
static inline uint64_t
|
||||
anv_address_physical(struct anv_address addr)
|
||||
{
|
||||
if (addr.bo && (addr.bo->flags & EXEC_OBJECT_PINNED))
|
||||
if (addr.bo && (ANV_ALWAYS_SOFTPIN ||
|
||||
(addr.bo->flags & EXEC_OBJECT_PINNED))) {
|
||||
assert(addr.bo->flags & EXEC_OBJECT_PINNED);
|
||||
return intel_canonical_address(addr.bo->offset + addr.offset);
|
||||
else
|
||||
} else {
|
||||
return intel_canonical_address(addr.offset);
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct anv_address
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue