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

Tests interactions of alpha blending with various surface formats. More...

#include <blend_surface_tests.h>

Inheritance diagram for BlendSurfaceTests:
Collaboration diagram for BlendSurfaceTests:

Public Member Functions

 BlendSurfaceTests (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 interactions of alpha blending with various surface formats.

Constructor & Destructor Documentation

◆ BlendSurfaceTests()

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

Initializes the test suite and creates test cases.

Remarks
1-DstAlpha_ARGB8 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_A8R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
1-DstAlpha_R5G6B5 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_R5G6B5. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
1-DstAlpha_X_O1RGB5 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_O1R5G5B5. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
1-DstAlpha_X_ORGB8 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_O8R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
1-DstAlpha_X_Z1RGB5 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_Z1R5G5B5. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
1-DstAlpha_X_ZRGB8 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_Z8R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
1-DstAlpha_XA_O1A7RGB8 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_O1A7R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
1-DstAlpha_XA_Z1A7RGB8 Demonstrates behavior of blend func ADD (1 - DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_Z1A7R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_ARGB8 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_A8R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_R5G6B5 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_R5G6B5. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_X_O1RGB5 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_O1R5G5B5. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_X_ORGB8 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_O8R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_X_Z1RGB5 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_Z1R5G5B5. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_X_ZRGB8 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_Z8R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_XA_O1A7RGB8 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_O1A7R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
DstAlpha_XA_Z1A7RGB8 Demonstrates behavior of blend func ADD (DstAlpha) (Zero) with surface mode NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_Z1A7R8G8B8. The background is initialized to various colors (see labels) via a DIFFUSE quad render. A white quad is then blended on top and the final composition rendered to the backbuffer with alpha forced to 1.0 to display the effect on the color channels.
ARGB8_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_A8R8G8B8 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
ARGB8_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_A8R8G8B8 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
R5G6B5_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_R5G6B5 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
R5G6B5_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_R5G6B5 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_O1RGB5_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_O1R5G5B5 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_O1RGB5_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_O1R5G5B5 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_ORGB8_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_O8R8G8B8 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_ORGB8_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_O8R8G8B8 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_Z1RGB5_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_Z1R5G5B5 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_Z1RGB5_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_Z1R5G5B5 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_ZRGB8_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_Z8R8G8B8 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
X_ZRGB8_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X8R8G8B8_Z8R8G8B8 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
XA_O1A7RGB8_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_O1A7R8G8B8 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
XA_O1A7RGB8_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_O1A7R8G8B8 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
XA_Z1A7RGB8_Add_SrcA_1-SrcA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_Z1A7R8G8B8 and blend factors {SrcAlpha, 1 - SrcAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.
XA_Z1A7RGB8_Add_SrcA_DstA Demonstrates the behavior of blending various texture formats with the surface mode set to NV097_SET_SURFACE_FORMAT_COLOR_LE_X1A7R8G8B8_Z1A7R8G8B8 and blend factors {SrcAlpha, DstAlpha}. A test pattern is rendered multiple times, partially overlapping itself. A low opacity grey quad is rendered in the upper left, then composited against itself multiple times in the upper right. A zero alpha (or zero high nibble for non-alpha formats) quad is rendered in the lower left and composited against itself in the lower right.

Member Function Documentation

◆ Initialize()

void BlendSurfaceTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


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