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.
This commit is contained in:
parent
4f052a1f39
commit
7dafa96ab5
29 changed files with 351 additions and 337 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "common/common_types.h"
|
||||
#include "shader_recompiler/frontend/ir/type.h"
|
||||
#include "shader_recompiler/varying_state.h"
|
||||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
#include <boost/container/static_vector.hpp>
|
||||
|
@ -44,11 +45,6 @@ enum class Interpolation {
|
|||
NoPerspective,
|
||||
};
|
||||
|
||||
struct InputVarying {
|
||||
Interpolation interpolation{Interpolation::Smooth};
|
||||
bool used{false};
|
||||
};
|
||||
|
||||
struct ConstantBufferDescriptor {
|
||||
u32 index;
|
||||
u32 count;
|
||||
|
@ -121,18 +117,10 @@ struct Info {
|
|||
bool uses_subgroup_shuffles{};
|
||||
std::array<bool, 30> uses_patches{};
|
||||
|
||||
std::array<InputVarying, 32> input_generics{};
|
||||
bool loads_primitive_id{};
|
||||
bool loads_position{};
|
||||
bool loads_color_front_diffuse{};
|
||||
bool loads_fixed_fnc_textures{};
|
||||
bool loads_point_coord{};
|
||||
bool loads_instance_id{};
|
||||
bool loads_vertex_id{};
|
||||
bool loads_front_face{};
|
||||
bool loads_legacy_varyings{};
|
||||
|
||||
bool loads_tess_coord{};
|
||||
std::array<Interpolation, 32> interpolation{};
|
||||
VaryingState loads;
|
||||
VaryingState stores;
|
||||
VaryingState passthrough;
|
||||
|
||||
bool loads_indexed_attributes{};
|
||||
|
||||
|
@ -140,21 +128,6 @@ struct Info {
|
|||
bool stores_sample_mask{};
|
||||
bool stores_frag_depth{};
|
||||
|
||||
std::bitset<32> stores_generics{};
|
||||
bool stores_layer{};
|
||||
bool stores_viewport_index{};
|
||||
bool stores_point_size{};
|
||||
bool stores_position{};
|
||||
bool stores_color_front_diffuse{};
|
||||
bool stores_color_front_specular{};
|
||||
bool stores_color_back_diffuse{};
|
||||
bool stores_color_back_specular{};
|
||||
bool stores_fixed_fnc_textures{};
|
||||
bool stores_clip_distance{};
|
||||
bool stores_fog_coordinate{};
|
||||
bool stores_viewport_mask{};
|
||||
bool stores_legacy_varyings{};
|
||||
|
||||
bool stores_tess_level_outer{};
|
||||
bool stores_tess_level_inner{};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue