From f74b374c22a3fd411ef5c7b39297296f6d0aa041 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Tue, 1 Sep 2020 21:24:44 +0300 Subject: fixed compilation on linux & android --- Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp | 4 ++-- Graphics/GraphicsEngineD3D12/src/RootSignature.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp index be5ca61f..6dc4d97a 100644 --- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp @@ -287,7 +287,7 @@ 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 < std::size(d3d12PSODesc.RTVFormats); ++rt) + for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < _countof(d3d12PSODesc.RTVFormats); ++rt) d3d12PSODesc.RTVFormats[rt] = DXGI_FORMAT_UNKNOWN; d3d12PSODesc.DSVFormat = TexFormatToDXGI_Format(GraphicsPipeline.DSVFormat); @@ -368,7 +368,7 @@ 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 < std::size(d3d12PSODesc.RTVFormatArray->RTFormats); ++rt) + for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < _countof(d3d12PSODesc.RTVFormatArray->RTFormats); ++rt) d3d12PSODesc.RTVFormatArray->RTFormats[rt] = DXGI_FORMAT_UNKNOWN; d3d12PSODesc.DSVFormat = TexFormatToDXGI_Format(GraphicsPipeline.DSVFormat); diff --git a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp index 4d407245..4f080fcc 100644 --- a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp +++ b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp @@ -230,7 +230,7 @@ static SHADER_TYPE ShaderVisibility2ShaderTypeMap[] = SHADER_TYPE ShaderTypeFromShaderVisibility(D3D12_SHADER_VISIBILITY ShaderVisibility) { - VERIFY_EXPR(uint32_t(ShaderVisibility) < std::size(ShaderVisibility2ShaderTypeMap)); + VERIFY_EXPR(uint32_t(ShaderVisibility) < _countof(ShaderVisibility2ShaderTypeMap)); auto ShaderType = ShaderVisibility2ShaderTypeMap[ShaderVisibility]; #ifdef DILIGENT_DEBUG switch (ShaderVisibility) -- cgit v1.2.3