summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/runtime_info.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/runtime_info.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/shader_recompiler/runtime_info.h b/src/shader_recompiler/runtime_info.h
new file mode 100644
index 000000000..f3f83a258
--- /dev/null
+++ b/src/shader_recompiler/runtime_info.h
@@ -0,0 +1,88 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <array>
8#include <bitset>
9#include <optional>
10#include <vector>
11
12#include "common/common_types.h"
13#include "shader_recompiler/varying_state.h"
14
15namespace Shader {
16
17enum class AttributeType : u8 {
18 Float,
19 SignedInt,
20 UnsignedInt,
21 Disabled,
22};
23
24enum class InputTopology {
25 Points,
26 Lines,
27 LinesAdjacency,
28 Triangles,
29 TrianglesAdjacency,
30};
31
32enum class CompareFunction {
33 Never,
34 Less,
35 Equal,
36 LessThanEqual,
37 Greater,
38 NotEqual,
39 GreaterThanEqual,
40 Always,
41};
42
43enum class TessPrimitive {
44 Isolines,
45 Triangles,
46 Quads,
47};
48
49enum class TessSpacing {
50 Equal,
51 FractionalOdd,
52 FractionalEven,
53};
54
55struct TransformFeedbackVarying {
56 u32 buffer{};
57 u32 stride{};
58 u32 offset{};
59 u32 components{};
60};
61
62struct RuntimeInfo {
63 std::array<AttributeType, 32> generic_input_types{};
64 VaryingState previous_stage_stores;
65
66 bool convert_depth_mode{};
67 bool force_early_z{};
68
69 TessPrimitive tess_primitive{};
70 TessSpacing tess_spacing{};
71 bool tess_clockwise{};
72
73 InputTopology input_topology{};
74
75 std::optional<float> fixed_state_point_size;
76 std::optional<CompareFunction> alpha_test_func;
77 float alpha_test_reference{};
78
79 /// Static Y negate value
80 bool y_negate{};
81 /// Use storage buffers instead of global pointers on GLASM
82 bool glasm_use_storage_buffers{};
83
84 /// Transform feedback state for each varying
85 std::vector<TransformFeedbackVarying> xfb_varyings;
86};
87
88} // namespace Shader