diff options
| author | 2021-06-16 03:22:56 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:38 -0400 | |
| commit | 0ffea97e2ea2c8f58928e13dc2488d620ea98ea8 (patch) | |
| tree | d297ca549a7c6dfb9fddb514cbd1f38422087f02 /src/shader_recompiler/runtime_info.h | |
| parent | shader: Add support for native 16-bit floats (diff) | |
| download | yuzu-0ffea97e2ea2c8f58928e13dc2488d620ea98ea8.tar.gz yuzu-0ffea97e2ea2c8f58928e13dc2488d620ea98ea8.tar.xz yuzu-0ffea97e2ea2c8f58928e13dc2488d620ea98ea8.zip | |
shader: Split profile and runtime info headers
Diffstat (limited to 'src/shader_recompiler/runtime_info.h')
| -rw-r--r-- | src/shader_recompiler/runtime_info.h | 83 |
1 files changed, 83 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..d4b047b4d --- /dev/null +++ b/src/shader_recompiler/runtime_info.h | |||
| @@ -0,0 +1,83 @@ | |||
| 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 <optional> | ||
| 9 | #include <vector> | ||
| 10 | |||
| 11 | #include "common/common_types.h" | ||
| 12 | |||
| 13 | namespace Shader { | ||
| 14 | |||
| 15 | enum class AttributeType : u8 { | ||
| 16 | Float, | ||
| 17 | SignedInt, | ||
| 18 | UnsignedInt, | ||
| 19 | Disabled, | ||
| 20 | }; | ||
| 21 | |||
| 22 | enum class InputTopology { | ||
| 23 | Points, | ||
| 24 | Lines, | ||
| 25 | LinesAdjacency, | ||
| 26 | Triangles, | ||
| 27 | TrianglesAdjacency, | ||
| 28 | }; | ||
| 29 | |||
| 30 | enum class CompareFunction { | ||
| 31 | Never, | ||
| 32 | Less, | ||
| 33 | Equal, | ||
| 34 | LessThanEqual, | ||
| 35 | Greater, | ||
| 36 | NotEqual, | ||
| 37 | GreaterThanEqual, | ||
| 38 | Always, | ||
| 39 | }; | ||
| 40 | |||
| 41 | enum class TessPrimitive { | ||
| 42 | Isolines, | ||
| 43 | Triangles, | ||
| 44 | Quads, | ||
| 45 | }; | ||
| 46 | |||
| 47 | enum class TessSpacing { | ||
| 48 | Equal, | ||
| 49 | FractionalOdd, | ||
| 50 | FractionalEven, | ||
| 51 | }; | ||
| 52 | |||
| 53 | struct TransformFeedbackVarying { | ||
| 54 | u32 buffer{}; | ||
| 55 | u32 stride{}; | ||
| 56 | u32 offset{}; | ||
| 57 | u32 components{}; | ||
| 58 | }; | ||
| 59 | |||
| 60 | struct RuntimeInfo { | ||
| 61 | std::array<AttributeType, 32> generic_input_types{}; | ||
| 62 | bool convert_depth_mode{}; | ||
| 63 | bool force_early_z{}; | ||
| 64 | |||
| 65 | TessPrimitive tess_primitive{}; | ||
| 66 | TessSpacing tess_spacing{}; | ||
| 67 | bool tess_clockwise{}; | ||
| 68 | |||
| 69 | InputTopology input_topology{}; | ||
| 70 | |||
| 71 | std::optional<float> fixed_state_point_size; | ||
| 72 | std::optional<CompareFunction> alpha_test_func; | ||
| 73 | float alpha_test_reference{}; | ||
| 74 | |||
| 75 | // Static y negate value | ||
| 76 | bool y_negate{}; | ||
| 77 | // Use storage buffers instead of global pointers on GLASM | ||
| 78 | bool glasm_use_storage_buffers{}; | ||
| 79 | |||
| 80 | std::vector<TransformFeedbackVarying> xfb_varyings; | ||
| 81 | }; | ||
| 82 | |||
| 83 | } // namespace Shader | ||