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
15class ImageBlitTests : public TestSuite {
16 public:
17 struct BlitTest {
18 uint32_t blit_operation;
19 uint32_t buffer_color_format;
20 uint32_t beta;
21 };
22
23 public:
24 ImageBlitTests(TestHost& host, std::string output_dir, const Config& config);
25
26 void Initialize() override;
27 void Deinitialize() override;
28
29 private:
30 void Test(const BlitTest& test);
31 void TestWithClipRectangle(const BlitTest& test, uint32_t clip_x, uint32_t clip_y, uint32_t clip_w, uint32_t clip_h);
32
33 void ImageBlit(uint32_t operation, uint32_t beta, uint32_t source_channel, uint32_t destination_channel,
34 uint32_t surface_format, uint32_t source_pitch, uint32_t destination_pitch, uint32_t source_offset,
35 uint32_t source_x, uint32_t source_y, uint32_t destination_offset, uint32_t destination_x,
36 uint32_t destination_y, uint32_t width, uint32_t height, uint32_t clip_x, uint32_t clip_y,
37 uint32_t clip_width, uint32_t clip_height) const;
38
39 void TestDirtyOverlappedDestinationSurface();
40
43 void TestBlitRenderBlit();
44
45 uint32_t image_pitch_{0};
46 uint32_t image_height_{0};
47 uint8_t* source_image_{nullptr};
48
49 struct s_CtxDma null_ctx_{};
50 struct s_CtxDma image_src_dma_ctx_{};
51 struct s_CtxDma clip_rect_ctx_{};
52 struct s_CtxDma beta_ctx_{};
53 struct s_CtxDma beta4_ctx_{};
54 struct s_CtxDma render_target_dma_ctx_{};
55};
56
57#endif // NXDK_PGRAPH_TESTS_IMAGE_BLIT_TESTS_H
Definition image_blit_tests.h:15
void Initialize() override
Called to initialize the test suite.
Definition image_blit_tests.cpp:156
void Deinitialize() override
Called to tear down the test suite.
Definition image_blit_tests.cpp:201
Definition test_host.h:33
Definition test_suite.h:20
Definition image_blit_tests.h:17
Runtime configuration for TestSuites.
Definition test_suite.h:23