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 entrypoint,
47 std::shared_ptr<fml::Mapping> code_mapping,
48 std::vector<impeller::ShaderStageIOSlot> inputs,
49 std::vector<impeller::ShaderStageBufferLayout> layouts,
50 std::unordered_map<std::string, UniformBinding> uniform_structs,
51 std::unordered_map<std::string, TextureBinding> uniform_textures,
52 std::vector<impeller::DescriptorSetLayout> descriptor_set_layouts);
71 const std::string&
name)
const;
76 std::string entrypoint_;
78 std::shared_ptr<fml::Mapping> code_mapping_;
79 std::vector<impeller::ShaderStageIOSlot> inputs_;
80 std::vector<impeller::ShaderStageBufferLayout> layouts_;
81 std::unordered_map<std::string, UniformBinding> uniform_structs_;
82 std::unordered_map<std::string, TextureBinding> uniform_textures_;
83 std::vector<impeller::DescriptorSetLayout> descriptor_set_layouts_;
100 Dart_Handle struct_name_handle);
105 Dart_Handle struct_name_handle,
106 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
static fml::RefPtr< Shader > Make(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)
bool IsRegistered(Context &context)
bool RegisterSync(Context &context)
std::shared_ptr< impeller::VertexDescriptor > CreateVertexDescriptor() 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)
#define FLUTTER_GPU_EXPORT
FLUTTER_GPU_EXPORT int InternalFlutterGpu_Shader_GetUniformMemberOffset(flutter::gpu::Shader *wrapper, Dart_Handle struct_name_handle, Dart_Handle member_name_handle)
FLUTTER_GPU_EXPORT int InternalFlutterGpu_Shader_GetUniformStructSize(flutter::gpu::Shader *wrapper, Dart_Handle struct_name_handle)
DEF_SWITCHES_START aot vmservice shared library name
#define FML_FRIEND_MAKE_REF_COUNTED(T)
impeller::SampledImageSlot slot
impeller::ShaderMetadata metadata
Metadata required to bind a combined texture and sampler.