| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.Enums.MemoryPropertyFlagBits
Synopsis
- type MemoryPropertyFlags = MemoryPropertyFlagBits
- newtype MemoryPropertyFlagBits where
- MemoryPropertyFlagBits Flags
- pattern MEMORY_PROPERTY_DEVICE_LOCAL_BIT :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_HOST_VISIBLE_BIT :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_HOST_COHERENT_BIT :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_HOST_CACHED_BIT :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD :: MemoryPropertyFlagBits
- pattern MEMORY_PROPERTY_PROTECTED_BIT :: MemoryPropertyFlagBits
Documentation
newtype MemoryPropertyFlagBits Source #
VkMemoryPropertyFlagBits - Bitmask specifying properties for a memory type
Description
MEMORY_PROPERTY_DEVICE_LOCAL_BITbit specifies that memory allocated with this type is the most efficient for device access. This property will be set if and only if the memory type belongs to a heap with theMEMORY_HEAP_DEVICE_LOCAL_BITset.
MEMORY_PROPERTY_HOST_VISIBLE_BITbit specifies that memory allocated with this type can be mapped for host access usingmapMemory.-
MEMORY_PROPERTY_HOST_COHERENT_BITbit specifies that the host cache management commandsflushMappedMemoryRangesandinvalidateMappedMemoryRangesare not needed to manage availability and visibility on the host. MEMORY_PROPERTY_HOST_CACHED_BITbit specifies that memory allocated with this type is cached on the host. Host memory accesses to uncached memory are slower than to cached memory, however uncached memory is always host coherent.MEMORY_PROPERTY_LAZILY_ALLOCATED_BITbit specifies that the memory type only allows device access to the memory. Memory types must not have bothMEMORY_PROPERTY_LAZILY_ALLOCATED_BITandMEMORY_PROPERTY_HOST_VISIBLE_BITset. Additionally, the object’s backing memory may be provided by the implementation lazily as specified in Lazily Allocated Memory.MEMORY_PROPERTY_PROTECTED_BITbit specifies that the memory type only allows device access to the memory, and allows protected queue operations to access the memory. Memory types must not haveMEMORY_PROPERTY_PROTECTED_BITset and any ofMEMORY_PROPERTY_HOST_VISIBLE_BITset, orMEMORY_PROPERTY_HOST_COHERENT_BITset, orMEMORY_PROPERTY_HOST_CACHED_BITset.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMDbit specifies that device accesses to allocations of this memory type are automatically made available and visible on the device. If paired withMEMORY_PROPERTY_HOST_COHERENT_BIT, memory domain operations are also performed automatically between host and device.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMDbit specifies that memory allocated with this type is not cached on the device. Uncached device memory is always device coherent.MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NVbit specifies that external devices can access this memory directly.
For any memory allocated with both the
MEMORY_PROPERTY_HOST_COHERENT_BIT and the
MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD, host or device accesses also
perform automatic memory domain transfer operations, such that writes
are always automatically available and visible to both host and device
memory domains.
Device coherence is a useful property for certain debugging use cases (e.g. crash analysis, where performing separate coherence actions could mean values are not reported correctly). However, device coherent accesses may be slower than equivalent accesses without device coherence, particularly if they are also device uncached. For device uncached memory in particular, repeated accesses to the same or neighboring memory locations over a short time period (e.g. within a frame) may be slower than it would be for the equivalent cached memory type. As such, it is generally inadvisable to use device coherent or device uncached memory except when really needed.
See Also
Constructors
| MemoryPropertyFlagBits Flags |
Bundled Patterns