From 5fcb4bb3ab2e19d3ee95c08c6f86ba68656c6357 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Fri, 24 Jun 2016 12:16:10 +0200 Subject: [PATCH] Further fixes to the formatting change. WX sucks. --- .../Common/GL/GLExtensions/GLExtensions.cpp | 2 +- Source/Core/Common/StringUtil.cpp | 2 +- Source/Core/Core/DSP/Jit/DSPJitArithmetic.cpp | 8 ++--- Source/Core/Core/HW/GCMemcard.h | 4 +-- .../Core/HW/WiimoteReal/WiimoteRealBase.h | 2 +- .../Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp | 2 +- Source/Core/Core/NetPlayServer.h | 1 + .../Core/PowerPC/Jit64IL/JitIL_Tables.cpp | 22 +++++++------- Source/Core/Core/PowerPC/JitILCommon/IR.cpp | 4 +-- .../DolphinWX/Debugger/BreakpointWindow.cpp | 4 ++- Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 5 +++- .../Core/DolphinWX/Debugger/WatchWindow.cpp | 4 ++- Source/Core/DolphinWX/FrameAui.cpp | 4 +++ Source/Core/DolphinWX/TASInputDlg.cpp | 4 +-- Source/Core/VideoCommon/Debugger.cpp | 10 +++---- Source/Core/VideoCommon/PixelShaderGen.cpp | 29 +++++++++---------- 16 files changed, 59 insertions(+), 48 deletions(-) diff --git a/Source/Core/Common/GL/GLExtensions/GLExtensions.cpp b/Source/Core/Common/GL/GLExtensions/GLExtensions.cpp index 62b33d9140..591792468e 100644 --- a/Source/Core/Common/GL/GLExtensions/GLExtensions.cpp +++ b/Source/Core/Common/GL/GLExtensions/GLExtensions.cpp @@ -650,7 +650,7 @@ PFNDOLGETINTEGER64I_VPROC dolGetInteger64i_v; PFNDOLDRAWARRAYSINSTANCEDBASEINSTANCEPROC dolDrawArraysInstancedBaseInstance; PFNDOLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC dolDrawElementsInstancedBaseInstance; PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC - dolDrawElementsInstancedBaseVertexBaseInstance; +dolDrawElementsInstancedBaseVertexBaseInstance; PFNDOLGETINTERNALFORMATIVPROC dolGetInternalformativ; PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC dolGetActiveAtomicCounterBufferiv; PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture; diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 1e3eab1c4b..6f50afce3e 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -23,9 +23,9 @@ #ifdef _WIN32 #include #else +#include #include #include -#include #endif #if !defined(_WIN32) && !defined(ANDROID) diff --git a/Source/Core/Core/DSP/Jit/DSPJitArithmetic.cpp b/Source/Core/Core/DSP/Jit/DSPJitArithmetic.cpp index 6fc39fdc24..0ae98eb363 100644 --- a/Source/Core/Core/DSP/Jit/DSPJitArithmetic.cpp +++ b/Source/Core/Core/DSP/Jit/DSPJitArithmetic.cpp @@ -178,7 +178,7 @@ void DSPEmitter::cmp(const UDSPInstruction opc) // s64 res = dsp_convert_long_acc(acc0 - acc1); SUB(64, R(RAX), R(RDX)); // Update_SR_Register64(res, isCarry2(acc0, res), isOverflow(acc0, -acc1, res)); // CF -> - //influence on ABS/0xa100 + // influence on ABS/0xa100 NEG(64, R(RDX)); Update_SR_Register64_Carry(EAX, tmp1, true); gpr.PutXReg(tmp1); @@ -232,7 +232,7 @@ void DSPEmitter::cmpi(const UDSPInstruction opc) get_long_acc(reg, tmp1); MOV(64, R(RAX), R(tmp1)); // s64 imm = (s64)(s16)dsp_fetch_code() << 16; // Immediate is considered to be at M level in - //the 40-bit accumulator. + // the 40-bit accumulator. u16 imm = dsp_imem_read(compilePC + 1); MOV(64, R(RDX), Imm64((s64)(s16)imm << 16)); // s64 res = dsp_convert_long_acc(val - imm); @@ -1172,7 +1172,7 @@ void DSPEmitter::lsr16(const UDSPInstruction opc) // u64 acc = dsp_get_long_acc(areg); get_long_acc(areg); // acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake accum - //causes + // causes // acc >>= 16; SHR(64, R(RAX), Imm8(16)); AND(64, R(RAX), Imm32(0xffffff)); @@ -1252,7 +1252,7 @@ void DSPEmitter::lsr(const UDSPInstruction opc) if (shift) { // acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake - //accum causes + // accum causes SHL(64, R(RAX), Imm8(24)); // acc >>= shift; SHR(64, R(RAX), Imm8(shift + 24)); diff --git a/Source/Core/Core/HW/GCMemcard.h b/Source/Core/Core/HW/GCMemcard.h index b729e307df..b4c850ea30 100644 --- a/Source/Core/Core/HW/GCMemcard.h +++ b/Source/Core/Core/HW/GCMemcard.h @@ -192,8 +192,8 @@ struct DEntry // 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner // u8 Filename[DENTRY_STRLEN]; // 0x08 0x20 Filename - u8 ModTime[4]; // 0x28 0x04 Time of file's last modification in seconds since 12am, - // January 1st, 2000 + u8 ModTime[4]; // 0x28 0x04 Time of file's last modification in seconds since 12am, + // January 1st, 2000 u8 ImageOffset[4]; // 0x2c 0x04 image data offset u8 IconFmt[2]; // 0x30 0x02 icon gfx format (2bits per icon) // Bits Description diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteRealBase.h b/Source/Core/Core/HW/WiimoteReal/WiimoteRealBase.h index 8df3838141..092eda0504 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteRealBase.h +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteRealBase.h @@ -15,8 +15,8 @@ #define NS_ENUM_AVAILABLE(...) // end hack #import -#include #include +#include #elif defined(__linux__) && HAVE_BLUEZ #include #endif diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp index fccf14c51f..8c1cbdaa4a 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -847,7 +847,7 @@ IPCCommandResult CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) // used for maxcount (allocated mem?) // called with 1 inbuffer after deleting a titleid //_dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETSTOREDTMD no out - //buffer"); + // buffer"); u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address); u32 MaxCount = 0; diff --git a/Source/Core/Core/NetPlayServer.h b/Source/Core/Core/NetPlayServer.h index 3af57d9cc3..52a8f6424b 100644 --- a/Source/Core/Core/NetPlayServer.h +++ b/Source/Core/Core/NetPlayServer.h @@ -12,6 +12,7 @@ #include #include #include +#include "Common/FifoQueue.h" #include "Common/Timer.h" #include "Common/TraversalClient.h" #include "Core/NetPlayProto.h" diff --git a/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp b/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp index 26aa37c642..da452e1b7d 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp @@ -179,27 +179,27 @@ static GekkoOPTemplate table31[] = { {266, &JitIL::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, {778, &JitIL::addx}, //"addox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, {10, &JitIL::FallBackToInterpreter}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_SET_CA | FL_RC_BIT}}, + // FL_SET_CA | FL_RC_BIT}}, {522, &JitIL::FallBackToInterpreter}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_SET_CA | FL_RC_BIT}}, + // FL_SET_CA | FL_RC_BIT}}, {138, &JitIL::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA //| FL_RC_BIT}}, {650, &JitIL::addex}, //"addeox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA //| FL_RC_BIT}}, {234, &JitIL::FallBackToInterpreter}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, + // FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, {746, &JitIL::FallBackToInterpreter}, //"addmeox" {202, &JitIL::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | - //FL_SET_CA | FL_RC_BIT}}, + // FL_SET_CA | FL_RC_BIT}}, {714, &JitIL::addzex}, //"addzeox" {491, &JitIL::FallBackToInterpreter}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_RC_BIT, 39}}, + // FL_RC_BIT, 39}}, {1003, &JitIL::FallBackToInterpreter}, //"divwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_RC_BIT, 39}}, + // FL_RC_BIT, 39}}, {459, &JitIL::divwux}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, {971, &JitIL::divwux}, //"divwuox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, {75, &JitIL::FallBackToInterpreter}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_RC_BIT, 4}}, + // FL_RC_BIT, 4}}, {11, &JitIL::mulhwux}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, {235, &JitIL::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, {747, &JitIL::mullwx}, //"mullwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, @@ -212,13 +212,13 @@ static GekkoOPTemplate table31[] = { {520, &JitIL::subfcx}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, {136, &JitIL::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | - //FL_SET_CA | FL_RC_BIT}}, + // FL_SET_CA | FL_RC_BIT}}, {648, &JitIL::subfex}, //"subfeox" {232, &JitIL::FallBackToInterpreter}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, + // FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, {744, &JitIL::FallBackToInterpreter}, //"subfmeox" {200, &JitIL::FallBackToInterpreter}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | - //FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, + // FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, {712, &JitIL::FallBackToInterpreter}, //"subfzeox" {28, &JitIL::boolX}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, @@ -270,7 +270,7 @@ static GekkoOPTemplate table31[] = { // Conditional load/store (Wii SMP) {150, &JitIL::FallBackToInterpreter}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}}, {20, &JitIL::FallBackToInterpreter}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | - //FL_SET_CR0}}, + // FL_SET_CR0}}, // load string (interpret these) {533, &JitIL::FallBackToInterpreter}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}}, diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 02e423672d..6fe5843c8c 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -478,7 +478,7 @@ InstLoc IRBuilder::FoldAdd(InstLoc Op1, InstLoc Op2) // && isImm(*getOp2(Op1)) && isImm(*getOp2(Op2))) //{ // return FoldMul(getOp1(Op1), EmitIntConst(GetImmValue(getOp2(Op1)) + - //GetImmValue(getOp2(Op2)))); + // GetImmValue(getOp2(Op2)))); //} // x + x * i0 => x * (i0 + 1) @@ -616,7 +616,7 @@ InstLoc IRBuilder::FoldSub(InstLoc Op1, InstLoc Op2) // isImm(*getOp2(Op2))) //{ // return FoldMul(getOp1(Op1), EmitIntConst(GetImmValue(getOp2(Op1)) + - //GetImmValue(getOp2(Op2)))); + // GetImmValue(getOp2(Op2)))); //} } diff --git a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp index 30dd67ead1..8469e1ed02 100644 --- a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp @@ -2,12 +2,14 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +// clang-format off +#include #include #include -#include #include #include #include +// clang-format on #include "Common/BreakPoints.h" #include "Common/CommonTypes.h" diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index 3bdcdbe397..38dd15cfed 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -5,8 +5,10 @@ #include #include #include -#include + +// clang-format off #include +#include #include #include #include @@ -17,6 +19,7 @@ #include #include #include +// clang-format on #include "Common/BreakPoints.h" #include "Common/CommonTypes.h" diff --git a/Source/Core/DolphinWX/Debugger/WatchWindow.cpp b/Source/Core/DolphinWX/Debugger/WatchWindow.cpp index 915a244f48..ce92d7e656 100644 --- a/Source/Core/DolphinWX/Debugger/WatchWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/WatchWindow.cpp @@ -4,9 +4,11 @@ #include -#include +// clang-format off #include +#include #include +// clang-format on #include "Common/FileUtil.h" #include "Common/IniFile.h" diff --git a/Source/Core/DolphinWX/FrameAui.cpp b/Source/Core/DolphinWX/FrameAui.cpp index e4b341e414..65297eb471 100644 --- a/Source/Core/DolphinWX/FrameAui.cpp +++ b/Source/Core/DolphinWX/FrameAui.cpp @@ -5,6 +5,9 @@ #include #include #include + +// clang-format off +#include #include #include #include @@ -18,6 +21,7 @@ #include #include #include +// clang-format on #include "Common/CommonTypes.h" #include "Common/FileUtil.h" diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp index 84a7ca94e3..edad81cc59 100644 --- a/Source/Core/DolphinWX/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/TASInputDlg.cpp @@ -669,9 +669,9 @@ void TASInputDlg::GetKeyBoardInput(u8* data, WiimoteEmu::ReportFeatures rptf, in // u16 y = irData[1] | ((irData[2] >> 6 & 0x3) << 8); // SetStickValue(&m_main_stick.x_cont.set_by_keyboard, &m_main_stick.x_cont.value, - //m_main_stick.x_cont.text, x, 561); + // m_main_stick.x_cont.text, x, 561); // SetStickValue(&m_main_stick.y_cont.set_by_keyboard, &m_main_stick.y_cont.value, - //m_main_stick.y_cont.text, y, 486); + // m_main_stick.y_cont.text, y, 486); //} if (extData && ext == 1) diff --git a/Source/Core/VideoCommon/Debugger.cpp b/Source/Core/VideoCommon/Debugger.cpp index 86f3f99345..4dbaa1865a 100644 --- a/Source/Core/VideoCommon/Debugger.cpp +++ b/Source/Core/VideoCommon/Debugger.cpp @@ -88,7 +88,7 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path) { output = "Destination alpha disabled:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_NONE, g_ActiveConfig.backend_info.APIType, - ///g_nativeVertexFmt->m_components); + /// g_nativeVertexFmt->m_components); } else { @@ -96,16 +96,16 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path) { output = "Using dual source blending for destination alpha:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_DUAL_SOURCE_BLEND, - ///g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); + /// g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); } else { output = "Using two passes for emulating destination alpha:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_NONE, g_ActiveConfig.backend_info.APIType, - ///g_nativeVertexFmt->m_components); + /// g_nativeVertexFmt->m_components); output += "\n\nDestination alpha pass shader:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_ALPHA_PASS, - ///g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); + /// g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); } } @@ -119,7 +119,7 @@ void GFXDebuggerBase::DumpVertexShader(const std::string& path) File::CreateEmptyFile(filename); /// File::WriteStringToFile(GenerateVertexShaderCode(g_nativeVertexFmt->m_components, - ///g_ActiveConfig.backend_info.APIType), filename); + /// g_ActiveConfig.backend_info.APIType), filename); } void GFXDebuggerBase::DumpPixelShaderConstants(const std::string& path) diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index e284e58347..bc5da9a060 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -937,21 +937,20 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE } else { - const char* function_table[] = - { - "((tevin_a.r > tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_GT - "((tevin_a.r == tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_EQ - "((idot(tevin_a.rgb, comp16) > idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_GR16_GT - "((idot(tevin_a.rgb, comp16) == idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_GR16_EQ - "((idot(tevin_a.rgb, comp24) > idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_BGR24_GT - "((idot(tevin_a.rgb, comp24) == idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_BGR24_EQ - "(max(sign(tevin_a.rgb - tevin_b.rgb), int3(0,0,0)) * tevin_c.rgb)", // TEVCMP_RGB8_GT - "((int3(1,1,1) - sign(abs(tevin_a.rgb - tevin_b.rgb))) * tevin_c.rgb)" // TEVCMP_RGB8_EQ - }; + const char* function_table[] = { + "((tevin_a.r > tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_GT + "((tevin_a.r == tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_EQ + "((idot(tevin_a.rgb, comp16) > idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_GR16_GT + "((idot(tevin_a.rgb, comp16) == idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_GR16_EQ + "((idot(tevin_a.rgb, comp24) > idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_BGR24_GT + "((idot(tevin_a.rgb, comp24) == idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_BGR24_EQ + "(max(sign(tevin_a.rgb - tevin_b.rgb), int3(0,0,0)) * tevin_c.rgb)", // TEVCMP_RGB8_GT + "((int3(1,1,1) - sign(abs(tevin_a.rgb - tevin_b.rgb))) * tevin_c.rgb)" // TEVCMP_RGB8_EQ + }; int mode = (cc.shift << 1) | cc.op; out.Write(" tevin_d.rgb + ");