Device

Handle to a logical device

interface Device : IAtomicRefCounted {}

Members

Functions

allocateMemory
DeviceMemory allocateMemory(uint memPropIndex, size_t size)
Undocumented in source.
createBuffer
Buffer createBuffer(BufferUsage usage, size_t size)
Undocumented in source.
createCommandPool
CommandPool createCommandPool(uint queueFamilyIndex)
Undocumented in source.
createDescriptorPool
DescriptorPool createDescriptorPool(uint maxSets, DescriptorPoolSize[] sizes)
Undocumented in source.
createDescriptorSetLayout
DescriptorSetLayout createDescriptorSetLayout(PipelineLayoutBinding[] bindings)
Undocumented in source.
createFence
Fence createFence(Flag!"signaled" signaled)
Undocumented in source.
createFramebuffer
Framebuffer createFramebuffer(RenderPass rp, ImageView[] attachments, uint width, uint height, uint layers)
Undocumented in source.
createImage
Image createImage(ImageInfo info)
Undocumented in source.
createPipelineLayout
PipelineLayout createPipelineLayout(DescriptorSetLayout[] layouts, PushConstantRange[] ranges)
Undocumented in source.
createPipelines
Pipeline[] createPipelines(PipelineInfo[] infos)
Undocumented in source.
createRenderPass
RenderPass createRenderPass(AttachmentDescription[] attachments, SubpassDescription[] subpasses, SubpassDependency[] dependencies)
Undocumented in source.
createSampler
Sampler createSampler(SamplerInfo info)
Undocumented in source.
createSemaphore
Semaphore createSemaphore()
Undocumented in source.
createShaderModule
ShaderModule createShaderModule(const(uint)[] spirV, string entryPoint)
Undocumented in source.
createSwapchain
Swapchain createSwapchain(Surface surface, PresentMode pm, uint numImages, Format format, uint[2] size, ImageUsage usage, CompositeAlpha alpha, Swapchain former)
Undocumented in source.
flushMappedMemory
void flushMappedMemory(MappedMemorySet set)
Undocumented in source.
getQueue
Queue getQueue(uint queueFamilyIndex, uint queueIndex)
Undocumented in source.
invalidateMappedMemory
void invalidateMappedMemory(MappedMemorySet set)
Undocumented in source.
resetFences
void resetFences(Fence[] fences)
Undocumented in source.
updateDescriptorSets
void updateDescriptorSets(WriteDescriptorSet[] writeOps, CopyDescritporSet[] copyOps)
Undocumented in source.
waitForFences
void waitForFences(Fence[] fences, Flag!"waitAll" waitAll, Duration timeout)
Undocumented in source.
waitIdle
void waitIdle()

Wait that device finishes all operations in progress

Properties

instance
Instance instance [@property getter]
Undocumented in source.
physicalDevice
PhysicalDevice physicalDevice [@property getter]
Undocumented in source.

Inherited Members

From IAtomicRefCounted

refCount
size_t refCount [@property getter]
refCountShared
size_t refCountShared [@property getter]

Atomically loads the number of active references.

retain
void retain()
retainShared
void retainShared()

Atomically increment the reference count.

release
bool release(Flag!"disposeOnZero" disposeOnZero)
releaseShared
bool releaseShared(Flag!"disposeOnZero" disposeOnZero)

Atomically decrement the reference count. If refCount reaches zero, and disposeOnZero is set, the object is locked with its own mutex, and dispose is called. In most cases, the calling code should set disposeOnZero, unless it is intended to release the object to give it away. (such as at the end of a builder function)

rcLock
bool rcLock()
rcLockShared
bool rcLockShared()

Returns whether the refCount >= 1. This increases the refCount by 1. rcLock should be used to keep weak reference and ensures that the resource is not disposed. The operation is atomic.

dispose
void dispose()

Dispose the underlying resource

Meta