diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-08-19 16:05:48 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-08-19 16:05:48 +0000 |
| commit | bdecaefe87db4ccfb8dc8700fb1bf23aff4b6a0d (patch) | |
| tree | dd9d2191ea743af87b5f41abd5c2cf96917a5d5d /Graphics/GraphicsEngineD3D12 | |
| parent | Added root signature for DrawMeshIndirect, added some checks (diff) | |
| download | DiligentCore-bdecaefe87db4ccfb8dc8700fb1bf23aff4b6a0d.tar.gz DiligentCore-bdecaefe87db4ccfb8dc8700fb1bf23aff4b6a0d.zip | |
minor fixes and formatting
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/include/CommandContext.hpp | 12 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp | 8 |
2 files changed, 10 insertions, 10 deletions
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; |
