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

#include <point_params_tests.h>

Inheritance diagram for PointParamsTests:
Collaboration diagram for PointParamsTests:

Public Member Functions

 PointParamsTests (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)
 
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)
 
void RunAll ()
 
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
 
- Protected Attributes inherited from TestSuite
TestHosthost_
 
std::string output_dir_
 
std::string suite_name_
 
bool allow_saving_ {true}
 
std::map< std::string, std::function< void()> > 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

Tests the behavior of NV097_SET_POINT_PARAMS_ENABLE (0x00000318) and NV097_SET_POINT_PARAMS (0x00000A30).

See https://learn.microsoft.com/en-us/windows/win32/direct3d9/point-sprites

PointParamsX_SmoothX_PtSize_(FF | VS) Each test renders a grid of points. Point size is set to a test value for all points.

As points go from top to bottom: Z starts at -5 (eye at -7) and increases by 25 per row (max depth = 193).

In each row, as points go from left to right, point params are set from the following:

  1. No scale factors, min size 0, size range 0. Should be 1 pixel.
  2. No scale factors, min size 16, size range 0. Should be 16 pixels square.
  3. Negligible constant scale, size range 16, min size 0. Should be 16 pixels.
  4. Negligible constant scale, size range 16, min size 8. Should be 24 pixels.
  5. 4 constant scale, size range 14, min size 16. Should be ~23 pixels.
  6. 4 constant scale, size range 36, min size 4. Should be ~21 pixels.
  7. 256 constant scale, size range 36, min size 4. Should be ~7 pixels.
  8. 0.25 linear scale, size range 39, min 1.
  9. 0.05 quadratic scale, size range 39, min 1.
  10. 4 constant scale, size range 14, min size 16, bias -0.5.
  11. 4 constant scale, size range 14, min size 16, bias 0.5.
  12. No scale factors, size range 15, min size 1, bias -100.
  13. No scale factors, size range 15, min size 1, bias 100.
  • Detailed_(FF | VS) Each test renders a grid of points. Point size is set to 128 (16 pixels) for all points.

As points go from top to bottom: Z starts at -5 (eye at -7) and increases by 25 per row (max depth = 193).

In each row, as points go from left to right, point params are set from the following:

  1. 0.25 linear scale, size range 39, min size 1, scale bias -1.0
  2. 0.25 linear scale, size range 39, min size 1, scale bias -0.5
  3. 0.25 linear scale, size range 39, min size 1, scale bias -0.25
  4. 0.25 linear scale, size range 39, min size 1, scale bias -0.01
  5. 0.25 linear scale, size range 39, min size 1, scale bias 0
  6. 0.25 linear scale, size range 39, min size 1, scale bias -0.01
  7. 0.25 linear scale, size range 39, min size 1, scale bias -0.25
  8. 0.25 linear scale, size range 39, min size 1, scale bias -0.5
  9. 0.25 linear scale, size range 39, min size 1, scale bias -1.0
  10. 4 constant scale, size range 36, min size 4, scale bias -0.4
  11. 4 constant scale, size range 36, min size 4, scale bias -0.25
  12. 4 constant scale, size range 36, min size 4, scale bias 0.25
  13. 4 constant scale, size range 36, min size 4, scale bias 0.4

Constructor & Destructor Documentation

◆ PointParamsTests()

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

Initializes the test suite and creates test cases.

Remarks
PointParamsOn_SmoothOn_001_FF Renders points using the fixed function pipeline with point size 1, point smoothing and point params enabled. Demonstrates that point size is ignored when point params are enabled.
PointParamsOn_SmoothOn_128_FF Renders points using the fixed function pipeline with point size 128, point smoothing and point params enabled.
PointParamsOn_SmoothOff_128_FF Renders points using the fixed function pipeline with point size 128, point smoothing disabled and point params enabled.
PointParamsOn_SmoothOn_128_VS Renders points using a programmable shader with point size 128, point smoothing and point params enabled.
PointParamsOn_SmoothOff_128_VS Renders points using a programmable shader with point size 128, point smoothing disabled and point params enabled.
PointParamsOff_SmoothOff_128_VS Renders points using a programmable shader with point size 128, point smoothing and point params disabled.
PointParamsOff_SmoothOff_128_FF Renders points using the fixed function pipeline with point size 128, point smoothing and point params disabled.
Detailed_FF Renders points using the fixed function pipeline with more complex point params.
Detailed_VS Renders points using a programmable shader with more complex point params.

Member Function Documentation

◆ Initialize()

void PointParamsTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


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