Reformat repo to clang-format 7.0 rules

This commit is contained in:
Techjar
2019-05-05 23:48:12 +00:00
parent d347867f2e
commit ff972e3673
208 changed files with 311 additions and 309 deletions

View File

@ -23,4 +23,4 @@ void SetBlendMode();
void ClearScreen(const MathUtil::Rectangle<int>& rc);
void OnPixelFormatChange();
void SetInterlacingMode(const BPCmd& bp);
}
} // namespace BPFunctions

View File

@ -585,4 +585,4 @@ void Prepare()
s_event_sync_gpu = CoreTiming::RegisterEvent("SyncGPUCallback", SyncGPUCallback);
s_syncing_suspended = true;
}
}
} // namespace Fifo

View File

@ -94,7 +94,7 @@ struct hash<PortableVertexDeclaration>
return Common::HashFletcher(reinterpret_cast<const u8*>(&decl), sizeof(decl));
}
};
}
} // namespace std
// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
// is in the respective backend, not here in VideoCommon.

View File

@ -125,4 +125,4 @@ void ClearMessages()
std::lock_guard<std::mutex> lock(s_messages_mutex);
s_messages.clear();
}
}
} // namespace OSD

View File

@ -27,14 +27,14 @@ constexpr u32 CYAN = 0xFF00FFFF;
constexpr u32 GREEN = 0xFF00FF00;
constexpr u32 RED = 0xFFFF0000;
constexpr u32 YELLOW = 0xFFFFFF30;
};
}; // namespace Color
namespace Duration
{
constexpr u32 SHORT = 2000;
constexpr u32 NORMAL = 5000;
constexpr u32 VERY_LONG = 10000;
};
}; // namespace Duration
// On-screen message display (colored yellow by default)
void AddMessage(const std::string& message, u32 ms = Duration::SHORT, u32 rgba = Color::YELLOW);

View File

@ -158,9 +158,8 @@ void PixelShaderManager::SetConstants()
bpmem.tevindref.getTexCoord(stage) | bpmem.tevindref.getTexMap(stage) << 8 | 1 << 16;
// Note: a tevind of zero just happens to be a passthrough, so no need
// to set an extra bit.
constants.pack1[i][2] =
bpmem.tevind[i].hex; // TODO: This match shadergen, but videosw will
// always wrap.
constants.pack1[i][2] = bpmem.tevind[i].hex; // TODO: This match shadergen, but videosw
// will always wrap.
// The ubershader uses tevind != 0 as a condition whether to calculate texcoords,
// even when texture is disabled, instead of the stage < bpmem.genMode.numindstages.

View File

@ -25,4 +25,4 @@ constexpr bool AreBpTexMode0MipmapsEnabled(const T& tm0)
{
return (tm0.min_filter & 3) != 0;
}
}
} // namespace SamplerCommon

View File

@ -1934,14 +1934,13 @@ void TextureCacheBase::ReleaseEFBCopyStagingTexture(std::unique_ptr<AbstractStag
void TextureCacheBase::UninitializeXFBMemory(u8* dst, u32 stride, u32 bytes_per_row,
u32 num_blocks_y)
{
// Originally, we planned on using a 'key color'
// for alpha to address partial xfbs (Mario Strikers / Chicken Little).
// This work was removed since it was unfinished but there
// was still a desire to differentiate between the old and the new approach
// which is why we still set uninitialized xfb memory to fuchsia
// (Y=1,U=254,V=254) instead of dark green (Y=0,U=0,V=0) in YUV
// like is done in the EFB path.
// This comment is indented wrong because of the silly linter, btw.
// Originally, we planned on using a 'key color'
// for alpha to address partial xfbs (Mario Strikers / Chicken Little).
// This work was removed since it was unfinished but there
// was still a desire to differentiate between the old and the new approach
// which is why we still set uninitialized xfb memory to fuchsia
// (Y=1,U=254,V=254) instead of dark green (Y=0,U=0,V=0) in YUV
// like is done in the EFB path.
#if defined(_M_X86) || defined(_M_X86_64)
__m128i sixteenBytes = _mm_set1_epi16((s16)(u16)0xFE01);

View File

@ -197,4 +197,4 @@ void WriteVertexLighting(ShaderCode& out, APIType api_type, const char* world_po
"}\n"
"\n");
}
}
} // namespace UberShader

View File

@ -31,4 +31,4 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
void EnumeratePixelShaderUids(const std::function<void(const PixelShaderUid&)>& callback);
void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host_config,
PixelShaderUid* uid);
}
} // namespace UberShader

View File

@ -25,4 +25,4 @@ VertexShaderUid GetVertexShaderUid();
ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config,
const vertex_ubershader_uid_data* uid_data);
void EnumerateVertexShaderUids(const std::function<void(const VertexShaderUid&)>& callback);
}
} // namespace UberShader

View File

@ -55,7 +55,7 @@ struct hash<VertexLoaderUID>
{
size_t operator()(const VertexLoaderUID& uid) const { return uid.GetHash(); }
};
}
} // namespace std
class VertexLoaderBase
{

View File

@ -91,7 +91,7 @@ struct entry
u64 num_verts;
bool operator<(const entry& other) const { return num_verts > other.num_verts; }
};
}
} // namespace
std::string VertexLoadersToString()
{
@ -295,7 +295,7 @@ NativeVertexFormat* GetCurrentVertexFormat()
return s_current_vtx_fmt;
}
} // namespace
} // namespace VertexLoaderManager
void LoadCPReg(u32 sub_cmd, u32 value, bool is_preprocess)
{

View File

@ -53,4 +53,4 @@ extern u32 position_matrix_index[4];
// VB_HAS_X. Bitmask telling what vertex components are present.
extern u32 g_current_components;
}
} // namespace VertexLoaderManager

View File

@ -102,7 +102,7 @@ struct Normal_Index_Indices3
static const int size = sizeof(I) * 3;
};
}
} // namespace
void VertexLoader_Normal::Init()
{