diff options
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 2f645b441..790a2789a 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -708,28 +708,52 @@ void DumpTevStageConfig(const std::array<Pica::Regs::TevStageConfig,6>& stages) | |||
| 708 | const auto& tev_stage = stages[index]; | 708 | const auto& tev_stage = stages[index]; |
| 709 | 709 | ||
| 710 | static const std::map<Source, std::string> source_map = { | 710 | static const std::map<Source, std::string> source_map = { |
| 711 | { Source::PrimaryColor, "PrimaryColor" }, | 711 | { Source::PrimaryColor, "PrimaryColor" }, |
| 712 | { Source::Texture0, "Texture0" }, | 712 | { Source::PrimaryFragmentColor, "PrimaryFragmentColor" }, |
| 713 | { Source::Texture1, "Texture1" }, | 713 | { Source::SecondaryFragmentColor, "SecondaryFragmentColor" }, |
| 714 | { Source::Texture2, "Texture2" }, | 714 | { Source::Texture0, "Texture0" }, |
| 715 | { Source::Constant, "Constant" }, | 715 | { Source::Texture1, "Texture1" }, |
| 716 | { Source::Previous, "Previous" }, | 716 | { Source::Texture2, "Texture2" }, |
| 717 | { Source::Texture3, "Texture3" }, | ||
| 718 | { Source::PreviousBuffer, "PreviousBuffer" }, | ||
| 719 | { Source::Constant, "Constant" }, | ||
| 720 | { Source::Previous, "Previous" }, | ||
| 717 | }; | 721 | }; |
| 718 | 722 | ||
| 719 | static const std::map<ColorModifier, std::string> color_modifier_map = { | 723 | static const std::map<ColorModifier, std::string> color_modifier_map = { |
| 720 | { ColorModifier::SourceColor, { "%source.rgb" } }, | 724 | { ColorModifier::SourceColor, "%source.rgb" }, |
| 721 | { ColorModifier::SourceAlpha, { "%source.aaa" } }, | 725 | { ColorModifier::OneMinusSourceColor, "(1.0 - %source.rgb)" }, |
| 726 | { ColorModifier::SourceAlpha, "%source.aaa" }, | ||
| 727 | { ColorModifier::OneMinusSourceAlpha, "(1.0 - %source.aaa)" }, | ||
| 728 | { ColorModifier::SourceRed, "%source.rrr" }, | ||
| 729 | { ColorModifier::OneMinusSourceRed, "(1.0 - %source.rrr)" }, | ||
| 730 | { ColorModifier::SourceGreen, "%source.ggg" }, | ||
| 731 | { ColorModifier::OneMinusSourceGreen, "(1.0 - %source.ggg)" }, | ||
| 732 | { ColorModifier::SourceBlue, "%source.bbb" }, | ||
| 733 | { ColorModifier::OneMinusSourceBlue, "(1.0 - %source.bbb)" }, | ||
| 722 | }; | 734 | }; |
| 735 | |||
| 723 | static const std::map<AlphaModifier, std::string> alpha_modifier_map = { | 736 | static const std::map<AlphaModifier, std::string> alpha_modifier_map = { |
| 724 | { AlphaModifier::SourceAlpha, "%source.a" }, | 737 | { AlphaModifier::SourceAlpha, "%source.a" }, |
| 725 | { AlphaModifier::OneMinusSourceAlpha, "(255 - %source.a)" }, | 738 | { AlphaModifier::OneMinusSourceAlpha, "(1.0 - %source.a)" }, |
| 739 | { AlphaModifier::SourceRed, "%source.r" }, | ||
| 740 | { AlphaModifier::OneMinusSourceRed, "(1.0 - %source.r)" }, | ||
| 741 | { AlphaModifier::SourceGreen, "%source.g" }, | ||
| 742 | { AlphaModifier::OneMinusSourceGreen, "(1.0 - %source.g)" }, | ||
| 743 | { AlphaModifier::SourceBlue, "%source.b" }, | ||
| 744 | { AlphaModifier::OneMinusSourceBlue, "(1.0 - %source.b)" }, | ||
| 726 | }; | 745 | }; |
| 727 | 746 | ||
| 728 | static const std::map<Operation, std::string> combiner_map = { | 747 | static const std::map<Operation, std::string> combiner_map = { |
| 729 | { Operation::Replace, "%source1" }, | 748 | { Operation::Replace, "%source1" }, |
| 730 | { Operation::Modulate, "(%source1 * %source2) / 255" }, | 749 | { Operation::Modulate, "(%source1 * %source2)" }, |
| 731 | { Operation::Add, "(%source1 + %source2)" }, | 750 | { Operation::Add, "(%source1 + %source2)" }, |
| 732 | { Operation::Lerp, "lerp(%source1, %source2, %source3)" }, | 751 | { Operation::AddSigned, "(%source1 + %source2) - 0.5" }, |
| 752 | { Operation::Lerp, "lerp(%source1, %source2, %source3)" }, | ||
| 753 | { Operation::Subtract, "(%source1 - %source2)" }, | ||
| 754 | { Operation::Dot3_RGB, "dot(%source1, %source2)" }, | ||
| 755 | { Operation::MultiplyThenAdd, "((%source1 * %source2) + %source3)" }, | ||
| 756 | { Operation::AddThenMultiply, "((%source1 + %source2) * %source3)" }, | ||
| 733 | }; | 757 | }; |
| 734 | 758 | ||
| 735 | static auto ReplacePattern = | 759 | static auto ReplacePattern = |