summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorazhirnov <zh1dron@gmail.com>2020-09-01 18:24:44 +0000
committerazhirnov <zh1dron@gmail.com>2020-09-01 18:24:44 +0000
commitf74b374c22a3fd411ef5c7b39297296f6d0aa041 (patch)
treef8671e2512f47b0c6ddb479d8af83b354c51c8b3 /Graphics/GraphicsEngineD3D12
parentvalidate included file name (fix for samples) (diff)
downloadDiligentCore-f74b374c22a3fd411ef5c7b39297296f6d0aa041.tar.gz
DiligentCore-f74b374c22a3fd411ef5c7b39297296f6d0aa041.zip
fixed compilation on linux & android
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/src/RootSignature.cpp2
2 files changed, 3 insertions, 3 deletions
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)