shader: Unify shader stage types

This commit is contained in:
ReinUsesLisp 2021-06-23 02:41:00 -03:00 committed by ameerj
parent 257d2aab74
commit 395bed3a0a
15 changed files with 37 additions and 55 deletions

View file

@ -9,13 +9,20 @@
namespace Shader {
enum class Stage : u32 {
Compute,
VertexA,
VertexB,
TessellationControl,
TessellationEval,
Geometry,
Fragment,
Compute,
VertexA,
};
constexpr u32 MaxStageTypes = 6;
[[nodiscard]] constexpr Stage StageFromIndex(size_t index) noexcept {
return static_cast<Stage>(static_cast<size_t>(Stage::VertexB) + index);
}
} // namespace Shader