MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_buffer_device_address()

vk::DeviceAddress MayaFlux::Core::BackendResourceManager::get_buffer_device_address ( const std::shared_ptr< Buffers::VKBuffer > &  buffer) const

Query the Vulkan device address of an initialized BDA-capable buffer.

Parameters
bufferBuffer with Usage::UNIFORM_BDA or Usage::STORAGE_BDA
Returns
vk::DeviceAddress, or 0 if the buffer was not created with eShaderDeviceAddress

Definition at line 320 of file BackendResoureManager.cpp.

322{
323 if (!buffer || !buffer->is_initialized()) {
325 "get_buffer_device_address: buffer not initialized");
326 return 0;
327 }
328
329 vk::BufferDeviceAddressInfo info {};
330 info.buffer = buffer->get_buffer();
331 // return static_cast<uint64_t>(m_context.get_device().getBufferAddress(info));
332 return m_context.get_device().getBufferAddress(info);
333}
#define MF_ERROR(comp, ctx,...)
vk::Device get_device() const
Get logical device.
Definition VKContext.hpp:49
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Core::VKContext::get_device(), MayaFlux::Journal::GraphicsBackend, m_context, and MF_ERROR.

Referenced by setup_backend_service().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: