nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
blend_tests.h
1#ifndef NXDK_PGRAPH_TESTS_BLEND_TESTS_H
2#define NXDK_PGRAPH_TESTS_BLEND_TESTS_H
3
4#include <functional>
5#include <memory>
6#include <string>
7
8#include "test_host.h"
9#include "test_suite.h"
10
57class BlendTests : public TestSuite {
58 public:
59 struct Instruction {
60 const char *name;
61 const char *mask;
62 const char *swizzle;
63 const uint32_t instruction[4];
64 };
65
66 public:
67 BlendTests(TestHost &host, std::string output_dir, const Config &config);
68
69 void Initialize() override;
70
71 private:
73 void Test(const std::string &name, uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
74
76 void DrawAlphaStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
77
79 void DrawColorStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
80
82 void DrawColorAndAlphaStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
83
84 void DrawCheckerboardBackground() const;
87 void DrawQuad(float left, float top, float right, float bottom, uint32_t color, uint32_t func, uint32_t sfactor,
88 uint32_t dfactor, bool blend_rgb, bool blend_alpha) const;
89
90 void RenderToTextureStart(uint32_t stage, uint32_t texture_pitch) const;
91 void RenderToTextureEnd() const;
92};
93
94#endif // NXDK_PGRAPH_TESTS_BLEND_TESTS_H
Definition blend_tests.h:57
void Initialize() override
Called to initialize the test suite.
Definition blend_tests.cpp:93
Definition test_host.h:33
Definition test_suite.h:20
Definition blend_tests.h:59
Runtime configuration for TestSuites.
Definition test_suite.h:23