summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorBhaaL <bhaal@0x1337.org>2017-01-04 12:45:40 +0100
committerBhaaL <bhaal@0x1337.org>2017-01-05 12:55:13 +0100
commit23d99f2f2c6f3e16dce2371141702d07bef40e95 (patch)
tree88d0f4139cc7b56cc6dff3510c242a5cc2c79f15 /Source/Core/VideoBackends
parent41101be545d4e2f10c77503a14b5236c870428ac (diff)
specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles, except for AfterUnion (which is false) when using clang-format -dump-config
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DState.h9
-rw-r--r--Source/Core/VideoBackends/D3D/XFBEncoder.cpp3
-rw-r--r--Source/Core/VideoBackends/D3D12/D3DQueuedCommandList.h3
-rw-r--r--Source/Core/VideoBackends/D3D12/D3DState.h9
-rw-r--r--Source/Core/VideoBackends/OGL/SamplerCache.h3
-rw-r--r--Source/Core/VideoBackends/Vulkan/Constants.h18
6 files changed, 30 insertions, 15 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DState.h b/Source/Core/VideoBackends/D3D/D3DState.h
index a3c439f49d..7da15716e8 100644
--- a/Source/Core/VideoBackends/D3D/D3DState.h
+++ b/Source/Core/VideoBackends/D3D/D3DState.h
@@ -18,13 +18,15 @@ struct ID3D11RasterizerState;
namespace DX11
{
-union RasterizerState {
+union RasterizerState
+{
BitField<0, 2, D3D11_CULL_MODE> cull_mode;
u32 packed;
};
-union BlendState {
+union BlendState
+{
BitField<0, 1, u32> blend_enable;
BitField<1, 3, D3D11_BLEND_OP> blend_op;
BitField<4, 4, u32> write_mask;
@@ -35,7 +37,8 @@ union BlendState {
u32 packed;
};
-union SamplerState {
+union SamplerState
+{
BitField<0, 3, u64> min_filter;
BitField<3, 1, u64> mag_filter;
BitField<4, 8, u64> min_lod;
diff --git a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
index ef106dffa8..7b10b02091 100644
--- a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
+++ b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
@@ -15,7 +15,8 @@
namespace DX11
{
-union XFBEncodeParams {
+union XFBEncodeParams
+{
struct
{
FLOAT Width; // Width and height of encoded XFB in luma pixels
diff --git a/Source/Core/VideoBackends/D3D12/D3DQueuedCommandList.h b/Source/Core/VideoBackends/D3D12/D3DQueuedCommandList.h
index d192ac608d..6acd83dfc9 100644
--- a/Source/Core/VideoBackends/D3D12/D3DQueuedCommandList.h
+++ b/Source/Core/VideoBackends/D3D12/D3DQueuedCommandList.h
@@ -244,7 +244,8 @@ struct D3DQueueItem
{
D3DQueueItemType Type;
- union {
+ union
+ {
SetPipelineStateArguments SetPipelineState;
SetRenderTargetsArguments SetRenderTargets;
SetVertexBuffersArguments SetVertexBuffers;
diff --git a/Source/Core/VideoBackends/D3D12/D3DState.h b/Source/Core/VideoBackends/D3D12/D3DState.h
index 22744ac15d..d6ec652e89 100644
--- a/Source/Core/VideoBackends/D3D12/D3DState.h
+++ b/Source/Core/VideoBackends/D3D12/D3DState.h
@@ -19,13 +19,15 @@ namespace DX12
{
class PipelineStateCacheInserter;
-union RasterizerState {
+union RasterizerState
+{
BitField<0, 2, D3D12_CULL_MODE> cull_mode;
u32 hex;
};
-union BlendState {
+union BlendState
+{
BitField<0, 1, u32> blend_enable;
BitField<1, 3, D3D12_BLEND_OP> blend_op;
BitField<4, 4, u8> write_mask;
@@ -36,7 +38,8 @@ union BlendState {
u32 hex;
};
-union SamplerState {
+union SamplerState
+{
BitField<0, 3, u32> min_filter;
BitField<3, 1, u32> mag_filter;
BitField<4, 8, u32> min_lod;
diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.h b/Source/Core/VideoBackends/OGL/SamplerCache.h
index a579591387..232f253949 100644
--- a/Source/Core/VideoBackends/OGL/SamplerCache.h
+++ b/Source/Core/VideoBackends/OGL/SamplerCache.h
@@ -28,7 +28,8 @@ public:
private:
struct Params
{
- union {
+ union
+ {
struct
{
TexMode0 tm0;
diff --git a/Source/Core/VideoBackends/Vulkan/Constants.h b/Source/Core/VideoBackends/Vulkan/Constants.h
index fd66dcc32b..f65aad6cfc 100644
--- a/Source/Core/VideoBackends/Vulkan/Constants.h
+++ b/Source/Core/VideoBackends/Vulkan/Constants.h
@@ -117,7 +117,8 @@ constexpr u32 PUSH_CONSTANT_BUFFER_SIZE = 128;
constexpr u32 MINIMUM_DRAW_CALLS_PER_COMMAND_BUFFER_FOR_READBACK = 10;
// Rasterization state info
-union RasterizationState {
+union RasterizationState
+{
BitField<0, 2, VkCullModeFlags> cull_mode;
BitField<2, 7, VkSampleCountFlagBits> samples;
BitField<9, 1, VkBool32> per_sample_shading;
@@ -127,7 +128,8 @@ union RasterizationState {
};
// Depth state info
-union DepthStencilState {
+union DepthStencilState
+{
BitField<0, 1, VkBool32> test_enable;
BitField<1, 1, VkBool32> write_enable;
BitField<2, 3, VkCompareOp> compare_op;
@@ -136,10 +138,12 @@ union DepthStencilState {
};
// Blend state info
-union BlendState {
+union BlendState
+{
struct
{
- union {
+ union
+ {
BitField<0, 1, VkBool32> blend_enable;
BitField<1, 3, VkBlendOp> blend_op;
BitField<4, 5, VkBlendFactor> src_blend;
@@ -150,7 +154,8 @@ union BlendState {
BitField<27, 4, VkColorComponentFlags> write_mask;
u32 low_bits;
};
- union {
+ union
+ {
BitField<0, 1, VkBool32> logic_op_enable;
BitField<1, 4, VkLogicOp> logic_op;
u32 high_bits;
@@ -161,7 +166,8 @@ union BlendState {
};
// Sampler info
-union SamplerState {
+union SamplerState
+{
BitField<0, 1, VkFilter> min_filter;
BitField<1, 1, VkFilter> mag_filter;
BitField<2, 1, VkSamplerMipmapMode> mipmap_mode;