#include <blend_tests.h>
Classes | |
struct | Instruction |
Public Member Functions | |
BlendTests (TestHost &host, std::string output_dir, const Config &config) | |
void | Initialize () override |
Called to initialize the test suite. | |
![]() | |
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 void | TagNV2ATrace (uint32_t num_nops) |
Inserts a pattern of NV097_NO_OPERATION's into the pushbuffer to allow identification when viewing nv2a traces. | |
![]() | |
void | SetDefaultTextureFormat () const |
![]() | |
TestHost & | host_ |
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< FTPLogger > | ftp_logger_ |
Tests the effects of NV097_SET_BLEND_EQUATION, NV097_SET_BLEND_FUNC_SFACTOR, and NV097_SET_BLEND_FUNC_DFACTOR on rendering unsigned textures.
All test names are of the form <sfactor>-<equation>-<dfactor> where:
sfactor/dfactor are one of: 0 - ZERO, 1 - ONE, srcRGB - SRC_COLOR, 1-srcRGB - ONE_MINUS_SRC_COLOR, srcA - SRC_ALPHA, 1-srcA - ONE_MINUS_SRC_ALPHA, dstA - DST_ALPHA, 1-dstA - ONE_MINUS_DST_ALPHA, dstRGB - DST_COLOR, 1-dstRGB - ONE_MINUS_DST_COLOR, srcAsat - SRC_ALPHA_SATURATE, cRGB - CONSTANT_COLOR, 1-cRGB - ONE_MINUS_CONSTANT_COLOR, cA - CONSTANT_ALPHA, 1-cA - ONE_MINUS_CONSTANT_ALPHA
equation is one of: ADD - NV097_SET_BLEND_EQUATION_V_FUNC_ADD, SUB - NV097_SET_BLEND_EQUATION_V_FUNC_SUBTRACT, REVSUB - NV097_SET_BLEND_EQUATION_V_FUNC_REVERSE_SUBTRACT, MIN - NV097_SET_BLEND_EQUATION_V_MIN, MAX - NV097_SET_BLEND_EQUATION_V_MAX, SADD - NV097_SET_BLEND_EQUATION_V_FUNC_ADD_SIGNED, SREVSUB - NV097_SET_BLEND_EQUATION_V_FUNC_REVERSE_SUBTRACT_SIGNED,
The left, center, and right renders are all composited against a 16 pixel checkerboard pattern alternating between a background color and fully opaque black.
On the left side of the screen, a column of squares is rendered with colors blended with the checkerboard and alpha always set to 0xDD.
In the center of the screen, a stack of concentric squares is rendered with colors that are not blended and alpha values blended with the checkerboard (the first 16x16 will be blended with the BG color, the next with full opaque black, etc...). Each square is composited with the previous square from outside to inside, so the outermost is only blended with the checkerboard, the next is blended with both the checkerboard and the result of the outermost blend, etc...
On the right side of the screen, a column of squares is rendered with both color and alpha values blended.
|
overridevirtual |
Called to initialize the test suite.
Reimplemented from TestSuite.