nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
zpass_pixel_count_tests.h
1#ifndef NXDK_PGRAPH_TESTS_ZPASS_PIXEL_COUNT_TESTS_H
2#define NXDK_PGRAPH_TESTS_ZPASS_PIXEL_COUNT_TESTS_H
3
4#include <pbkit/pbkit.h>
5
6#include <cstdint>
7#include <memory>
8#include <string>
9
10#include "test_suite.h"
11
12class TestHost;
13
18 // From xemu
19 // https://github.com/xemu-project/xemu/blob/c67843384031e0edaab3db91ec496464b931789b/hw/xbox/nv2a/pgraph/pgraph.c#L3128
20 struct ZPassReport {
21 uint64_t timestamp;
22 uint32_t report;
23 uint32_t reserved; // xemu calls this "done" but always sets it to zero. HW also seems to always set this to zero.
24 };
25
26 public:
27 ZPassPixelCountTests(TestHost &host, std::string output_dir, const Config &config);
28
29 void Initialize() override;
30 void Deinitialize() override;
31
32 private:
33 void Test();
34
35 void TestPointSize(uint32_t point_size);
36 void TestPointSizeProgrammable(uint32_t point_size);
37
38 void TestLineWidth(uint32_t line_width);
39
40 private:
41 struct s_CtxDma semaphore_dma_ctx_{};
42 struct s_CtxDma report_dma_ctx_{};
43
44 uint32_t *semaphore_context_object_{nullptr};
45 ZPassReport *report_context_object_{nullptr};
46};
47
48#endif // NXDK_PGRAPH_TESTS_ZPASS_PIXEL_COUNT_TESTS_H
Definition test_host.h:33
Definition test_suite.h:20
Definition zpass_pixel_count_tests.h:17
void Initialize() override
Called to initialize the test suite.
Definition zpass_pixel_count_tests.cpp:65
void Deinitialize() override
Called to tear down the test suite.
Definition zpass_pixel_count_tests.cpp:88
Runtime configuration for TestSuites.
Definition test_suite.h:23