mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 01:44:53 +00:00
Merge pull request #287 from polybiusproxy/dev
gnmdriver: Implement shader functions
This commit is contained in:
commit
c49afb4c17
8 changed files with 216 additions and 60 deletions
|
@ -13,10 +13,12 @@ std::string_view StageName(Stage stage) {
|
|||
switch (stage) {
|
||||
case Stage::Vertex:
|
||||
return "vs";
|
||||
case Stage::TessellationControl:
|
||||
return "tcs";
|
||||
case Stage::TessellationEval:
|
||||
return "tes";
|
||||
case Stage::Local:
|
||||
return "ls";
|
||||
case Stage::Export:
|
||||
return "es";
|
||||
case Stage::Hull:
|
||||
return "hs";
|
||||
case Stage::Geometry:
|
||||
return "gs";
|
||||
case Stage::Fragment:
|
||||
|
|
|
@ -17,11 +17,12 @@ namespace Shader {
|
|||
static constexpr size_t NumUserDataRegs = 16;
|
||||
|
||||
enum class Stage : u32 {
|
||||
Vertex,
|
||||
TessellationControl,
|
||||
TessellationEval,
|
||||
Geometry,
|
||||
Fragment,
|
||||
Vertex,
|
||||
Geometry,
|
||||
Export,
|
||||
Hull,
|
||||
Local,
|
||||
Compute,
|
||||
};
|
||||
constexpr u32 MaxStageTypes = 6;
|
||||
|
@ -204,7 +205,7 @@ struct fmt::formatter<Shader::Stage> {
|
|||
return ctx.begin();
|
||||
}
|
||||
auto format(const Shader::Stage& stage, format_context& ctx) const {
|
||||
constexpr static std::array names = {"vs", "tc", "te", "gs", "fs", "cs"};
|
||||
constexpr static std::array names = {"fs", "vs", "gs", "es", "hs", "ls", "cs"};
|
||||
return fmt::format_to(ctx.out(), "{}", names[static_cast<size_t>(stage)]);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue