Class MappedObjectData

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class MappedObjectData : public gpa::capture_support::ObjectData

Subclass of ObjectData that is used for ObjectData implementations which refer to or manage memory objects (buffers, textures, etc)

Public Types

typedef std::shared_ptr<MappedObjectData> Ptr

Public Functions

MappedObjectData()
~MappedObjectData()
virtual bool IsMappedObjectData() const override
virtual void Apply(ResourceDataDescriptor const *desc)

Apply the changes described in desc.

Parameters

desc -- Describes all parameters to the Apply operation (offset into memory, number of bytes to copy, etc).

virtual void SaveChunkForRestore(ResourceDataDescriptor const *desc)

Track update chunks for later restore (for example, as part of a repeated range playback).

Parameters

desc -- Resource descriptor that describes the offset into the mapped device memory, and its length in bytes.

virtual bool HasChunksToRestore() const

Determines if this object contains update chunks that need restoring (for example, as part of a repeated range playback).

Returns

True if this object contains chunks for update, false otherwise

virtual void RestoreChunks(void *baseMappedObjectAddress)

Restore all update chunks to the mapped memory buffer whose virtual address is provided.

Note

This buffer must be large enough to accommodate all potential restore chunks; it is advised to map the entire device memory object to ensure this is the case.

Parameters

baseMappedObjectAddress -- Starting address of the mapped memory buffer

Protected Functions

virtual void *GetBufferPtr() = 0

Retrieve a pointer to the mapped memory.

Returns

Pointer to the mapped memory, or null if memory is not currently mapped

Protected Attributes

std::vector<ModifiedChunk> mModifiedChunks
utility::CoverageMap mCoverageMap
struct ModifiedChunk

Public Members

ResourceDataDescriptor resourceDescriptor
std::vector<uint8_t> originalData