diff options
| author | 2021-06-24 02:41:09 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:39 -0400 | |
| commit | 7dafa96ab59892b7f1fbffdb61e4326e6443955f (patch) | |
| tree | 5ab58d56860db635542ea1ec24be258bd86b40b9 /src/shader_recompiler/shader_info.h | |
| parent | vk_graphics_pipeline: Implement conservative rendering (diff) | |
| download | yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar.gz yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar.xz yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.zip | |
shader: Rework varyings and implement passthrough geometry shaders
Put all varyings into a single std::bitset with helpers to access it.
Implement passthrough geometry shaders using host's.
Diffstat (limited to 'src/shader_recompiler/shader_info.h')
| -rw-r--r-- | src/shader_recompiler/shader_info.h | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/src/shader_recompiler/shader_info.h b/src/shader_recompiler/shader_info.h index a20e15d2e..4ef4dbd40 100644 --- a/src/shader_recompiler/shader_info.h +++ b/src/shader_recompiler/shader_info.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "shader_recompiler/frontend/ir/type.h" | 11 | #include "shader_recompiler/frontend/ir/type.h" |
| 12 | #include "shader_recompiler/varying_state.h" | ||
| 12 | 13 | ||
| 13 | #include <boost/container/small_vector.hpp> | 14 | #include <boost/container/small_vector.hpp> |
| 14 | #include <boost/container/static_vector.hpp> | 15 | #include <boost/container/static_vector.hpp> |
| @@ -44,11 +45,6 @@ enum class Interpolation { | |||
| 44 | NoPerspective, | 45 | NoPerspective, |
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| 47 | struct InputVarying { | ||
| 48 | Interpolation interpolation{Interpolation::Smooth}; | ||
| 49 | bool used{false}; | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct ConstantBufferDescriptor { | 48 | struct ConstantBufferDescriptor { |
| 53 | u32 index; | 49 | u32 index; |
| 54 | u32 count; | 50 | u32 count; |
| @@ -121,18 +117,10 @@ struct Info { | |||
| 121 | bool uses_subgroup_shuffles{}; | 117 | bool uses_subgroup_shuffles{}; |
| 122 | std::array<bool, 30> uses_patches{}; | 118 | std::array<bool, 30> uses_patches{}; |
| 123 | 119 | ||
| 124 | std::array<InputVarying, 32> input_generics{}; | 120 | std::array<Interpolation, 32> interpolation{}; |
| 125 | bool loads_primitive_id{}; | 121 | VaryingState loads; |
| 126 | bool loads_position{}; | 122 | VaryingState stores; |
| 127 | bool loads_color_front_diffuse{}; | 123 | VaryingState passthrough; |
| 128 | bool loads_fixed_fnc_textures{}; | ||
| 129 | bool loads_point_coord{}; | ||
| 130 | bool loads_instance_id{}; | ||
| 131 | bool loads_vertex_id{}; | ||
| 132 | bool loads_front_face{}; | ||
| 133 | bool loads_legacy_varyings{}; | ||
| 134 | |||
| 135 | bool loads_tess_coord{}; | ||
| 136 | 124 | ||
| 137 | bool loads_indexed_attributes{}; | 125 | bool loads_indexed_attributes{}; |
| 138 | 126 | ||
| @@ -140,21 +128,6 @@ struct Info { | |||
| 140 | bool stores_sample_mask{}; | 128 | bool stores_sample_mask{}; |
| 141 | bool stores_frag_depth{}; | 129 | bool stores_frag_depth{}; |
| 142 | 130 | ||
| 143 | std::bitset<32> stores_generics{}; | ||
| 144 | bool stores_layer{}; | ||
| 145 | bool stores_viewport_index{}; | ||
| 146 | bool stores_point_size{}; | ||
| 147 | bool stores_position{}; | ||
| 148 | bool stores_color_front_diffuse{}; | ||
| 149 | bool stores_color_front_specular{}; | ||
| 150 | bool stores_color_back_diffuse{}; | ||
| 151 | bool stores_color_back_specular{}; | ||
| 152 | bool stores_fixed_fnc_textures{}; | ||
| 153 | bool stores_clip_distance{}; | ||
| 154 | bool stores_fog_coordinate{}; | ||
| 155 | bool stores_viewport_mask{}; | ||
| 156 | bool stores_legacy_varyings{}; | ||
| 157 | |||
| 158 | bool stores_tess_level_outer{}; | 131 | bool stores_tess_level_outer{}; |
| 159 | bool stores_tess_level_inner{}; | 132 | bool stores_tess_level_inner{}; |
| 160 | 133 | ||