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

#include <stencil_func_tests.h>

Inheritance diagram for StencilFuncTests:
Collaboration diagram for StencilFuncTests:

Public Member Functions

 StencilFuncTests (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_STENCIL_FUNC (0x00000364).

Each test renders a series of red quads unconditionally, then renders an invisible quad on top to set the value of the stencil buffer to various test values. Finally, a green quad is rendered across all test patches using the selected stencil function, causing areas that pass the function to turn green, while failing pixels remain red.

Constructor & Destructor Documentation

◆ StencilFuncTests()

StencilFuncTests::StencilFuncTests ( TestHost host,
std::string  output_dir,
const Config config 
)
Remarks
Always Tests NV097_SET_STENCIL_FUNC_V_ALWAYS - the entire test region should be green.
Equal Tests NV097_SET_STENCIL_FUNC_V_EQUAL - only the 0x7F patch should be green.
Greater Tests NV097_SET_STENCIL_FUNC_V_GREATER - all patches less than 0x7F and the test area (stencil = 0) should be green.
GreaterThanOrEqual Tests NV097_SET_STENCIL_FUNC_V_GEQUAL - the test area (stencil = 0) and all patches less than 0x7F and the 0x7F patch should be green.
Less Tests NV097_SET_STENCIL_FUNC_V_LESS - all patches greater than 0x7F should be green.
LessThanOrEqual Tests NV097_SET_STENCIL_FUNC_V_LEQUAL - all patches greater than 0x7F and the 0x7F patch should be green.
Never Tests NV097_SET_STENCIL_FUNC_V_NEVER - all patches should be blue.
NotEqual Tests NV097_SET_STENCIL_FUNC_V_NOTEQUAL - the 0x7F patch should be blue, all other patches and the test area (stencil = 0) should be green.

Member Function Documentation

◆ Initialize()

void StencilFuncTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


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