Class PipelineExperiment
Defined in File experiment.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public gpa::playback::BaseExperiment
(Class BaseExperiment)
Class Documentation
-
class PipelineExperiment : public gpa::playback::BaseExperiment
Provides control over modifications to the pipeline of a stream.
This interface allows the user to create a custom graphics or compute pipeline and replace an existing one in the stream with it.
Public Functions
-
PipelineExperiment()
Creates an instance of PipelineExperiment.
-
PipelineExperiment(PipelineExperiment const &other)
Creates an instance of PipelineExperiment from a given PipelineExperiment.
- Parameters
other -- The PipelineExperiment to copy from
-
PipelineExperiment &operator=(PipelineExperiment const &other)
Creates an instance of PipelineExperiment from a given PipelineExperiment.
- Parameters
other -- The PipelineExperiment to copy from
- Returns
This PipelineExperiment after copying from the given PipelineExperiment
-
PipelineExperiment(PipelineExperiment &&other)
Moves an instance of PipelineExperiment from a given PipelineExperiment.
- Parameters
other -- The PipelineExperiment to move from
-
PipelineExperiment &operator=(PipelineExperiment &&other)
Moves an instance of PipelineExperiment from a given PipelineExperiment.
- Parameters
other -- The PipelineExperiment to move from
- Returns
This PipelineExperiment after moving from the given PipelineExperiment
-
bool operator!=(PipelineExperiment const &other) const
Gets a value indicating whether or not a given PipelineExperiment is inequal to this PipelineExperiment.
- Parameters
other -- The PipelineExperiment to compare for inequlaity
- Returns
Whether or not the given PipelineExperiment is inequal to this Experiment
-
Shader const *GetShader(Shader::Stage stage) const
Gets this PipelineExperiment's Shader at a given Shader::Stage.
- Parameters
stage -- The Shader::Stage to get the Shader for
- Returns
A pointer to this PipelineExperiment's Shader for the given Shader::Stage, or nullptr if this PipelineExperiment doesn't have a Shader for the given stage
-
void AddShader(Shader const &shader)
Adds a Shader to this PipelineExperiment.
Note
If this PipelineExperiment already has a Shader at the given Shader's Shader::Stage, it will be overridden by the provided Shader
- Parameters
shader -- The Shader to add to this Experiment
-
void RemoveShader(Shader::Stage stage)
Removes the Shader from the given Shader::Stage.
- Parameters
stage -- The Shader::Stage to remove the Shader from
-
void GetPipelineJson(size_t *pSizeBytes, char *pPipelineJson) const
Gets this PipelineExperiment's pipeline JSON.
Note
Call this method with nullptr for pPipelineJson to populate only the pSizeBytes argument
Note
Providing a buffer that isn't large enough results in undefined behavior
- Parameters
pSizeBytes -- [out] A pointer to a size_t to write the pipeline JSON size in bytes
pPipelineJson -- [out] A pointer to a preallocated char buffer to copy the pipeline JSON into
-
void SetPipelineJson(char const *pPipelineJson)
Sets this PipelineExperiment's pipeline JSON.
- Parameters
pPipelineJson -- This Experiment's pipeline JSON as a null terminated char array.
-
serialization::StructDataManager const &GetPipelineDataManager() const
Gets this PipelineExperiment's pipeline StructDataManager.
- Returns
This PipelineExperiment's pipeline StructDataManager
-
void SetPipelineDataManager(serialization::StructDataManager const &pipelineDataManager)
Sets this PipelineExperiment's pipeline StructDataManager.
- Parameters
pipelineDataManager -- This PipelineExperiment's pipeline StructDataManager
-
void GetScissorRects(size_t *pNumRects, api_types::Rect2D *pRects) const
Gets custom scissor rects that were set on this experiment.
Note
Call this method will nullptr for pRects to populate only the pNumRects argument. Providing a buffer that isn't large enough results in undefined behavior.
- Parameters
pNumRects -- [out] The number of scissor rects
[in-out] -- pRects A user allocated array that will be populated with Rect2D objects describing the scissor rect location and dimensions
-
void SetScissorRects(size_t numRects, api_types::Rect2D const *pRects)
Sets custom scissor rects on this experiment.
Note
If this PipelineExperiment already has scissor rects, they will be overridden by the provided scissor rects.
- Parameters
numRects -- [in] The number of scissor rects in pRects
pRects -- [in] An array of Rect2D objects describing the scissor rect location and dimensions. Each index corresponds to the set viewport index, if multiple viewports are bound.
-
std::optional<playback::ShadingRateInfo> GetShadingRateInfo() const
Get custom shading rate on this experiment. @retrun the setted shading rate info for the experiment.
-
void SetShadingRateInfo(playback::ShadingRateInfo &shadingrateInfo)
Sets custom shading rate and combiner on this experiment.
- Parameters
shadingrateInfo -- [in] The shading rate info we want to use in the experiment
-
void GetFillMode(api_types::FillMode *fillMode) const
Gets custom fill mode on this experiment.
- Parameters
fillMode -- [in] A pointer to a FillMode to be set to the experiment's fill mode
-
void SetFillMode(api_types::FillMode fillMode)
Sets custom fill mode on this experiment.
- Parameters
fillMode -- [in] The fill mode to be set
-
void SetViewports(size_t numViewports, api_types::Viewport const *pViewports)
Sets viewport on this experiment.
- Parameters
numViewports -- [in] The number of viewports in pViewports
pViewports -- [in] An array of api_types::Viewport objects
-
std::vector<api_types::Viewport> GetViewports() const
Get the viewports to be applied on this experiment.
- Returns
the viewports to be applied on this experiment
-
void SetBlendFactor(const float blendFactor[4])
Sets custom blend factor on this experiment.
- Parameters
blendFactor -- [in] The blend factor mode to be set
-
void GetBlendFactor(size_t *pCount, float *pBlendFactor) const
Gets a previously set custom blend factor.
Note
Call this method with nullptr for pBlendFactor to populate only the pCount argument. Providing a buffer that isn't large enough results in undefined behavior. This will normally be 4, the sizing functionality is offered here for consistency with other function in this api.
- Parameters
count -- [out] the size of the preallocated buffer passed in pBlendFactor. normal usage should have this be 4. Set to zero if blend factor is not modified.
[in-out] -- pBlendFactor a pointer to a buffer that will be filled with the currently set Blend Factor values for this experiment
Protected Attributes
-
serialization::StructDataManager mPipelineDataManager
-
std::string mPipelineJson
-
std::optional<playback::ShadingRateInfo> mShadingRateInfo
-
std::optional<std::array<float, 4>> mBlendFactor
-
class Prefab : public gpa::playback::BaseExperiment::Prefab
Provides a common base and interface for PipelineExperiment prefabs.
Subclassed by gpa::playback::BlendFactorExperiment, gpa::playback::ClampToMipExperiment, gpa::playback::OneByOneScissorRectExperiment, gpa::playback::ScissorRectExperiment, gpa::playback::ShadingRateExperiment, gpa::playback::SimpleFragmentShaderExperiment, gpa::playback::ViewportExperiment, gpa::playback::WireframeExperiment
-
PipelineExperiment()