Class GeometryExtractor

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

Class Documentation

class GeometryExtractor : public gpa::playback::CallableReceiver, public gpa::playback::CallableBroadcaster, public gpa::playback::CallableCallbacks

TODO.

Public Functions

GeometryExtractor() = default

Constructs an instance of GeometryExtractor.

virtual ~GeometryExtractor()

Destroys this instance of GeometryExtractor.

virtual void SetRequest(Request &request)

Sets a Request on this GeometryExtractor that will be processed during its next execution.

Note

This method will cause the given GeometryExtractor::Result object's GeometryExtractor::Result::Info objects to be sorted

Note

If this method is overriden the base implementation must be called

Parameters

request -- [in] The Request to set for this GeometryExtractor object's next execution

void ReprocessRequest()
virtual void SetSOBufferSize(size_t size)

Sets the size to use for the SO Buffer (for re-running when insufficient space was allocated)

Parameters

The -- [in] size to use for future SO Buffer allocation

virtual size_t GetSOBufferSizeHint()

Get a hint for the size to set in the case of insufficient space.

virtual void Clear()

Clears this GeometryExtractor object's Request and GeometryExtractor::Result objects.

Note

If this method is overriden the base implementation must be called

virtual void PostSetupRange(CallableCache *pCallableCache) override
virtual void PreExecuteRange(CallableCache *pCallableCache) override
virtual void PreExecuteCall(Callable *pCallable, uint64_t callIndex) override
virtual void PostExecuteCall(Callable *pCallable, uint64_t callIndex) override
virtual void PostExecuteRange(CallableCache *pCallableCache) override
virtual void ConnectExecutionCallbacks(ExecutionCallbacks const &executionCallbacks) final override
virtual void DisconnectExecutionCallbacks() final override

Public Members

ExecutionCallbacks mExecutionCallbacks = {}

Protected Functions

detail::Span<Request::Info> GetRequestInfos()

Gets all of the Request::Info objects currently set on this ResourceExtractor.

Returns

All of the Request::Info objects currently set on this ResourceExtractor

detail::Span<Request::Info> GetRequestInfos(uint64_t callIndex)

Gets all of the Request::Info objects currently set on this GeometryExtractor for a given call index.

Parameters

callIndex -- [in] The call index to get the Request::Info objects for

Returns

All of the Request::Info objects currently set on this ResourceExtractor for the given call index

Protected Attributes

MetadataExtractor const *mMetadataExtractor = {nullptr}

A pointer to the MetadataExtractor associated with this GeometryExtractor.

struct Request

Parameters for obtaining resource data from a GeometryExtractor.

Public Types

enum class Stage

TODO: Documentation.

Values:

enumerator Unspecified
enumerator DrawInput
enumerator DrawPostVertexStage
enumerator DrawPostDomainStage
enumerator DrawPostGeometryStage
enum class Type

Values:

enumerator Unspecified
enumerator PositionOnly

Extract vertex parameters with position semantic only.

enumerator Full

Extract all vertex parameters.

Public Functions

operator bool() const

Converts this GeometryExtractor::Request to a value indicating whether or not it's valid.

Note

A valid GeometryExtractor::Request has a non zero value for infoCount, a non null pointer for pInfos, and a non null pointer for pData

Public Members

size_t infoCount = {0}

This GeometryExtractor::Request object's GeometryExtractor::Request::Info count.

Info *pInfos = {nullptr}

This GeometryExtractor::Request object's GeometryExtractor::Request::Info objects.

struct Info

Parameters for a single entry in a GeometryExtractor::Request.

Public Members

uint64_t callIndex = {0}

The call index to obtain resource data for.

Stage stage = {Stage::Unspecified}
Type type = {Type::Unspecified}
Result result = {}

The GeometryExtractor::Result populated when this GeometryExtractor::Request is submitted.

struct Result

Parameters for interpreting data obtained from a GeometryExtractor::Request.

Public Types

enum class State

Enumeration of possible states of GeometryExtractor::Result.

Values:

enumerator PENDING

Indicates that a GeometryExtractor::Request::Info has been created but not yet submitted.

enumerator SUCCESS

Indicates that a GeometryExtractor::Request::Info has been submitted and the resource was successfully extracted.

enumerator FAILURE_UNKNOWN

Indicates that a GeometryExtractor::Request::Info has been submitted and failed for an unknown reason.

enumerator FAILURE_INVALID_REQUEST

Indicates that a GeometryExtractor::Request::Info was submitted for an invalid call.

enumerator FAILURE_UNSUPPORTED

Indicates that a GeometryExtractor::Request::Info was submitted for a pResourceInfo which does not support extraction.

enumerator FAILURE_NO_SHADER

Indicates that a GeometryExtractor::Request::Info was submitted for a draw call which does not have a specified shader stage.

enumerator FAILURE_NO_GEOMETRY

Indicates that a GeometryExtractor::Request::Info was submitted for a draw call which does not have any geometry or geometry could not be found.

enumerator FAILURE_POSITION_PARAM_NOT_FOUND

Indicates that position vertex parameter could not be found for PositionOnly request.

enumerator FAILURE_INTERNAL

Indicates that an internal error occured, indicates that GPA Framework maintenance is required.

enumerator INSUFFICIENT_BUFFER_SIZE

Indicates that BufferSize parameter too small for requested data.

Public Functions

operator bool() const

Converts this GeometryExtractor::Result to a value indicating whether or not it's valid.

Note

A valid GeometryExtractor::Result has a state of State::SUCCESS, a non zero value for dataSize, and a non null pointer for pData

Public Members

State state = {State::PENDING}

This GeometryExtractor::Result object's state.

std::vector<uint8_t> data

This GeometryExtractor::Result object's data.

uint32_t dataStride = 0

Data stride.

std::vector<api_types::VertexInputElementExtended> layout

Data layout.

api_types::PrimitiveTopology topology = api_types::GPA_PRIMITIVE_TOPOLOGY_UNKNOWN

Geometry topology.

uint64_t primitiveCount = 0

Geometry primitive count.

uint32_t controlPointCount = 0

Patch list control point count, if topology is GPA_PRIMITIVE_TOPOLOGY_PATCH_LIST.

float viewportAspect = 1.0f

First bound viewport width / height.