diff options
| author | 2021-07-25 11:39:04 -0700 | |
|---|---|---|
| committer | 2021-07-25 11:39:04 -0700 | |
| commit | 98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f (patch) | |
| tree | 816faa96c2c4d291825063433331a8ea4b3d08f1 /src/shader_recompiler/runtime_info.h | |
| parent | Merge pull request #6699 from lat9nq/common-threads (diff) | |
| parent | shader: Support out of bound local memory reads and immediate writes (diff) | |
| download | yuzu-98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f.tar.gz yuzu-98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f.tar.xz yuzu-98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f.zip | |
Merge pull request #6585 from ameerj/hades
Shader Decompiler Rewrite
Diffstat (limited to 'src/shader_recompiler/runtime_info.h')
| -rw-r--r-- | src/shader_recompiler/runtime_info.h | 88 |
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 | |||
| 15 | namespace Shader { | ||
| 16 | |||
| 17 | enum class AttributeType : u8 { | ||
| 18 | Float, | ||
| 19 | SignedInt, | ||
| 20 | UnsignedInt, | ||
| 21 | Disabled, | ||
| 22 | }; | ||
| 23 | |||
| 24 | enum class InputTopology { | ||
| 25 | Points, | ||
| 26 | Lines, | ||
| 27 | LinesAdjacency, | ||
| 28 | Triangles, | ||
| 29 | TrianglesAdjacency, | ||
| 30 | }; | ||
| 31 | |||
| 32 | enum class CompareFunction { | ||
| 33 | Never, | ||
| 34 | Less, | ||
| 35 | Equal, | ||
| 36 | LessThanEqual, | ||
| 37 | Greater, | ||
| 38 | NotEqual, | ||
| 39 | GreaterThanEqual, | ||
| 40 | Always, | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum class TessPrimitive { | ||
| 44 | Isolines, | ||
| 45 | Triangles, | ||
| 46 | Quads, | ||
| 47 | }; | ||
| 48 | |||
| 49 | enum class TessSpacing { | ||
| 50 | Equal, | ||
| 51 | FractionalOdd, | ||
| 52 | FractionalEven, | ||
| 53 | }; | ||
| 54 | |||
| 55 | struct TransformFeedbackVarying { | ||
| 56 | u32 buffer{}; | ||
| 57 | u32 stride{}; | ||
| 58 | u32 offset{}; | ||
| 59 | u32 components{}; | ||
| 60 | }; | ||
| 61 | |||
| 62 | struct 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 | ||