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

#include <dma_corruption_around_surface_tests.h>

Inheritance diagram for DMACorruptionAroundSurfaceTests:
Collaboration diagram for DMACorruptionAroundSurfaceTests:

Public Member Functions

 DMACorruptionAroundSurfaceTests (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 DMA on xemu's implementation of GPU-owned overlay buffers.

These tests are generally specific to emulator testing and likely should not serve as examples of how to do PGRAPH interactions, nor are they likely to illuminate unexpected behavior in HW.

Constructor & Destructor Documentation

◆ DMACorruptionAroundSurfaceTests()

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

Initializes the test suite and creates test cases.

Remarks
DMAOverlap Sets up a render target in uninitialized data and triggers a nop (degenerate triangle) draw. Then uses the guest CPU to populate the memory within the render target. Sets the render target back to the framebuffer and renders the previous surface as a texture. The texture should not exhibit any corruption from the initial state of the texture.
xemuReadFromFileIntoSurface Sets up a render target and initializes it with a dark color. Then reads new data from a file into the render target and triggers a nop (degenerate triangle) draw. Sets the render target back to the framebuffer and renders the previous surface as a texture. The texture should be bright white, the data provided in the test file.
xemuReadFromFileIntoTexture Draws a texture, then reads new data from a file over the same location in memory and draws a second time. The rendered content should change across the draws.

Member Function Documentation

◆ Initialize()

void DMACorruptionAroundSurfaceTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


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