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

Defines the sparse buffer memory binding range. More...

#include <DeviceContext.h>

Public Attributes

Uint64 BufferOffset = 0
 Offset in buffer address space where memory will be bound/unbound.
 
Uint64 MemoryOffset = 0
 Memory range offset in pMemory.
 
Uint64 MemorySize = 0
 Size of the memory which will be bound/unbound.
 
IDeviceMemorypMemory = nullptr
 Pointer to the memory object.
 

Detailed Description

Defines the sparse buffer memory binding range.

This structure is used by SparseBufferMemoryBindInfo.

Member Data Documentation

◆ BufferOffset

Uint64 Diligent::SparseBufferMemoryBindRange::BufferOffset = 0

Offset in buffer address space where memory will be bound/unbound.

Must be a multiple of the SparseBufferProperties::BlockSize.

◆ MemoryOffset

Uint64 Diligent::SparseBufferMemoryBindRange::MemoryOffset = 0

Memory range offset in pMemory.

Must be a multiple of the SparseBufferProperties::BlockSize.

◆ MemorySize

Uint64 Diligent::SparseBufferMemoryBindRange::MemorySize = 0

Size of the memory which will be bound/unbound.

Must be a multiple of the SparseBufferProperties::BlockSize.

◆ pMemory

IDeviceMemory* Diligent::SparseBufferMemoryBindRange::pMemory = nullptr

Pointer to the memory object.

If non-null, the memory will be bound to the Region; otherwise the memory will be unbound.

Remarks
  • Direct3D11: the entire buffer must use a single memory object. When a resource is bound to a new memory object, all previous bindings are invalidated.
  • Vulkan & Direct3D12: different resource regions may be bound to different memory objects.
  • Vulkan: memory object must be compatible with the resource, use IDeviceMemory::IsCompatible() to ensure that.
Note
Memory object can be created by the engine using IRenderDevice::CreateDeviceMemory() or can be implemented by the user. Memory object must implement interface methods for each backend (IDeviceMemoryD3D11, IDeviceMemoryD3D12, IDeviceMemoryVk).