summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorTechjar <tecknojar@gmail.com>2019-05-05 23:48:12 +0000
committerTechjar <tecknojar@gmail.com>2019-05-06 18:48:04 +0000
commitff972e3673cf70c67e5daf52d5cc913b1df7a1ba (patch)
tree4392c427ebeb64fd4aba1bdafb1959dc03dbfeb9 /Source/Core/VideoCommon
parentd347867f2e4153c86535ef5e6eed6efa49818d65 (diff)
Reformat repo to clang-format 7.0 rules
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/BPFunctions.h2
-rw-r--r--Source/Core/VideoCommon/Fifo.cpp2
-rw-r--r--Source/Core/VideoCommon/NativeVertexFormat.h2
-rw-r--r--Source/Core/VideoCommon/OnScreenDisplay.cpp2
-rw-r--r--Source/Core/VideoCommon/OnScreenDisplay.h4
-rw-r--r--Source/Core/VideoCommon/PixelShaderManager.cpp5
-rw-r--r--Source/Core/VideoCommon/SamplerCommon.h2
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp15
-rw-r--r--Source/Core/VideoCommon/UberShaderCommon.cpp2
-rw-r--r--Source/Core/VideoCommon/UberShaderPixel.h2
-rw-r--r--Source/Core/VideoCommon/UberShaderVertex.h2
-rw-r--r--Source/Core/VideoCommon/VertexLoaderBase.h2
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.cpp4
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.h2
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Normal.cpp2
15 files changed, 24 insertions, 26 deletions
diff --git a/Source/Core/VideoCommon/BPFunctions.h b/Source/Core/VideoCommon/BPFunctions.h
index 93fd5b0d78..9f8625233a 100644
--- a/Source/Core/VideoCommon/BPFunctions.h
+++ b/Source/Core/VideoCommon/BPFunctions.h
@@ -23,4 +23,4 @@ void SetBlendMode();
void ClearScreen(const MathUtil::Rectangle<int>& rc);
void OnPixelFormatChange();
void SetInterlacingMode(const BPCmd& bp);
-}
+} // namespace BPFunctions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp
index c0cbf234ab..36a9ee7307 100644
--- a/Source/Core/VideoCommon/Fifo.cpp
+++ b/Source/Core/VideoCommon/Fifo.cpp
@@ -585,4 +585,4 @@ void Prepare()
s_event_sync_gpu = CoreTiming::RegisterEvent("SyncGPUCallback", SyncGPUCallback);
s_syncing_suspended = true;
}
-}
+} // namespace Fifo
diff --git a/Source/Core/VideoCommon/NativeVertexFormat.h b/Source/Core/VideoCommon/NativeVertexFormat.h
index b7c3477a60..415ee965d9 100644
--- a/Source/Core/VideoCommon/NativeVertexFormat.h
+++ b/Source/Core/VideoCommon/NativeVertexFormat.h
@@ -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.
diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp
index d6f9b38a3e..9df93cfc16 100644
--- a/Source/Core/VideoCommon/OnScreenDisplay.cpp
+++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp
@@ -125,4 +125,4 @@ void ClearMessages()
std::lock_guard<std::mutex> lock(s_messages_mutex);
s_messages.clear();
}
-}
+} // namespace OSD
diff --git a/Source/Core/VideoCommon/OnScreenDisplay.h b/Source/Core/VideoCommon/OnScreenDisplay.h
index 51358aff19..20d563d7ba 100644
--- a/Source/Core/VideoCommon/OnScreenDisplay.h
+++ b/Source/Core/VideoCommon/OnScreenDisplay.h
@@ -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);
diff --git a/Source/Core/VideoCommon/PixelShaderManager.cpp b/Source/Core/VideoCommon/PixelShaderManager.cpp
index 7799a0abcb..50b58b3c9e 100644
--- a/Source/Core/VideoCommon/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/PixelShaderManager.cpp
@@ -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.
diff --git a/Source/Core/VideoCommon/SamplerCommon.h b/Source/Core/VideoCommon/SamplerCommon.h
index f0fdcf5767..a16ba0fcd4 100644
--- a/Source/Core/VideoCommon/SamplerCommon.h
+++ b/Source/Core/VideoCommon/SamplerCommon.h
@@ -25,4 +25,4 @@ constexpr bool AreBpTexMode0MipmapsEnabled(const T& tm0)
{
return (tm0.min_filter & 3) != 0;
}
-}
+} // namespace SamplerCommon
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index f6c9fdc407..fcf4c945f9 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -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);
diff --git a/Source/Core/VideoCommon/UberShaderCommon.cpp b/Source/Core/VideoCommon/UberShaderCommon.cpp
index 65299200f8..b815e13c16 100644
--- a/Source/Core/VideoCommon/UberShaderCommon.cpp
+++ b/Source/Core/VideoCommon/UberShaderCommon.cpp
@@ -197,4 +197,4 @@ void WriteVertexLighting(ShaderCode& out, APIType api_type, const char* world_po
"}\n"
"\n");
}
-}
+} // namespace UberShader
diff --git a/Source/Core/VideoCommon/UberShaderPixel.h b/Source/Core/VideoCommon/UberShaderPixel.h
index 344cc4e032..7b96d7952f 100644
--- a/Source/Core/VideoCommon/UberShaderPixel.h
+++ b/Source/Core/VideoCommon/UberShaderPixel.h
@@ -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
diff --git a/Source/Core/VideoCommon/UberShaderVertex.h b/Source/Core/VideoCommon/UberShaderVertex.h
index daebaa3f77..cbbcb1459e 100644
--- a/Source/Core/VideoCommon/UberShaderVertex.h
+++ b/Source/Core/VideoCommon/UberShaderVertex.h
@@ -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
diff --git a/Source/Core/VideoCommon/VertexLoaderBase.h b/Source/Core/VideoCommon/VertexLoaderBase.h
index 5e1ffc4fd2..29b53d3c58 100644
--- a/Source/Core/VideoCommon/VertexLoaderBase.h
+++ b/Source/Core/VideoCommon/VertexLoaderBase.h
@@ -55,7 +55,7 @@ struct hash<VertexLoaderUID>
{
size_t operator()(const VertexLoaderUID& uid) const { return uid.GetHash(); }
};
-}
+} // namespace std
class VertexLoaderBase
{
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp
index 673569f4d9..4fd7e164d7 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp
@@ -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)
{
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.h b/Source/Core/VideoCommon/VertexLoaderManager.h
index b46d354e7d..b408d46e10 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.h
+++ b/Source/Core/VideoCommon/VertexLoaderManager.h
@@ -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
diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
index b746f4f5d0..06b80c10f3 100644
--- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
@@ -102,7 +102,7 @@ struct Normal_Index_Indices3
static const int size = sizeof(I) * 3;
};
-}
+} // namespace
void VertexLoader_Normal::Init()
{