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
11struct Color;
12class TestHost;
13class VertexBuffer;
14
15// Tests behavior of various SET_VERTEX_DATAX methods.
17 public:
18 enum SetFunction {
19 FUNC_2F_M = NV097_SET_VERTEX_DATA2F_M,
20 FUNC_4F_M = NV097_SET_VERTEX_DATA4F_M,
21 FUNC_2S = NV097_SET_VERTEX_DATA2S,
22 FUNC_4UB = NV097_SET_VERTEX_DATA4UB,
23 FUNC_4S_M = NV097_SET_VERTEX_DATA4S_M,
24 };
25
26 public:
27 SetVertexDataTests(TestHost& host, std::string output_dir, const Config& config);
28
29 void Initialize() override;
30
31 private:
32 void CreateGeometry();
33 void Test(SetFunction func, const Color& diffuse, bool saturate_signed);
34
35 static std::string MakeTestName(SetFunction func, bool saturate_signed);
36
37 std::shared_ptr<VertexBuffer> diffuse_buffer_;
38 std::shared_ptr<VertexBuffer> lit_buffer_;
39 std::shared_ptr<VertexBuffer> lit_buffer_negative_;
40};
41
42#endif // NXDK_PGRAPH_TESTS_SET_VERTEX_DATA_TESTS_H
Definition set_vertex_data_tests.h:16
void Initialize() override
Called to initialize the test suite.
Definition set_vertex_data_tests.cpp:27
Definition test_host.h:47
Definition test_suite.h:20
Definition vertex_buffer.h:204
Definition vertex_buffer.h:161
Runtime configuration for TestSuites.
Definition test_suite.h:23