Class Callable

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class Callable : public gpa::playback_common::ICallable

The Callable class.

Public Functions

Callable()
Callable(serialization::StreamPacketHeaderEx const *header, memory::Allocator *allocator = nullptr)
Callable(serialization::StreamPacketHeaderEx const *header, uint64_t storageID, uint64_t storageOffset, memory::Allocator *allocator = nullptr)
Callable(Callable const &other)
Callable &operator=(Callable const &other)
~Callable()
Callable(Callable &&other)
Callable &operator=(Callable &&other)
gpa::playback_common::CallableKey UniqueKey() const
char const *Name()

Retrieve the function/method name of the callable.

char const *Class()

Retrieve the class name of the callable (if any)

char const *API()

Retrieve the API family name of the callable (if any)

uint32_t ArgumentCount()

Retrieve the argument count for this callable (if any)

serialization::Argument const *Argument(uint32_t index, void const **value)

Retrieve the argument metadata and value for this callable at index (if any)

If not playing back (read-only mode), the argument metadata retrieved is the state of the data before execution of the call at capture time. If playing back, this value may change to reflect the live objects at playback time.

Parameters
  • index -- The index of the parameter, from 0 (first parameter) up to ArgumentCount().

  • value -- [out] If a valid argument is requested, this is set to point to the address at the beginning of the argument's data.

serialization::Argument const *Argument(uint32_t index, void const **value, bool postExecute)

Retrieve the serialized argument metadata and value for this callable at index at either the point before execution or after execution at capture time, depending on postExecute.

Parameters
  • index -- The index of the parameter, from 0 (first parameter) up to ArgumentCount().

  • value -- [out] If a valid argument is requested, this is set to point to the address at the beginning of the argument's data. Note that is postExecute is true, only partial support is currently implemented and value will remaining null if the following parameter types are requested:

    • Structs that contain output interfaces, i.e. VkPhysicalDeviceGroupProperties in vkEnumeratePhysicalDeviceGroups.

    • Non-interface output parameters, i.e. pPhysicalDeviceGroupCount in vkEnumeratePhysicalDeviceGroups.

  • postExecute -- If true, this will retrieve the value of the argument after execution of the call at capture time. Thus, specifying true can be used to retrieve the values of output parameters.

serialization::Argument const *ReturnValue(void const **value)

Retrieve the return value metadata and value for this callable.

void *ApiObjectPtr()

Retrieve the value of object pointer (if any)

playback::Context const *Context() const

Retrieve the current Context for this callable (if any)

serialization::ArgsReader const *Reader() const

Retrieve the current ArgsReader for this callable (if any)

serialization::GPAToken Token() const

Retrieve the token of the call.

uint64_t Timestamp() const

Retrieve the original timestamp of the call; useful for ordering calls during playback.

bool IsOperation() const

Determine if this was an actual API call or a "metacall" that performs non-graphics-API-call services.

bool IsValid() const

Return whether the callable is valid or not.

bool IsSuccessful(bool &success) const

Provides information if the callable has successful result.

Returns

Returns true, if information is available. False otherwise.

gpa::playback_common::CallableType GetCategory()

Returns the general type of API call the callable represents. If the type is not yet set (value Unknown) then it will be initialized first.

Returns

A CallableType mask for the callable

char const *GetAssociatedText()

Returns text associated with the callable.

bool IsDelimiter()
bool PreExecute(playback::Context *context)

Prepares this callable for execution.

bool Execute(GPADispatchTable const *&table, bool restore = false, bool releaseResources = true, bool shouldExecute = true)

Execute the Callable within the context of context. restore indicates whether additional bookkeeping calls should be made to manage repeated-playback state.

Parameters
  • table -- Dispatch table used internally by API call args structs

  • context -- Contains handles to playback environment objects such as object and data manager

  • restore -- Invoke additional bookkeeping for repeated replay of this Callable

  • releaseResources -- Whether or not to release resources after execution of this Callable

bool Ingress(GPADispatchTable const *&table, const void **params = nullptr, size_t paramCount = 0)

Apply pre execution state updates for Callable context.

Parameters
  • table -- Dispatch table used internally by API call args structs

  • params -- is a caller allocated output array to contain addresses of object parameter for the call.

  • paramCount -- is the number of allocated paramValues in the array.

bool Egress(GPADispatchTable const *&table, bool releaseResources = false, uint64_t returnValue = 0)

Apply post execution state updates for Callable context.

Parameters
  • table -- Dispatch table used internally by API call args structs

  • releaseResources -- Whether or not to release resources.

  • returnValue -- is the user provided return value from the external call.

size_t Hash() const

Return a hash value suitable for use with STL structures; this is based on the value of the stream packet header referenced by the Callable — such a pointer should be unique throughout a given stream.

uint64_t StorageID() const

Return ID of the storage file the callable belongs to.

uint64_t StorageOffset() const

Return offset of the storage file the callable belongs to.

serialization::IFunctionCall *GetIFunctionCall()

@breif Return the IFunctionCall pointer backing this Callable

serialization::StreamPacketHeaderEx const *GetMappedStorageHeader()

@breif Return the location of mapped storage that the Callable was created with.

virtual gpa::playback_common::CallableType GetCallableType() override

ICallable overrides, mostly used in the layer context system.

virtual gpa::playback_common::CallableKey GetCallableKey() override
virtual void *GetFunctionCallPointer() override
void Load(serialization::MemoryBackedSerializer *resourceSerializer, bool force = false)
void ReleaseResources()
class AssociatedDataHelper

Public Functions

AssociatedDataHelper()
AssociatedDataHelper(char const *data, bool owned)
AssociatedDataHelper(AssociatedDataHelper &&other)
AssociatedDataHelper &operator=(AssociatedDataHelper &&other)
~AssociatedDataHelper()
char const *Text() const