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
12class VertexBuffer;
13
60class BlendTests : public TestSuite {
61 public:
62 struct Instruction {
63 const char *name;
64 const char *mask;
65 const char *swizzle;
66 const uint32_t instruction[4];
67 };
68
69 public:
70 BlendTests(TestHost &host, std::string output_dir, const Config &config);
71
72 void Initialize() override;
73
74 private:
75 void Test(const std::string &name, uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
76
78 void DrawAlphaStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
79
81 void DrawColorStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
82
84 void DrawColorAndAlphaStack(uint32_t blend_function, uint32_t src_factor, uint32_t dst_factor);
85
86 void DrawCheckerboardBackground() const;
89 void DrawQuad(float left, float top, float right, float bottom, uint32_t color, uint32_t func, uint32_t sfactor,
90 uint32_t dfactor, bool blend_rgb, bool blend_alpha) const;
91
92 void RenderToTextureStart(uint32_t stage, uint32_t texture_pitch) const;
93 void RenderToTextureEnd() const;
94};
95
96#endif // NXDK_PGRAPH_TESTS_BLEND_TESTS_H
Definition blend_tests.h:60
void Initialize() override
Called to initialize the test suite.
Definition blend_tests.cpp:90
Definition test_host.h:47
Definition test_suite.h:20
Definition vertex_buffer.h:204
Definition blend_tests.h:62
Runtime configuration for TestSuites.
Definition test_suite.h:23
Definition texture_format.h:8