nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
texture_render_target_tests.h
1#ifndef NXDK_PGRAPH_TESTS_TEXTURE_RENDER_TARGET_TESTS_H
2#define NXDK_PGRAPH_TESTS_TEXTURE_RENDER_TARGET_TESTS_H
3
4#include <memory>
5#include <string>
6
7#include "test_host.h"
8#include "test_suite.h"
9
11class VertexBuffer;
12
14 public:
15 TextureRenderTargetTests(TestHost &host, std::string output_dir, const Config &config);
16
17 void Initialize() override;
18 void Deinitialize() override;
19
20 private:
21 void CreateGeometry();
22
23 void Test(const TextureFormatInfo &texture_format);
24 void TestPalettized(TestHost::PaletteSize size);
25
26 void ResetAndDrawFromRenderTarget() const;
27
28 static std::string MakeTestName(const TextureFormatInfo &texture_format);
29 static std::string MakePalettizedTestName(TestHost::PaletteSize size);
30
31 private:
32 struct s_CtxDma texture_target_ctx_{};
33 uint8_t *render_target_{nullptr};
34
35 std::shared_ptr<VertexBuffer> render_target_vertex_buffer_;
36 std::shared_ptr<VertexBuffer> framebuffer_vertex_buffer_;
37};
38
39#endif // NXDK_PGRAPH_TESTS_TEXTURE_RENDER_TARGET_TESTS_H
Definition test_host.h:47
PaletteSize
Palette size for palettized surfaces.
Definition test_host.h:194
Definition test_suite.h:20
Definition texture_render_target_tests.h:13
void Initialize() override
Called to initialize the test suite.
Definition texture_render_target_tests.cpp:69
void Deinitialize() override
Called to tear down the test suite.
Definition texture_render_target_tests.cpp:91
Definition vertex_buffer.h:204
Runtime configuration for TestSuites.
Definition test_suite.h:23
Definition texture_format.h:8