GSdx: Add clang-format off/on to parts clang-format breaks really badly on

This commit is contained in:
TellowKrinkle 2021-04-12 05:10:31 -05:00 committed by tellowkrinkle
parent ae1bc651d6
commit 3db5e42b96
12 changed files with 37 additions and 1 deletions

View File

@ -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

View File

@ -19,6 +19,8 @@
*
*/
// clang-format off
#include "stdafx.h"
#include "GSTables.h"

View File

@ -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

View File

@ -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(); }

View File

@ -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));

View File

@ -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));

View File

@ -31,6 +31,8 @@
** https://github.com/KhronosGroup/OpenGL-Registry
*/
// clang-format off
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,3 +1,5 @@
// clang-format off
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by GSdx.rc

View File

@ -117,6 +117,9 @@ typedef int64 sint64;
#include <unordered_map>
#include <unordered_set>
// Don't un-indent our ifdefs
// clang-format off
#ifdef _WIN32
// Note use GL/glcorearb.h on the future

View File

@ -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_

View File

@ -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); }

View File

@ -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