class ShaderProgramFactory

Defined at line 19 of file ../../src/ui/lib/escher/vk/shader_program_factory.h

ShaderProgramFactory is a |Trait| that clients use to obtain ShaderPrograms.

Subclasses must override GetProgram(), and will typically lazily-generate and

cache these programs.

Public Methods

ShaderProgramPtr GetComputeProgram (std::string compute_shader_path, ShaderVariantArgs args)

Return a compute program whose code is specified by |compute_shader_path|.

Defined at line 13 of file ../../src/ui/lib/escher/vk/shader_program_factory.cc

ShaderProgramPtr GetGraphicsProgram (std::string vertex_shader_path, std::string fragment_shader_path, ShaderVariantArgs args)

Return a graphics program which has only vertex and fragment shader stages;

The fragment shader path may be empty: this is used for depth-only passes.

Defined at line 24 of file ../../src/ui/lib/escher/vk/shader_program_factory.cc

ShaderProgramPtr GetGraphicsProgram (std::string vertex_shader_path, std::string tessellation_control_shader_path, std::string tessellation_evaluation_shader_path, std::string geometry_shader_path, std::string fragment_shader_path, ShaderVariantArgs args)

Return a graphics program containing all shader stages that a non-empty

path is provided for.

Defined at line 45 of file ../../src/ui/lib/escher/vk/shader_program_factory.cc

ShaderProgramPtr GetProgram (ShaderProgramData program_data)

Convenience helper function that calls the pure virtual function |GetProgram|. Can be used

for both compute and graphics shaders.

Defined at line 36 of file ../../src/ui/lib/escher/vk/shader_program_factory.cc

Protected Methods

void ~ShaderProgramFactory ()

Defined at line 11 of file ../../src/ui/lib/escher/vk/shader_program_factory.cc

ShaderProgramPtr GetProgramImpl (const std::string[6] shader_paths, ShaderVariantArgs args)

Subclasses must implement this. The array index of each path corresponds

to a value in the ShaderStage enum; each non-empty path provides the source

code for the corresponding shader stage.