Added parsing for dynamic_enable in lazy shader compilation.
This commit is contained in:
@@ -23,14 +23,6 @@ class shader_program_compiler
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
// compile shader programs for given requirements
|
||||
// cache shader programs with their capabilities
|
||||
// store sstream for creating defines
|
||||
|
||||
// register shader source code
|
||||
// store define types for these shaders as bitmap
|
||||
void register_shader_sources(
|
||||
const dynamic_shader_source_store& shader_sources
|
||||
);
|
||||
@@ -71,7 +63,12 @@ protected:
|
||||
shader_program::metadata_type& metadata
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_feature_toggles_declaration(
|
||||
[[nodiscard]] static bool parse_static_enable_declaration(
|
||||
std::span<const std::string_view> tokens,
|
||||
shader_program::metadata_type& metadata
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_dynamic_enable_declaration(
|
||||
std::span<const std::string_view> tokens,
|
||||
shader_program::metadata_type& metadata
|
||||
);
|
||||
@@ -100,7 +97,8 @@ private:
|
||||
stage = 0,
|
||||
geometry = 1,
|
||||
features = 2,
|
||||
feature_toggles = 3,
|
||||
static_enable = 3,
|
||||
dynamic_enable = 4,
|
||||
invalid = std::numeric_limits<std::size_t>::max()
|
||||
};
|
||||
|
||||
@@ -108,18 +106,19 @@ private:
|
||||
{ "STAGE", metadata_declaration_type::stage },
|
||||
{ "GEOMETRY", metadata_declaration_type::geometry },
|
||||
{ "FEATURES", metadata_declaration_type::features },
|
||||
{ "FEATURE_TOGGLES", metadata_declaration_type::feature_toggles }
|
||||
{ "STATIC_ENABLE", metadata_declaration_type::static_enable }
|
||||
{ "DYNAMIC_ENABLE", metadata_declaration_type::dynamic_enable }
|
||||
};
|
||||
|
||||
inline static auto stage_lookup = ztu::string_lookup<shader_program::stages>{
|
||||
{ "VERTEX", shader_program::stages::vertex },
|
||||
{ "GEOMETRY", shader_program::stages::geometry },
|
||||
{ "FRAGMENT", shader_program::stages::fragment },
|
||||
inline static auto stage_lookup = ztu::string_lookup<shader_program::stage::types>{
|
||||
{ "VERTEX", shader_program::stage::types::vertex },
|
||||
{ "GEOMETRY", shader_program::stage::types::geometry },
|
||||
{ "FRAGMENT", shader_program::stage::types::fragment },
|
||||
};
|
||||
|
||||
inline static auto geometry_lookup = ztu::string_lookup<shader_program::geometries>{
|
||||
{ "MESH", shader_program::geometries::mesh },
|
||||
{ "POINT_CLOUD", shader_program::geometries::point_cloud }
|
||||
inline static auto geometry_lookup = ztu::string_lookup<shader_program::geometry::types>{
|
||||
{ "MESH", shader_program::geometry::types::mesh },
|
||||
{ "POINT_CLOUD", shader_program::geometry::types::point_cloud }
|
||||
};
|
||||
|
||||
inline static auto mesh_feature_lookup = []
|
||||
|
||||
Reference in New Issue
Block a user