summaryrefslogtreecommitdiff
path: root/src/video_core/debug_utils
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2016-09-18 18:01:46 -0700
committerGravatar Yuri Kunde Schlesner2016-09-18 21:14:25 -0700
commit396a8d91a4423d9c793eeff0798d544613647511 (patch)
treee0203961233db1ffcbbca2e15154d71d142c5822 /src/video_core/debug_utils
parentTweak formatting settings (diff)
downloadyuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.gz
yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.xz
yuzu-396a8d91a4423d9c793eeff0798d544613647511.zip
Manually tweak source formatting and then re-run clang-format
Diffstat (limited to 'src/video_core/debug_utils')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp37
-rw-r--r--src/video_core/debug_utils/debug_utils.h6
2 files changed, 22 insertions, 21 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 1cb868ead..194e5833c 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -155,7 +155,8 @@ void DumpShader(const std::string& filename, const Regs::ShaderConfig& config,
155 {OutputAttributes::TEXCOORD2_V, {OutputRegisterInfo::TEXCOORD2, 2}}, 155 {OutputAttributes::TEXCOORD2_V, {OutputRegisterInfo::TEXCOORD2, 2}},
156 {OutputAttributes::VIEW_X, {OutputRegisterInfo::VIEW, 1}}, 156 {OutputAttributes::VIEW_X, {OutputRegisterInfo::VIEW, 1}},
157 {OutputAttributes::VIEW_Y, {OutputRegisterInfo::VIEW, 2}}, 157 {OutputAttributes::VIEW_Y, {OutputRegisterInfo::VIEW, 2}},
158 {OutputAttributes::VIEW_Z, {OutputRegisterInfo::VIEW, 4}}}; 158 {OutputAttributes::VIEW_Z, {OutputRegisterInfo::VIEW, 4}},
159 };
159 160
160 for (const auto& semantic : std::vector<OutputAttributes::Semantic>{ 161 for (const auto& semantic : std::vector<OutputAttributes::Semantic>{
161 output_attributes[i].map_x, output_attributes[i].map_y, output_attributes[i].map_z, 162 output_attributes[i].map_x, output_attributes[i].map_y, output_attributes[i].map_z,
@@ -529,14 +530,16 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
529 unsigned table_index = 530 unsigned table_index =
530 static_cast<int>((x < 2) ? table_index_1.Value() : table_index_2.Value()); 531 static_cast<int>((x < 2) ? table_index_1.Value() : table_index_2.Value());
531 532
532 static const std::array<std::array<u8, 2>, 8> etc1_modifier_table = {{{{2, 8}}, 533 static const std::array<std::array<u8, 2>, 8> etc1_modifier_table = {{
533 {{5, 17}}, 534 {{2, 8}},
534 {{9, 29}}, 535 {{5, 17}},
535 {{13, 42}}, 536 {{9, 29}},
536 {{18, 60}}, 537 {{13, 42}},
537 {{24, 80}}, 538 {{18, 60}},
538 {{33, 106}}, 539 {{24, 80}},
539 {{47, 183}}}}; 540 {{33, 106}},
541 {{47, 183}},
542 }};
540 543
541 int modifier = etc1_modifier_table.at(table_index).at(GetTableSubIndex(texel)); 544 int modifier = etc1_modifier_table.at(table_index).at(GetTableSubIndex(texel));
542 if (GetNegationFlag(texel)) 545 if (GetNegationFlag(texel))
@@ -713,9 +716,9 @@ static std::string GetTevStageConfigSourceString(const Pica::Regs::TevStageConfi
713 return src_it->second; 716 return src_it->second;
714} 717}
715 718
716static std::string 719static std::string GetTevStageConfigColorSourceString(
717GetTevStageConfigColorSourceString(const Pica::Regs::TevStageConfig::Source& source, 720 const Pica::Regs::TevStageConfig::Source& source,
718 const Pica::Regs::TevStageConfig::ColorModifier modifier) { 721 const Pica::Regs::TevStageConfig::ColorModifier modifier) {
719 using ColorModifier = Pica::Regs::TevStageConfig::ColorModifier; 722 using ColorModifier = Pica::Regs::TevStageConfig::ColorModifier;
720 static const std::map<ColorModifier, std::string> color_modifier_map = { 723 static const std::map<ColorModifier, std::string> color_modifier_map = {
721 {ColorModifier::SourceColor, "%source.rgb"}, 724 {ColorModifier::SourceColor, "%source.rgb"},
@@ -739,9 +742,9 @@ GetTevStageConfigColorSourceString(const Pica::Regs::TevStageConfig::Source& sou
739 return ReplacePattern(modifier_str, "%source", src_str); 742 return ReplacePattern(modifier_str, "%source", src_str);
740} 743}
741 744
742static std::string 745static std::string GetTevStageConfigAlphaSourceString(
743GetTevStageConfigAlphaSourceString(const Pica::Regs::TevStageConfig::Source& source, 746 const Pica::Regs::TevStageConfig::Source& source,
744 const Pica::Regs::TevStageConfig::AlphaModifier modifier) { 747 const Pica::Regs::TevStageConfig::AlphaModifier modifier) {
745 using AlphaModifier = Pica::Regs::TevStageConfig::AlphaModifier; 748 using AlphaModifier = Pica::Regs::TevStageConfig::AlphaModifier;
746 static const std::map<AlphaModifier, std::string> alpha_modifier_map = { 749 static const std::map<AlphaModifier, std::string> alpha_modifier_map = {
747 {AlphaModifier::SourceAlpha, "%source.a"}, 750 {AlphaModifier::SourceAlpha, "%source.a"},
@@ -763,8 +766,8 @@ GetTevStageConfigAlphaSourceString(const Pica::Regs::TevStageConfig::Source& sou
763 return ReplacePattern(modifier_str, "%source", src_str); 766 return ReplacePattern(modifier_str, "%source", src_str);
764} 767}
765 768
766static std::string 769static std::string GetTevStageConfigOperationString(
767GetTevStageConfigOperationString(const Pica::Regs::TevStageConfig::Operation& operation) { 770 const Pica::Regs::TevStageConfig::Operation& operation) {
768 using Operation = Pica::Regs::TevStageConfig::Operation; 771 using Operation = Pica::Regs::TevStageConfig::Operation;
769 static const std::map<Operation, std::string> combiner_map = { 772 static const std::map<Operation, std::string> combiner_map = {
770 {Operation::Replace, "%source1"}, 773 {Operation::Replace, "%source1"},
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index 1a58f40ff..fe3ed247d 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -87,15 +87,13 @@ public:
87 * @param data Optional data pointer (if unused, this is a nullptr) 87 * @param data Optional data pointer (if unused, this is a nullptr)
88 * @note This function will perform nothing unless it is overridden in the child class. 88 * @note This function will perform nothing unless it is overridden in the child class.
89 */ 89 */
90 virtual void OnPicaBreakPointHit(Event, void*) { 90 virtual void OnPicaBreakPointHit(Event, void*) {}
91 }
92 91
93 /** 92 /**
94 * Action to perform when emulation is resumed from a breakpoint. 93 * Action to perform when emulation is resumed from a breakpoint.
95 * @note This function will perform nothing unless it is overridden in the child class. 94 * @note This function will perform nothing unless it is overridden in the child class.
96 */ 95 */
97 virtual void OnPicaResume() { 96 virtual void OnPicaResume() {}
98 }
99 97
100 protected: 98 protected:
101 /** 99 /**