5#ifndef FLUTTER_LIB_GPU_SHADER_H_
6#define FLUTTER_LIB_GPU_SHADER_H_
24 DEFINE_WRAPPERTYPEINFO();
34 const std::string&
name)
const;
45 std::string library_id,
46 std::string entrypoint,
48 std::shared_ptr<fml::Mapping> code_mapping,
49 std::vector<impeller::ShaderStageIOSlot> inputs,
50 std::vector<impeller::ShaderStageBufferLayout> layouts,
51 std::unordered_map<std::string, UniformBinding> uniform_structs,
52 std::unordered_map<std::string, TextureBinding> uniform_textures,
53 std::vector<impeller::DescriptorSetLayout> descriptor_set_layouts);
78 const std::vector<impeller::ShaderStageIOSlot>&
GetStageInputs()
const;
91 const std::string&
name)
const;
100 std::string library_id_;
101 std::string entrypoint_;
103 std::shared_ptr<fml::Mapping> code_mapping_;
104 std::vector<impeller::ShaderStageIOSlot> inputs_;
105 std::vector<impeller::ShaderStageBufferLayout> layouts_;
106 std::unordered_map<std::string, UniformBinding> uniform_structs_;
107 std::unordered_map<std::string, TextureBinding> uniform_textures_;
108 std::vector<impeller::DescriptorSetLayout> descriptor_set_layouts_;
109 bool is_dirty_ =
true;
113 std::string GetScopedName()
const;
130 Dart_Handle struct_name_handle);
135 Dart_Handle struct_name_handle,
136 Dart_Handle member_name_handle);
An immutable collection of shaders loaded from a shader bundle asset.
const Shader::UniformBinding * GetUniformStruct(const std::string &name) const
impeller::ShaderStage GetShaderStage() const
bool IsRegistered(Context &context)
bool RegisterSync(Context &context)
void ResetFrom(Shader &other)
const std::vector< impeller::ShaderStageIOSlot > & GetStageInputs() const
std::shared_ptr< impeller::VertexDescriptor > CreateVertexDescriptor() const
static fml::RefPtr< Shader > Make(std::string library_id, std::string entrypoint, impeller::ShaderStage stage, std::shared_ptr< fml::Mapping > code_mapping, std::vector< impeller::ShaderStageIOSlot > inputs, std::vector< impeller::ShaderStageBufferLayout > layouts, std::unordered_map< std::string, UniformBinding > uniform_structs, std::unordered_map< std::string, TextureBinding > uniform_textures, std::vector< impeller::DescriptorSetLayout > descriptor_set_layouts)
const std::vector< impeller::ShaderStageBufferLayout > & GetStageBufferLayouts() const
const std::vector< impeller::DescriptorSetLayout > & GetDescriptorSetLayouts() const
const Shader::TextureBinding * GetUniformTexture(const std::string &name) const
std::shared_ptr< const impeller::ShaderFunction > GetFunctionFromLibrary(impeller::ShaderLibrary &library)
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
FLUTTER_GPU_EXPORT int InternalFlutterGpu_Shader_GetUniformMemberOffset(flutter::gpu::Shader *wrapper, Dart_Handle struct_name_handle, Dart_Handle member_name_handle)
FLUTTER_GPU_EXPORT bool InternalFlutterGpu_Shader_DebugIsDirty(flutter::gpu::Shader *wrapper)
FLUTTER_GPU_EXPORT int InternalFlutterGpu_Shader_GetUniformStructSize(flutter::gpu::Shader *wrapper, Dart_Handle struct_name_handle)
#define FLUTTER_GPU_EXPORT
DEF_SWITCHES_START aot vmservice shared library name
#define FML_FRIEND_MAKE_REF_COUNTED(T)
std::shared_ptr< ContextGLES > context
impeller::SampledImageSlot slot
impeller::ShaderMetadata metadata
Metadata required to bind a combined texture and sampler.