nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
image_blit_tests.h
1#ifndef NXDK_PGRAPH_TESTS_IMAGE_BLIT_TESTS_H
2#define NXDK_PGRAPH_TESTS_IMAGE_BLIT_TESTS_H
3
4#include <pbkit/pbkit.h>
5
6#include "test_suite.h"
7
8class TestHost;
9
10class ImageBlitTests : public TestSuite {
11 public:
12 struct BlitTest {
13 uint32_t blit_operation;
14 uint32_t buffer_color_format;
15 uint32_t beta;
16 };
17
18 public:
19 ImageBlitTests(TestHost& host, std::string output_dir, const Config& config);
20
21 void Initialize() override;
22 void Deinitialize() override;
23
24 private:
25 void Test(const BlitTest& test);
26 void ImageBlit(uint32_t operation, uint32_t beta, uint32_t source_channel, uint32_t destination_channel,
27 uint32_t surface_format, uint32_t source_pitch, uint32_t destination_pitch, uint32_t source_offset,
28 uint32_t source_x, uint32_t source_y, uint32_t destination_offset, uint32_t destination_x,
29 uint32_t destination_y, uint32_t width, uint32_t height, uint32_t clip_x, uint32_t clip_y,
30 uint32_t clip_width, uint32_t clip_height) const;
31
32 static std::string MakeTestName(const BlitTest& test);
33
34 uint32_t image_pitch_{0};
35 uint32_t image_height_{0};
36 uint8_t* source_image_{nullptr};
37
38 struct s_CtxDma null_ctx_{};
39 struct s_CtxDma image_src_dma_ctx_{};
40 struct s_CtxDma clip_rect_ctx_{};
41 struct s_CtxDma beta_ctx_{};
42 struct s_CtxDma beta4_ctx_{};
43};
44
45#endif // NXDK_PGRAPH_TESTS_IMAGE_BLIT_TESTS_H
Definition image_blit_tests.h:10
void Initialize() override
Called to initialize the test suite.
Definition image_blit_tests.cpp:100
void Deinitialize() override
Called to tear down the test suite.
Definition image_blit_tests.cpp:140
Definition test_host.h:47
Definition test_suite.h:20
Definition image_blit_tests.h:12
Runtime configuration for TestSuites.
Definition test_suite.h:23