Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::DeviceMemoryDesc Struct Reference

Device memory description. More...

#include <DeviceMemory.h>

Inheritance diagram for Diligent::DeviceMemoryDesc:
Diligent::DeviceObjectAttribs

Public Attributes

DEVICE_MEMORY_TYPE Type = DEVICE_MEMORY_TYPE_UNDEFINED
 Memory type, see Diligent::DEVICE_MEMORY_TYPE.
 
Uint64 PageSize = 0
 Size of the memory page, in bytes.
 
Uint64 ImmediateContextMask = 1
 Defines which immediate contexts are allowed to execute commands that use this device memory.
 
- Public Attributes inherited from Diligent::DeviceObjectAttribs
const Char * Name = nullptr
 Object name.
 

Detailed Description

Device memory description.

Member Data Documentation

◆ ImmediateContextMask

Uint64 Diligent::DeviceMemoryDesc::ImmediateContextMask = 1

Defines which immediate contexts are allowed to execute commands that use this device memory.

When ImmediateContextMask contains a bit at position n, the device memory may be used in the immediate context with index n directly (see DeviceContextDesc::ContextId). It may also be used in a command list recorded by a deferred context that will be executed through that immediate context.

Remarks
Only specify these bits that will indicate those immediate contexts where the device memory will actually be used. Do not set unnecessary bits as this will result in extra overhead.

◆ PageSize

Uint64 Diligent::DeviceMemoryDesc::PageSize = 0

Size of the memory page, in bytes.

Depending on the implementation, the memory may be allocated as a single chunk or as an array of pages.