nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
set_vertex_data_tests.h
1#ifndef NXDK_PGRAPH_TESTS_SET_VERTEX_DATA_TESTS_H
2#define NXDK_PGRAPH_TESTS_SET_VERTEX_DATA_TESTS_H
3
4#include <pbkit/nv_regs.h>
5
6#include <memory>
7#include <vector>
8
9#include "test_suite.h"
10
11namespace PBKitPlusPlus {
12struct Color;
13class VertexBuffer;
14} // namespace PBKitPlusPlus
15
16class TestHost;
17
18using namespace PBKitPlusPlus;
19
20// Tests behavior of various SET_VERTEX_DATAX methods.
22 public:
23 enum SetFunction {
24 FUNC_2F_M = NV097_SET_VERTEX_DATA2F_M,
25 FUNC_4F_M = NV097_SET_VERTEX_DATA4F_M,
26 FUNC_2S = NV097_SET_VERTEX_DATA2S,
27 FUNC_4UB = NV097_SET_VERTEX_DATA4UB,
28 FUNC_4S_M = NV097_SET_VERTEX_DATA4S_M,
29 };
30
31 public:
32 SetVertexDataTests(TestHost& host, std::string output_dir, const Config& config);
33
34 void Initialize() override;
35
36 private:
37 void CreateGeometry();
38 void Test(SetFunction func, const Color& diffuse, bool saturate_signed);
39
40 static std::string MakeTestName(SetFunction func, bool saturate_signed);
41
42 std::shared_ptr<VertexBuffer> diffuse_buffer_;
43 std::shared_ptr<VertexBuffer> lit_buffer_;
44 std::shared_ptr<VertexBuffer> lit_buffer_negative_;
45};
46
47#endif // NXDK_PGRAPH_TESTS_SET_VERTEX_DATA_TESTS_H
Definition set_vertex_data_tests.h:21
void Initialize() override
Called to initialize the test suite.
Definition set_vertex_data_tests.cpp:27
Definition test_host.h:33
Definition test_suite.h:20
Runtime configuration for TestSuites.
Definition test_suite.h:23