nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
TextureRenderTargetTests Class Reference
Inheritance diagram for TextureRenderTargetTests:
Collaboration diagram for TextureRenderTargetTests:

Public Member Functions

 TextureRenderTargetTests (TestHost &host, std::string output_dir, const Config &config)
 
void Initialize () override
 Called to initialize the test suite.
 
void Deinitialize () override
 Called to tear down 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 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, uint32_t test_index=0, uint32_t total_tests=0)
 
void RunAll (bool include_interactive)
 
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
 
void FinishDraw (const std::string &name, bool save_zbuffer=false)
 
void FinishDrawNoSave (const std::string &name, bool save_zbuffer=false)
 
- Protected Attributes inherited from TestSuite
TestHost & host_
 
std::string output_dir_
 
std::string suite_name_
 
bool interactive_only_
 
bool allow_saving_ {true}
 
std::map< std::string, std::function< void()> > tests_ {}
 
std::set< std::string > interactive_only_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_
 

Constructor & Destructor Documentation

◆ TextureRenderTargetTests()

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

Constructs the test suite and creates test cases.

Remarks
TexFmt_A8B8G8R8 Renders a gradient pattern to a surface with A8B8G8R8 swizzled texture format and samples it onto a screen quad.
TexFmt_R8G8B8A8 Renders a gradient pattern to a surface with R8G8B8A8 swizzled texture format and samples it onto a screen quad.
TexFmt_A8R8G8B8 Renders a gradient pattern to a surface with A8R8G8B8 swizzled texture format and samples it onto a screen quad.
TexFmt_X8R8G8B8 Renders a gradient pattern to a surface with X8R8G8B8 swizzled texture format and samples it onto a screen quad.
TexFmt_B8G8R8A8 Renders a gradient pattern to a surface with B8G8R8A8 swizzled texture format and samples it onto a screen quad.
TexFmt_R5G6B5 Renders a gradient pattern to a surface with R5G6B5 swizzled texture format and samples it onto a screen quad.
TexFmt_A1R5G5B5 Renders a gradient pattern to a surface with A1R5G5B5 swizzled texture format and samples it onto a screen quad.
TexFmt_X1R5G5B5 Renders a gradient pattern to a surface with X1R5G5B5 swizzled texture format and samples it onto a screen quad.
TexFmt_A4R4G4B4 Renders a gradient pattern to a surface with A4R4G4B4 swizzled texture format and samples it onto a screen quad.
TexFmt_R16B16 Renders a gradient pattern to a surface with R16B16 swizzled texture format and samples it onto a screen quad.
TexFmt_Y16 Renders a gradient pattern to a surface with Y16 swizzled texture format and samples it onto a screen quad.
TexFmt_A8B8G8R8_L Renders a gradient pattern to a surface with A8B8G8R8 linear texture format and samples it onto a screen quad.
TexFmt_R8G8B8A8_L Renders a gradient pattern to a surface with R8G8B8A8 linear texture format and samples it onto a screen quad.
TexFmt_A8R8G8B8_L Renders a gradient pattern to a surface with A8R8G8B8 linear texture format and samples it onto a screen quad.
TexFmt_X8R8G8B8_L Renders a gradient pattern to a surface with X8R8G8B8 linear texture format and samples it onto a screen quad.
TexFmt_B8G8R8A8_L Renders a gradient pattern to a surface with B8G8R8A8 linear texture format and samples it onto a screen quad.
TexFmt_R5G6B5_L Renders a gradient pattern to a surface with R5G6B5 linear texture format and samples it onto a screen quad.
TexFmt_A1R5G5B5_L Renders a gradient pattern to a surface with A1R5G5B5 linear texture format and samples it onto a screen quad.
TexFmt_X1R5G5B5_L Renders a gradient pattern to a surface with X1R5G5B5 linear texture format and samples it onto a screen quad.
TexFmt_A4R4G4B4_L Renders a gradient pattern to a surface with A4R4G4B4 linear texture format and samples it onto a screen quad.
TexFmt_G8B8_L Renders a gradient pattern to a surface with G8B8 linear texture format and samples it onto a screen quad.
TexFmt_R16B16_L Renders a gradient pattern to a surface with R16B16 linear texture format and samples it onto a screen quad.
TexFmt_Y16_L Renders a gradient pattern to a surface with Y16 linear texture format and samples it onto a screen quad.
TexFmt_YUY2_L Renders a gradient pattern to a surface with YUY2 linear texture format and samples it onto a screen quad.
TexFmt_UYVY_L Renders a gradient pattern to a surface with UYVY linear texture format and samples it onto a screen quad.
TexFmt_I8_A8R8G8B8_p32 Renders a 32-entry palettized gradient to a surface and samples it onto a screen quad.
TexFmt_I8_A8R8G8B8_p64 Renders a 64-entry palettized gradient to a surface and samples it onto a screen quad.
TexFmt_I8_A8R8G8B8_p128 Renders a 128-entry palettized gradient to a surface and samples it onto a screen quad.
TexFmt_I8_A8R8G8B8_p256 Renders a 256-entry palettized gradient to a surface and samples it onto a screen quad.
RenderTextureLoop Renders Blue, Green, and Red into a surface sequentially, texturing separate screen quads to verify render-to-texture loop updates.
RenderTextureClearLoop Exercises the xemu texture cache invalidation defect (xemu #2036) triggered by rendering into a swizzled surface, sampling it as a texture (which causes xemu to blit the GPU surface into the GL texture via surf_to_tex while retaining the pre-render RAM hash in binding->data_hash), then clearing that surface as a linear surface back to black. Displays three quads side-by-side:
  1. Initial sample of linear-cleared surface as swizzled texture (expected black).
  2. Sample after GPU renders red into swizzled surface (expected red).
  3. Sample after linear surface clear to black (expected black).

Member Function Documentation

◆ Deinitialize()

void TextureRenderTargetTests::Deinitialize ( )
overridevirtual

Called to tear down the test suite.

Reimplemented from TestSuite.

◆ Initialize()

void TextureRenderTargetTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


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