nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
z_min_max_control_tests.h
1#ifndef NXDK_PGRAPH_TESTS_Z_MIN_MAX_CONTROL_TESTS_H
2#define NXDK_PGRAPH_TESTS_Z_MIN_MAX_CONTROL_TESTS_H
3
4#include <memory>
5#include <vector>
6
7#include "test_host.h"
8#include "test_suite.h"
9
10class TestHost;
11class VertexBuffer;
12
13// Tests 0x1D78 NV097_SET_ZMIN_MAX_CONTROL functions.
15 public:
16 typedef enum ZMinMaxDrawMode {
17 M_Z_INC_W_ONE,
18 M_Z_INC_W_INC,
19 M_Z_NF_W_INC,
20 M_Z_NF_W_NF,
21 M_Z_INC_W_TEN,
22 M_Z_INC_W_FRAC,
23 M_Z_INC_W_INV_Z,
24 } ZMinMaxDrawMode;
25
26 public:
27 ZMinMaxControlTests(TestHost& host, std::string output_dir, const Config& config);
28
29 void Initialize() override;
30 void TearDownTest() override;
31
32 private:
33 void Test(const std::string& name, uint32_t mode, bool w_buffered);
34 void TestFixed(const std::string& name, uint32_t mode, bool w_buffered);
35
36 void DrawBlock(float x_offset, float y_offset, ZMinMaxDrawMode zw_mode, bool projected = false) const;
37
38 private:
39 float kLeft{0.f};
40 float kRight{0.f};
41 float kTop{0.f};
42 float kBottom{0.f};
43 float kRegionWidth{0.f};
44 float kRegionHeight{0.f};
45
46 uint32_t quads_per_row_{0};
47 uint32_t quads_per_col_{0};
48 float col_size_{0.f};
49 uint32_t num_quads_{0};
50};
51
52#endif // NXDK_PGRAPH_TESTS_Z_MIN_MAX_CONTROL_TESTS_H
Definition test_host.h:47
Definition test_suite.h:20
Definition vertex_buffer.h:204
Definition z_min_max_control_tests.h:14
void Initialize() override
Called to initialize the test suite.
Definition z_min_max_control_tests.cpp:66
void TearDownTest() override
Called after running an individual test within this suite.
Definition z_min_max_control_tests.cpp:68
Runtime configuration for TestSuites.
Definition test_suite.h:23