diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-01-24 02:06:27 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-02-06 22:37:38 +0100 |
commit | 13ab63bb62b6c47172de06b5d72ae43babd892df (patch) | |
tree | b731ce36c10c887735c6706a2747a843b83261db /src/amd/vulkan/radv_device.c | |
parent | 3259e7b036f1708626e6036f6eb5e3f81260d7f8 (diff) |
radv: Implement VK_EXT_buffer_device_address.
v2: Also update the release notes.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 5202d83a418..0fef92773e1 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -869,6 +869,14 @@ void radv_GetPhysicalDeviceFeatures2( features->memoryPriority = VK_TRUE; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT: { + VkPhysicalDeviceBufferAddressFeaturesEXT *features = + (VkPhysicalDeviceBufferAddressFeaturesEXT *)ext; + features->bufferDeviceAddress = true; + features->bufferDeviceAddressCaptureReplay = false; + features->bufferDeviceAddressMultiDevice = false; + break; + } default: break; } @@ -1694,7 +1702,8 @@ VkResult radv_CreateDevice( * from the descriptor set anymore, so we have to use a global BO list. */ device->use_global_bo_list = - device->enabled_extensions.EXT_descriptor_indexing; + device->enabled_extensions.EXT_descriptor_indexing || + device->enabled_extensions.EXT_buffer_device_address; mtx_init(&device->shader_slab_mutex, mtx_plain); list_inithead(&device->shader_slabs); @@ -4032,6 +4041,15 @@ void radv_DestroyBuffer( vk_free2(&device->alloc, pAllocator, buffer); } +VkDeviceAddress radv_GetBufferDeviceAddressEXT( + VkDevice device, + const VkBufferDeviceAddressInfoEXT* pInfo) +{ + RADV_FROM_HANDLE(radv_buffer, buffer, pInfo->buffer); + return radv_buffer_get_va(buffer->bo) + buffer->offset; +} + + static inline unsigned si_tile_mode_index(const struct radv_image *image, unsigned level, bool stencil) { |