mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Make sure to set correct buffer device address flag on memory for KHR
This commit is contained in:
@@ -217,6 +217,15 @@ void GPUBuffer::Create(WrappedVulkan *driver, VkDevice dev, VkDeviceSize size, u
|
||||
else
|
||||
allocInfo.memoryTypeIndex = driver->GetUploadMemoryIndex(mrq.memoryTypeBits);
|
||||
|
||||
bool useBufferAddressKHR = driver->GetExtensions(NULL).ext_KHR_buffer_device_address;
|
||||
|
||||
VkMemoryAllocateFlagsInfo memFlags = {VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO};
|
||||
if(useBufferAddressKHR && (flags & eGPUBufferAddressable))
|
||||
{
|
||||
allocInfo.pNext = &memFlags;
|
||||
memFlags.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT;
|
||||
}
|
||||
|
||||
vkr = driver->vkAllocateMemory(dev, &allocInfo, NULL, &mem);
|
||||
RDCASSERTEQUAL(vkr, VK_SUCCESS);
|
||||
|
||||
|
||||
@@ -386,11 +386,6 @@ private:
|
||||
|
||||
InstanceDeviceInfo m_EnabledExtensions;
|
||||
|
||||
const InstanceDeviceInfo &GetExtensions(VkResourceRecord *record) const
|
||||
{
|
||||
return record ? *record->instDevInfo : m_EnabledExtensions;
|
||||
}
|
||||
|
||||
// the instance corresponding to this WrappedVulkan
|
||||
VkInstance m_Instance;
|
||||
// the instance's dbg msg callback handle
|
||||
@@ -936,6 +931,11 @@ public:
|
||||
|
||||
APIProperties APIProps;
|
||||
|
||||
const InstanceDeviceInfo &GetExtensions(VkResourceRecord *record) const
|
||||
{
|
||||
return record ? *record->instDevInfo : m_EnabledExtensions;
|
||||
}
|
||||
|
||||
static rdcstr GetChunkName(uint32_t idx);
|
||||
VulkanResourceManager *GetResourceManager() { return m_ResourceManager; }
|
||||
VulkanDebugManager *GetDebugManager() { return m_DebugManager; }
|
||||
|
||||
Reference in New Issue
Block a user