diff options
author | Jason Ekstrand <[email protected]> | 2017-03-17 17:31:44 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-04-04 18:33:52 -0700 |
commit | 651ec926fc10258ddc567da44c231d5303b8740f (patch) | |
tree | b2a09499f3c7ba382d3c38f2804aef38bc1edcc8 /src/intel/vulkan/anv_private.h | |
parent | 439da38d184b5e9dddcfb245a2454879e7632649 (diff) |
anv: Add support for 48-bit addresses
This commit adds support for using the full 48-bit address space on
Broadwell and newer hardware. Thanks to certain limitations, not all
objects can be placed above the 32-bit boundary. In particular, general
and state base address need to live within 32 bits. (See also
Wa32bitGeneralStateOffset and Wa32bitInstructionBaseOffset.) In order
to handle this, we add a supports_48bit_address field to anv_bo and only
set EXEC_OBJECT_SUPPORTS_48B_ADDRESS if that bit is set. We set the bit
for all client-allocated memory objects but leave it false for
driver-allocated objects. While this is more conservative than needed,
all driver allocations should easily fit in the first 32 bits of address
space and keeps things simple because we don't have to think about
whether or not any given one of our allocation data structures will be
used in a 48-bit-unsafe way.
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index ee0f79b6ddd..03381999152 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -517,6 +517,7 @@ struct anv_physical_device { const char * name; struct gen_device_info info; uint64_t aperture_size; + bool supports_48bit_addresses; struct brw_compiler * compiler; struct isl_device isl_dev; int cmd_parser_version; @@ -654,6 +655,7 @@ int anv_gem_destroy_context(struct anv_device *device, int context); int anv_gem_get_param(int fd, uint32_t param); bool anv_gem_get_bit6_swizzle(int fd, uint32_t tiling); int anv_gem_get_aperture(int fd, uint64_t *size); +bool anv_gem_supports_48b_addresses(int fd); int anv_gem_gpu_get_reset_stats(struct anv_device *device, uint32_t *active, uint32_t *pending); int anv_gem_handle_to_fd(struct anv_device *device, uint32_t gem_handle); |