Skip to content

Commit

Permalink
Fixed a few remaining MSVC conformance mode issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Oct 9, 2023
1 parent 59b2c51 commit 961ec5b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -38,7 +38,8 @@
namespace Diligent
{

static constexpr Uint32 GetRegisterSpace(const D3D11_SHADER_INPUT_BIND_DESC&)
template <>
Uint32 GetRegisterSpace<>(const D3D11_SHADER_INPUT_BIND_DESC&)
{
return 0;
}
Expand Down
5 changes: 3 additions & 2 deletions Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -40,7 +40,8 @@
namespace Diligent
{

static Uint32 GetRegisterSpace(const D3D12_SHADER_INPUT_BIND_DESC& BindingDesc)
template <>
Uint32 GetRegisterSpace<>(const D3D12_SHADER_INPUT_BIND_DESC& BindingDesc)
{
return BindingDesc.Space;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "StringTools.hpp"
#include "ShaderToolsCommon.hpp"
#include "D3DCommonTypeConversions.hpp"
#include "EngineMemory.h"

/// \file
/// D3D shader resource loading
Expand Down Expand Up @@ -134,8 +135,11 @@ void LoadD3DShaderConstantBufferReflection(TShaderReflection* pBuffReflection, S
}
}

template <typename D3D_SHADER_INPUT_BIND_DESC>
Uint32 GetRegisterSpace(const D3D_SHADER_INPUT_BIND_DESC&);

template <typename TReflectionTraits,
template <typename D3DShaderResourceAttribs,
typename TReflectionTraits,
typename TShaderReflection,
typename THandleShaderDesc,
typename TOnResourcesCounted,
Expand Down
6 changes: 3 additions & 3 deletions Graphics/GraphicsEngineD3DBase/include/ShaderResources.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -510,7 +510,7 @@ void ShaderResources::Initialize(TShaderReflection* pShaderReflection,
const Char* CombinedSamplerSuffix,
bool LoadConstantBufferReflection)
{
using D3D_SHADER_DESC = TD3DReflectionTraits::D3D_SHADER_DESC;
using D3D_SHADER_DESC = typename TD3DReflectionTraits::D3D_SHADER_DESC;

Uint32 CurrCB = 0, CurrTexSRV = 0, CurrTexUAV = 0, CurrBufSRV = 0, CurrBufUAV = 0, CurrSampler = 0, CurrAS = 0;

Expand All @@ -520,7 +520,7 @@ void ShaderResources::Initialize(TShaderReflection* pShaderReflection,
// Constant buffer reflections
std::vector<ShaderCodeBufferDescX> CBReflections;

LoadD3DShaderResources<TD3DReflectionTraits>(
LoadD3DShaderResources<D3DShaderResourceAttribs, TD3DReflectionTraits>(
pShaderReflection, LoadConstantBufferReflection,

[&](const D3D_SHADER_DESC& d3dShaderDesc) //
Expand Down

0 comments on commit 961ec5b

Please sign in to comment.