diff --git a/plugins/GSdx/GS.h b/plugins/GSdx/GS.h index a080a3a72e..80b0d5b51a 100644 --- a/plugins/GSdx/GS.h +++ b/plugins/GSdx/GS.h @@ -21,6 +21,9 @@ #pragma once +// This file is filled with stuff that breaks clang-format +// clang-format off + #define PLUGIN_VERSION 0 #define VM_SIZE 4194304u diff --git a/plugins/GSdx/GSTables.cpp b/plugins/GSdx/GSTables.cpp index aad7360eae..e7177c7b5c 100644 --- a/plugins/GSdx/GSTables.cpp +++ b/plugins/GSdx/GSTables.cpp @@ -19,6 +19,8 @@ * */ +// clang-format off + #include "stdafx.h" #include "GSTables.h" diff --git a/plugins/GSdx/GSVector4.h b/plugins/GSdx/GSVector4.h index e4c0e14ffb..8eabc7fc70 100644 --- a/plugins/GSdx/GSVector4.h +++ b/plugins/GSdx/GSVector4.h @@ -868,6 +868,8 @@ GSVector.h:2973:15: error: shadows template parm 'int i' return GSVector4(_mm_cmple_ps(v1, v2)); } + // clang-format off + #define VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, ws, wn) \ __forceinline GSVector4 xs##ys##zs##ws() const { return GSVector4(_mm_shuffle_ps(m, m, _MM_SHUFFLE(wn, zn, yn, xn))); } \ __forceinline GSVector4 xs##ys##zs##ws(const GSVector4& v) const { return GSVector4(_mm_shuffle_ps(m, v.m, _MM_SHUFFLE(wn, zn, yn, xn))); } \ @@ -895,6 +897,8 @@ GSVector.h:2973:15: error: shadows template parm 'int i' VECTOR4_SHUFFLE_1(z, 2) VECTOR4_SHUFFLE_1(w, 3) + // clang-format on + #if _M_SSE >= 0x501 __forceinline GSVector4 broadcast32() const diff --git a/plugins/GSdx/GSVector4i.h b/plugins/GSdx/GSVector4i.h index 03f731aae1..258a218244 100644 --- a/plugins/GSdx/GSVector4i.h +++ b/plugins/GSdx/GSVector4i.h @@ -1952,6 +1952,8 @@ public: return (v1 < v2) | (v1 == v2); } + // clang-format off + #define VECTOR4i_SHUFFLE_4(xs, xn, ys, yn, zs, zn, ws, wn) \ __forceinline GSVector4i xs##ys##zs##ws() const {return GSVector4i(_mm_shuffle_epi32(m, _MM_SHUFFLE(wn, zn, yn, xn)));} \ __forceinline GSVector4i xs##ys##zs##ws##l() const {return GSVector4i(_mm_shufflelo_epi16(m, _MM_SHUFFLE(wn, zn, yn, xn)));} \ @@ -1981,6 +1983,8 @@ public: VECTOR4i_SHUFFLE_1(z, 2) VECTOR4i_SHUFFLE_1(w, 3) + // clang-format on + __forceinline static GSVector4i zero() { return GSVector4i(_mm_setzero_si128()); } __forceinline static GSVector4i xffffffff() { return zero() == zero(); } diff --git a/plugins/GSdx/GSVector8.h b/plugins/GSdx/GSVector8.h index 262c21232f..8db01f6211 100644 --- a/plugins/GSdx/GSVector8.h +++ b/plugins/GSdx/GSVector8.h @@ -800,12 +800,13 @@ public: return GSVector8(_mm256_cmp_ps(v1, v2, _CMP_LE_OQ)); } + // clang-format off + // x = v[31:0] / v[159:128] // y = v[63:32] / v[191:160] // z = v[95:64] / v[223:192] // w = v[127:96] / v[255:224] - #define VECTOR8_SHUFFLE_4(xs, xn, ys, yn, zs, zn, ws, wn) \ __forceinline GSVector8 xs##ys##zs##ws() const { return GSVector8(_mm256_shuffle_ps(m, m, _MM_SHUFFLE(wn, zn, yn, xn))); } \ __forceinline GSVector8 xs##ys##zs##ws(const GSVector8& v) const { return GSVector8(_mm256_shuffle_ps(m, v.m, _MM_SHUFFLE(wn, zn, yn, xn))); } @@ -892,6 +893,8 @@ public: VECTOR8_PERMUTE64_1(c, 2) VECTOR8_PERMUTE64_1(d, 3) + // clang-format on + __forceinline GSVector8 permute32(const GSVector8i& mask) const { return GSVector8(_mm256_permutevar8x32_ps(m, mask)); diff --git a/plugins/GSdx/GSVector8i.h b/plugins/GSdx/GSVector8i.h index 42e963690c..76c3818f05 100644 --- a/plugins/GSdx/GSVector8i.h +++ b/plugins/GSdx/GSVector8i.h @@ -1512,6 +1512,8 @@ public: return (v1 < v2) | (v1 == v2); } + // clang-format off + // x = v[31:0] / v[159:128] // y = v[63:32] / v[191:160] // z = v[95:64] / v[223:192] @@ -1600,6 +1602,8 @@ public: VECTOR8i_PERMUTE64_1(c, 2) VECTOR8i_PERMUTE64_1(d, 3) + // clang-format on + __forceinline GSVector8i permute32(const GSVector8i& mask) const { return GSVector8i(_mm256_permutevar8x32_epi32(m, mask)); diff --git a/plugins/GSdx/Renderers/OpenGL/glext_extra.h b/plugins/GSdx/Renderers/OpenGL/glext_extra.h index ac6b917d79..33595d916a 100644 --- a/plugins/GSdx/Renderers/OpenGL/glext_extra.h +++ b/plugins/GSdx/Renderers/OpenGL/glext_extra.h @@ -31,6 +31,8 @@ ** https://github.com/KhronosGroup/OpenGL-Registry */ +// clang-format off + #ifdef __cplusplus extern "C" { #endif diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index c449cfacff..3c730facc6 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -1,3 +1,5 @@ +// clang-format off + //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by GSdx.rc diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index 5ad31ca7dc..f4cc2f800e 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -117,6 +117,9 @@ typedef int64 sint64; #include #include +// Don't un-indent our ifdefs +// clang-format off + #ifdef _WIN32 // Note use GL/glcorearb.h on the future diff --git a/plugins/GSdx/xbyak/xbyak.h b/plugins/GSdx/xbyak/xbyak.h index 5cff351160..e611ebce44 100644 --- a/plugins/GSdx/xbyak/xbyak.h +++ b/plugins/GSdx/xbyak/xbyak.h @@ -26,6 +26,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +// We want to keep this file similar to the original xbyak +// clang-format off + #pragma once #ifndef XBYAK_XBYAK_H_ #define XBYAK_XBYAK_H_ diff --git a/plugins/GSdx/xbyak/xbyak_mnemonic.h b/plugins/GSdx/xbyak/xbyak_mnemonic.h index 07e78bc27d..5de3ea0ccc 100644 --- a/plugins/GSdx/xbyak/xbyak_mnemonic.h +++ b/plugins/GSdx/xbyak/xbyak_mnemonic.h @@ -26,6 +26,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +// We want to keep this file similar to the original xbyak +// clang-format off + const char *getVersionString() const { return "5.11"; } void adc(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x10, 2); } void adc(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x10); } diff --git a/plugins/GSdx/xbyak/xbyak_util.h b/plugins/GSdx/xbyak/xbyak_util.h index 346cc8164b..5f59c14115 100644 --- a/plugins/GSdx/xbyak/xbyak_util.h +++ b/plugins/GSdx/xbyak/xbyak_util.h @@ -29,6 +29,9 @@ #ifndef XBYAK_XBYAK_UTIL_H_ #define XBYAK_XBYAK_UTIL_H_ +// We want to keep this file similar to the original xbyak +// clang-format off + /** utility class and functions for Xbyak Xbyak::util::Clock ; rdtsc timer