summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/include/CommandContext.hpp12
-rw-r--r--Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp8
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;