anv: store heap address bounds when initializing physical device
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 11 Apr 2019 12:01:46 +0000 (13:01 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 11 Apr 2019 21:56:43 +0000 (22:56 +0100)
commit628c9ca9089789e0103a7de0cc479ff7a5ed0871
treeb3f3a1ea88babd655f54b721469991d225bbbf6d
parent316a98dec99ff1cfb848b0220141a47d52bcd24c
anv: store heap address bounds when initializing physical device

We can then reuse those bounds to initialize the VMA heaps at logical
device creation.

This fixes an issue on EHL which has only 36bits of VMA. We were
incorrectly using the fixed 48bits upper bound to initialize the
logical device heap, resulting in addresses beyong the device's
limits.

v2: Don't confuse heap size (limited by system memory) and VMA size
   (limited by number of addressing bits the platform has)

v3: Fix low heap vma_size :( (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: James Xiong <james.xiong@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v2)
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h