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:
72 void Test(const std::string &name, uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
73
75 void DrawAlphaStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
76
78 void DrawColorStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
79
81 void DrawColorAndAlphaStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
82
83 void DrawCheckerboardBackground() const;
86 void DrawQuad(float left, float top, float right, float bottom, uint32_t color, uint32_t func, uint32_t sfactor,
87 uint32_t dfactor, bool blend_rgb, bool blend_alpha) const;
88
89 void RenderToTextureStart(uint32_t stage, uint32_t texture_pitch) const;
90 void RenderToTextureEnd() const;
91};
92
93#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:90
Definition test_host.h:33
Definition test_suite.h:20
Definition blend_tests.h:59
Runtime configuration for TestSuites.
Definition test_suite.h:23