Home | History | Annotate | Download | only in libshaderc_util

Lines Matching defs:Stage

150   // Shader pipeline stage.
152 enum class Stage {
160 enum { kNumStages = int(Stage::Compute) + 1 };
162 // Returns a std::array of all the Stage values.
163 const std::array<Stage, kNumStages>& stages() const {
164 static std::array<Stage, kNumStages> values{
165 {Stage::Vertex, Stage::TessEval, Stage::TessControl, Stage::Geometry,
166 Stage::Fragment, Stage::Compute}};
236 for (auto stage : stages()) {
237 SetAutoBindingBaseForStage(stage, kind, base);
242 // for uniform resources of the given type for a specific shader stage. The
244 void SetAutoBindingBaseForStage(Stage stage, UniformKind kind,
246 auto_binding_base_[static_cast<int>(stage)][static_cast<int>(kind)] = base;
260 for (auto stage : stages()) {
261 SetHlslRegisterSetAndBindingForStage(stage, reg, set, binding);
266 // shader stage. For example,
267 // SetHlslRegisterSetAndBinding(Stage::Fragment, "t1", "4", "5")
271 void SetHlslRegisterSetAndBindingForStage(Stage stage, const std::string& reg,
274 hlsl_explicit_bindings_[static_cast<int>(stage)].push_back(reg);
275 hlsl_explicit_bindings_[static_cast<int>(stage)].push_back(set);
276 hlsl_explicit_bindings_[static_cast<int>(stage)].push_back(binding);
281 // If the forced_shader stage parameter is not EShLangCount then
282 // the shader is assumed to be of the given stage.
289 // not been forced and the stage can not be determined
374 // Determines the shader stage from pragmas embedded in the source text if
376 // stage deduced. If no #pragma directives for shader stage exist, it's
433 // The base binding number per uniform type, per stage, used when automatically
456 // Converts a valid Glslang shader stage value to a Compiler::Stage value.
457 inline Compiler::Stage ConvertToStage(EShLanguage stage) {
458 switch (stage) {
460 return Compiler::Stage::Vertex;
462 return Compiler::Stage::TessEval;
464 return Compiler::Stage::TessControl;
466 return Compiler::Stage::Geometry;
468 return Compiler::Stage::Fragment;
470 return Compiler::Stage::Compute;
475 return Compiler::Stage::Compute;