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

#include <clear_tests.h>

Inheritance diagram for ClearTests:
Collaboration diagram for ClearTests:

Public Member Functions

 ClearTests (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)
 
void RunAll ()
 
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
 
- Protected Attributes inherited from TestSuite
TestHosthost_
 
std::string output_dir_
 
std::string suite_name_
 
bool interactive_only_
 
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 various write masks on NV097_CLEAR_SURFACE.

Color mask (C*) tests: Each test draws some geometry, then modifies the NV097_SET_COLOR_MASK, NV097_SET_DEPTH_MASK, and NV097_SET_STENCIL_MASK settings, then invokes NV097_CLEAR_SURFACE.

In all cases, the clear color is set to 0x7F7F7F7F and the depth value is set to 0xFFFFFFFF.

Surface format color (SFC*) tests: Each test clears a render target surface and then renders it as a texture with alpha blending disabled in order to test the interaction of surface format with NV097_CLEAR_SURFACE_COLOR.

Constructor & Destructor Documentation

◆ ClearTests()

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

Constructs the test suite and creates test cases.

Remarks
C00000000_Depth_n Framebuffer result after disabling writing to all color channels and to the depth/stencil buffer.
C00000000_Depth_n_ZB Z-buffer result after disabling writing to all color channels and to the depth/stencil buffer.
C00000000_Depth_y Framebuffer result after disabling writing to all color channels and enabling writes to the depth/stencil buffer.
C00000000_Depth_y_ZB Z-buffer result after disabling writing to all color channels and enabling writes to the depth/stencil buffer.
C00000001_Depth_n Framebuffer result after disabling writing to all color channels except blue and to the depth/stencil buffer.
C00000001_Depth_n_ZB Z-buffer result after disabling writing to all color channels except blue and to the depth/stencil buffer.
C00000001_Depth_y Framebuffer result after disabling writing to all color channels except blue enabling writes to the depth/stencil buffer.
C00000001_Depth_y_ZB Z-buffer result after disabling writing to all color channels except blue enabling writes to the depth/stencil buffer.
C00000100_Depth_n Framebuffer result after disabling writing to all color channels except green and to the depth/stencil buffer.
C00000100_Depth_n_ZB Z-buffer result after disabling writing to all color channels except green and to the depth/stencil buffer.
C00000100_Depth_y Framebuffer result after disabling writing to all color channels except green and enabling writes to the depth/stencil buffer.
C00000100_Depth_y_ZB Z-buffer result after disabling writing to all color channels except green and enabling writes to the depth/stencil buffer.
C00010000_Depth_n Framebuffer result after disabling writing to all color channels except red and to the depth/stencil buffer.
C00010000_Depth_n_ZB Z-buffer result after disabling writing to all color channels except red and to the depth/stencil buffer.
C00010000_Depth_y Framebuffer result after disabling writing to all color channels except red and enabling writes to the depth/stencil buffer.
C00010000_Depth_y_ZB Z-buffer result after disabling writing to all color channels except red and enabling writes to the depth/stencil buffer.
C01000000_Depth_n Framebuffer result after disabling writing to all color channels except alpha and to the depth/stencil buffer.
C01000000_Depth_n_ZB Z-buffer result after disabling writing to all color channels except alpha and to the depth/stencil buffer.
C01000000_Depth_y Framebuffer result after disabling writing to all color channels except alpha and enabling writes to the depth/stencil buffer.
C01000000_Depth_y_ZB Z-buffer result after disabling writing to all color channels except alpha and enabling writes to the depth/stencil buffer.
C01010101_Depth_n Framebuffer result after enabling writing to all color channels but disabling writes to the depth/stencil buffer.
C01010101_Depth_n_ZB Z-buffer result after enabling writing to all color channels but disabling writes to the depth/stencil buffer.
C01010101_Depth_y Framebuffer result after enabling writing to all color channels and the depth/stencil buffer.
C01010101_Depth_y_ZB Z-buffer result after enabling writing to all color channels and the depth/stencil buffer.
SFC_A8R8G8B8 Tests the effect of clear color on LE_A8R8G8B8 surface format.
SFC_X1R5G5B5_Z1R5G5B5 Tests the effect of clear color on LE_X1R5G5B5_Z1R5G5B5 surface format. The cleared surface will have its most significant bit set to 0. (Note that the surface is rendered as an ARGB8 texture)
SFC_X1R5G5B5_O1R5G5B5 Tests the effect of clear color on LE_X1R5G5B5_O1R5G5B5 surface format. The cleared surface will have its most significant bit set to 1. (Note that the surface is rendered as an ARGB8 texture)
SCF_R5G6B5 Tests the effect of clear color on LE_R5G6B5 surface format. (Note that the surface is rendered as an ARGB8 texture)
SCF_X8R8G8B8_Z8R8G8B8 Tests the effect of clear color on LE_X8R8G8B8_Z8R8G8B8 surface format. The cleared surface will have its most significant byte set to 0.
SCF_X8R8G8B8_O8R8G8B8 Tests the effect of clear color on LE_X8R8G8B8_O8R8G8B8 surface format. The cleared surface will have its most significant byte set to 1.
SCF_X1A7R8G8B8_Z1A7R8G8B8 Tests the effect of clear color on LE_X1A7R8G8B8_Z1A7R8G8B8 surface format. The cleared surface will have its most significant bit set to 0.
SCF_X1A7R8G8B8_O1A7R8G8B8 Tests the effect of clear color on LE_X1A7R8G8B8_O1A7R8G8B8 surface format. The cleared surface will have its most significant bit set to 1.

Member Function Documentation

◆ Initialize()

void ClearTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


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