nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
TestSuite Class Reference

#include <test_suite.h>

Inherited by AlphaFuncTests, AntialiasingTests, AttributeCarryoverTests, AttributeExplicitSetterTests, AttributeFloatTests, BlendSurfaceTests, BlendTests, BumpEnvLumTests, BumpMapTests, ClearTests, ClippingPrecisionTests, ColorKeyTests, ColorMaskBlendTests, ColorZetaDisableTests, ColorZetaOverlapTests, CombinerTests, ContextSwitchTests, DMACorruptionAroundSurfaceTests, DegenerateBeginEndTests, DepthClampTests, DepthFormatFixedFunctionTests, DepthFormatTests, DepthFunctionTests, EdgeFlagTests, FogCarryoverTests, FogExceptionalValueTests, FogGenTests, FogParamTests, FogTests, FrontFaceTests, HighVertexCountTests, ImageBlitTests, InlineArraySizeMismatchTests, LightingAccumulationTests, LightingControlTests, LightingNormalTests, LightingRangeTests, LightingSpotlightTests, LightingTwoSidedTests, LineWidthTests, MaterialAlphaTests, MaterialColorSourceTests, MaterialColorTests, NullSurfaceTests, OverlappingDrawModesTests, PixelShaderTests, PointParamsTests, PointSizeTests, PointSpriteTests, PvideoTests, SetVertexDataTests, ShadeModelTests, SmoothingTests, SpecularBackTests, SpecularTests, StencilFuncTests, StencilTests, StippleTests, SurfaceClipTests, SurfaceFormatTests, SurfacePitchTests, SwathWidthTests, TexgenMatrixTests, TexgenTests, Texture2DAsCubemapTests, Texture3DAs2DTests, TextureAnisotropyTests, TextureBRDFTests, TextureBorderColorTests, TextureBorderTests, TextureCPUUpdateTests, TextureCubemapTests, TextureFormatDXTTests, TextureFormatTests, TextureFramebufferBlitTests, TextureLodBiasTests, TextureMatrixTests, TexturePaletteTests, TexturePerspectiveEnableTests, TexturePerspectiveTests, TextureRenderTargetTests, TextureRenderUpdateInPlaceTests, TextureShadowComparatorTests, TextureSignedComponentTests, ThreeDPrimitiveTests, TwoDLineTests, VertexShaderIndependenceTests, VertexShaderRoundingTests, VertexShaderSwizzleTests, ViewportTests, VolumeTextureTests, WBufTests, WParamTests, WeightSetterTests, WindowClipTests, ZMinMaxControlTests, ZPassPixelCountTests, and ZeroStrideTests.

Collaboration diagram for TestSuite:

Classes

struct  Config
 Runtime configuration for TestSuites. More...
 

Public Member Functions

 TestSuite (TestHost &host, std::string output_dir, std::string suite_name, const Config &config, bool interactive_only=false)
 
const std::string & Name () const
 
virtual void Initialize ()
 Called to initialize the test suite.
 
virtual void Deinitialize ()
 Called to tear down the test suite.
 
virtual void SetupTest ()
 Called before running an individual test within this suite.
 
virtual void TearDownTest ()
 Called after running an individual test within this suite.
 
void DisableTests (const std::set< std::string > &tests_to_skip)
 
std::vector< std::string > TestNames () const
 
bool HasEnabledTests () const
 
void Run (const std::string &test_name)
 
void RunAll (bool inclue_interactive)
 
bool IsInteractiveOnly () const
 
void SetSavingAllowed (bool enable=true)
 

Static Public Member Functions

static void TagNV2ATrace (uint32_t num_nops)
 Inserts a pattern of NV097_NO_OPERATION's into the pushbuffer to allow identification when viewing nv2a traces.
 

Protected Member Functions

void SetDefaultTextureFormat () const
 
void FinishDraw (const std::string &name, bool save_zbuffer=false)
 
void FinishDrawNoSave (const std::string &name, bool save_zbuffer=false)
 

Protected Attributes

TestHosthost_
 
std::string output_dir_
 
std::string suite_name_
 
bool interactive_only_
 
bool allow_saving_ {true}
 
std::map< std::string, std::function< void()> > tests_ {}
 
std::set< std::string > interactive_only_tests_ {}
 
PGRAPHDiffToken pgraph_diff_
 
bool enable_progress_log_
 
bool enable_pgraph_region_diff_
 
uint32_t delay_milliseconds_between_tests_
 
std::shared_ptr< FTPLoggerftp_logger_
 

Detailed Description

Base class for all test suites.

Member Function Documentation

◆ Deinitialize()

◆ FinishDraw()

void TestSuite::FinishDraw ( const std::string &  name,
bool  save_zbuffer = false 
)
inlineprotected

Marks drawing as completed and presents the backbuffer, potentially causing artifacts (framebuffer, z/stencil-buffer) to be saved to disk.

◆ Initialize()

void TestSuite::Initialize ( )
virtual

Called to initialize the test suite.

Reimplemented in AlphaFuncTests, AntialiasingTests, AttributeCarryoverTests, AttributeExplicitSetterTests, BlendSurfaceTests, BlendTests, BumpEnvLumTests, BumpMapTests, ClearTests, ClippingPrecisionTests, ColorKeyTests, ColorMaskBlendTests, ColorZetaDisableTests, ColorZetaOverlapTests, CombinerTests, ContextSwitchTests, DegenerateBeginEndTests, DepthClampTests, DepthFormatFixedFunctionTests, DepthFormatTests, DepthFunctionTests, DMACorruptionAroundSurfaceTests, EdgeFlagTests, FogCarryoverTests, FogExceptionalValueTests, FogGenTests, FogParamTests, FogTests, FogCustomShaderTests, FogInfiniteFogCoordinateTests, FogVec4CoordTests, FrontFaceTests, HighVertexCountTests, ImageBlitTests, InlineArraySizeMismatchTests, LightingAccumulationTests, LightingControlTests, LightingNormalTests, LightingRangeTests, LightingSpotlightTests, LightingTwoSidedTests, LineWidthTests, MaterialAlphaTests, MaterialColorSourceTests, MaterialColorTests, NullSurfaceTests, OverlappingDrawModesTests, PixelShaderTests, PointParamsTests, PointSizeTests, PointSpriteTests, PvideoTests, SetVertexDataTests, ShadeModelTests, SmoothingTests, SpecularBackTests, SpecularTests, StencilFuncTests, StencilTests, StippleTests, SurfaceClipTests, SurfaceFormatTests, SurfacePitchTests, SwathWidthTests, TexgenMatrixTests, TexgenTests, Texture2DAsCubemapTests, Texture3DAs2DTests, TextureAnisotropyTests, TextureBorderColorTests, TextureBorderTests, TextureBRDFTests, TextureCPUUpdateTests, TextureCubemapTests, TextureFormatDXTTests, TextureFormatTests, TextureFramebufferBlitTests, TextureLodBiasTests, TextureMatrixTests, TexturePaletteTests, TexturePerspectiveEnableTests, TexturePerspectiveTests, TextureRenderTargetTests, TextureRenderUpdateInPlaceTests, TextureShadowComparatorTests, TextureSignedComponentTests, ThreeDPrimitiveTests, TwoDLineTests, VertexShaderIndependenceTests, VertexShaderRoundingTests, VertexShaderSwizzleTests, VolumeTextureTests, WParamTests, WBufTests, WeightSetterTests, WindowClipTests, ZMinMaxControlTests, ZeroStrideTests, and ZPassPixelCountTests.

◆ RunAll()

void TestSuite::RunAll ( bool  inclue_interactive)

Runs all registered tests in this suite.

Parameters
inclue_interactiveWhether tests that do not save artifacts should be run as well.

◆ TearDownTest()

void TestSuite::TearDownTest ( )
virtual

Called after running an individual test within this suite.

Reimplemented in ColorKeyTests, LineWidthTests, StippleTests, and ZMinMaxControlTests.


The documentation for this class was generated from the following files: