VKDevice
The VKDevice class extends the Device class to provide Vulkan-specific functionality for managing a rendering device. It offers methods for buffer access control, texture layout management, and synchronization through fences and semaphores. The class supports querying memory types and obtaining the appropriate memory index for specific flags, allowing for fine-tuned memory management in Vulkan applications.
#include <platform/TellusimDevice.h>
Inheritance
- Inherits from Device
Constructors
VKDevice()
explicit VKDevice(Context &context)
explicit VKDevice(Surface &surface)
explicit VKDevice(Window &window)
Methods
Buffer access.
void setBufferAccess(Buffer &buffer, uint32_t access)
Texture layout.
void setTextureLayout(Texture &texture, uint32_t layout)
Fence synchronization.
bool waitVKFence(void *fence, uint64_t timeout, bool reset) const
bool signalVKFence(void *fence) const
Semaphore synchronization.
void waitSemaphore(void *semaphore, uint32_t mask) const
void signalSemaphore(void *semaphore) const
Memory types.
bool hasMemoryType(uint32_t flags) const
uint32_t getMemoryIndex(uint32_t types, uint32_t flags) const
Command context.
VkInstance getInstance() const
VkPhysicalDevice getAdapter() const
VkDevice getVKDevice() const
VkQueue getQueue() const
VkCommandBuffer getCommand() const
uint32_t getFamily() const