From bdecaefe87db4ccfb8dc8700fb1bf23aff4b6a0d Mon Sep 17 00:00:00 2001 From: azhirnov Date: Wed, 19 Aug 2020 19:05:48 +0300 Subject: minor fixes and formatting --- Graphics/GraphicsEngineD3D12/include/CommandContext.hpp | 12 ++++++------ Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp b/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp index a405ea80..2f97b239 100644 --- a/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp +++ b/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp @@ -43,13 +43,13 @@ namespace Diligent struct DWParam { // clang-format off - DWParam( FLOAT f ) : Float{f} {} - DWParam( UINT u ) : Uint {u} {} - DWParam( INT i ) : Int {i} {} + DWParam( FLOAT f ) : Float{f} {} + DWParam( UINT u ) : Uint {u} {} + DWParam( INT i ) : Int {i} {} - void operator= ( FLOAT f ) { Float = f; } - void operator= ( UINT u ) { Uint = u; } - void operator= ( INT i ) { Int = i; } + void operator= ( FLOAT f ) { Float = f; } + void operator= ( UINT u ) { Uint = u; } + void operator= ( INT i ) { Int = i; } // clang-format on union diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp index 481027c0..be5ca61f 100644 --- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp @@ -287,8 +287,8 @@ PipelineStateD3D12Impl::PipelineStateD3D12Impl(IReferenceCounters* pR d3d12PSODesc.NumRenderTargets = GraphicsPipeline.NumRenderTargets; for (Uint32 rt = 0; rt < GraphicsPipeline.NumRenderTargets; ++rt) d3d12PSODesc.RTVFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); - for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < 8; ++rt) - d3d12PSODesc.RTVFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); + for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < std::size(d3d12PSODesc.RTVFormats); ++rt) + d3d12PSODesc.RTVFormats[rt] = DXGI_FORMAT_UNKNOWN; d3d12PSODesc.DSVFormat = TexFormatToDXGI_Format(GraphicsPipeline.DSVFormat); d3d12PSODesc.SampleDesc.Count = GraphicsPipeline.SmplDesc.Count; @@ -368,8 +368,8 @@ PipelineStateD3D12Impl::PipelineStateD3D12Impl(IReferenceCounters* pR d3d12PSODesc.RTVFormatArray->NumRenderTargets = GraphicsPipeline.NumRenderTargets; for (Uint32 rt = 0; rt < GraphicsPipeline.NumRenderTargets; ++rt) d3d12PSODesc.RTVFormatArray->RTFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); - for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < 8; ++rt) - d3d12PSODesc.RTVFormatArray->RTFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); + for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < std::size(d3d12PSODesc.RTVFormatArray->RTFormats); ++rt) + d3d12PSODesc.RTVFormatArray->RTFormats[rt] = DXGI_FORMAT_UNKNOWN; d3d12PSODesc.DSVFormat = TexFormatToDXGI_Format(GraphicsPipeline.DSVFormat); d3d12PSODesc.SampleDesc->Count = GraphicsPipeline.SmplDesc.Count; -- cgit v1.2.3