mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
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
This commit is contained in:
@ -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;
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
namespace DX11
|
||||
{
|
||||
union XFBEncodeParams {
|
||||
union XFBEncodeParams
|
||||
{
|
||||
struct
|
||||
{
|
||||
FLOAT Width; // Width and height of encoded XFB in luma pixels
|
||||
|
@ -244,7 +244,8 @@ struct D3DQueueItem
|
||||
{
|
||||
D3DQueueItemType Type;
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
SetPipelineStateArguments SetPipelineState;
|
||||
SetRenderTargetsArguments SetRenderTargets;
|
||||
SetVertexBuffersArguments SetVertexBuffers;
|
||||
|
@ -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;
|
||||
|
@ -28,7 +28,8 @@ public:
|
||||
private:
|
||||
struct Params
|
||||
{
|
||||
union {
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
TexMode0 tm0;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user