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

#include <texture_projective_2d_tests.h>

Inheritance diagram for TextureProjective2DTests:
Collaboration diagram for TextureProjective2DTests:

Classes

struct  TestConfig
 

Public Member Functions

 TextureProjective2DTests (TestHost &host, std::string output_dir, const Config &config)
 
void Initialize () override
 Called to initialize the test suite.
 
- Public Member Functions inherited from TestSuite
 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 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, uint32_t test_index=0, uint32_t total_tests=0)
 
void RunAll (bool include_interactive)
 
bool IsInteractiveOnly () const
 
void SetSavingAllowed (bool enable=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from TestSuite
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 inherited from TestSuite
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 inherited from TestSuite
TestHost & host_
 
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< FTPLogger > ftp_logger_
 

Detailed Description

Tests 2D projective texturing (STAGE_2D_PROJECTIVE / PS_TEXTUREMODES_PROJECTIVE2D) with explicit Q coordinate interpolation across quads and triangles.

Constructor & Destructor Documentation

◆ TextureProjective2DTests()

TextureProjective2DTests::TextureProjective2DTests ( TestHost &  host,
std::string  output_dir,
const Config &  config 
)

Initializes the test suite and creates test cases.

Remarks
ExplicitQ_MixedCorners_Quad Evaluates projective coordinate division on a quad with mixed corner Q values:
  • TL: s=-1, t=0, q=-1 -> s/q = 1.0, t/q = 0.0
  • TR: s=1, t=0, q=1 -> s/q = 1.0, t/q = 0.0
  • BR: s=1, t=1, q=-0.25 -> s/q = -4.0, t/q = -4.0
  • BL: s=-1, t=1, q=0 -> s/q = -inf, t/q = inf Tests hardware division across negative, positive, fractional, and zero Q values.
ExplicitQ_MixedCorners_Bitri Evaluates the mixed corner Q configuration triangulated as two triangles.
ExplicitQ_HorizontalCross_Quad Evaluates projective coordinate division across a horizontal zero-crossing on a quad:
  • Left: q = +1.0, Right: q = -1.0.
  • Coordinates: TL(0,0,q=1), TR(-1,0,q=-1), BR(-1,-1,q=-1), BL(0,1,q=1). Tests continuous interpolation and sign preservation across the q = 0 singularity.
ExplicitQ_HorizontalCross_Bitri Evaluates the horizontal zero-crossing test triangulated as two triangles.
ExplicitQ_VerticalCross_Quad Evaluates projective coordinate division across a vertical zero-crossing on a quad:
  • Top: q = +1.0, Bottom: q = -1.0.
  • Coordinates: TL(0,0,q=1), TR(1,0,q=1), BR(-1,-1,q=-1), BL(0,-1,q=-1). Tests vertical interpolation across the q = 0 singularity.
ExplicitQ_VerticalCross_Bitri Evaluates the vertical zero-crossing test triangulated as two triangles.
ExplicitQ_OpposingCorners_Quad Evaluates projective coordinate division on a saddle-shaped Q surface:
  • TL(0,0,q=1), TR(-1,0,q=-1), BR(1,1,q=1), BL(0,-1,q=-1). Tests zero-crossings along both diagonals of the quad.
ExplicitQ_OpposingCorners_Bitri Evaluates the saddle-shaped Q surface triangulated as two triangles.
ExplicitQ_PositiveGradient_Quad Evaluates projective division with all-positive Q gradient (q in [0.25, 2.0]):
  • TL(0,0,q=0.25), TR(2,0,q=2.0), BR(2,2,q=2.0), BL(0,0.25,q=0.25). Tests non-linear perspective warping purely in the positive Q domain.
ExplicitQ_PositiveGradient_Bitri Evaluates the all-positive Q gradient triangulated as two triangles.
ExplicitQ_NegativeGradient_Quad Evaluates projective division with all-negative Q gradient (q in [-0.25, -2.0]):
  • TL(0,0,q=-0.25), TR(-2,0,q=-2.0), BR(-2,-2,q=-2.0), BL(0,-0.25,q=-0.25). Tests projective interpolation purely in the negative Q domain.
ExplicitQ_NegativeGradient_Bitri Evaluates the all-negative Q gradient triangulated as two triangles.
ExplicitQ_ZeroCorner_Quad Evaluates projective division with three corners at q = 1.0 and BL corner at q = 0.0:
  • TL(0,0,q=1), TR(1,0,q=1), BR(1,1,q=1), BL(0,1,q=0). Tests interpolation behavior when a single corner is at the singularity.
ExplicitQ_ZeroCorner_Bitri Evaluates the single zero corner configuration triangulated as two triangles.
ExplicitQ_UniformSigns Evaluates constant Q values across 5 quads per wrap mode:
  • q = +1.0, q = -1.0, q = +0.5, q = -0.5, q = 0.0. Compares algebraic sign preservation (-s/-q == s/q) and zero divisor handling.

Member Function Documentation

◆ Initialize()

void TextureProjective2DTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


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