summaryrefslogtreecommitdiffstats
path: root/Graphics/GLSLTools
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-12-24 07:20:10 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-12-24 07:20:10 +0000
commit72169d31c7f8a8e1f0a011e45b19ea7710eef985 (patch)
tree935085a90a27216001289ddfcea2f999ce6b90cc /Graphics/GLSLTools
parentFixed CMake warning when processing SPIRV-Tools-shared on Mac (diff)
downloadDiligentCore-72169d31c7f8a8e1f0a011e45b19ea7710eef985.tar.gz
DiligentCore-72169d31c7f8a8e1f0a011e45b19ea7710eef985.zip
Fixed multiple unused variable warnings in clang release build
Diffstat (limited to 'Graphics/GLSLTools')
-rw-r--r--Graphics/GLSLTools/src/SPIRVShaderResources.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
index 0702f7ac..12027427 100644
--- a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
+++ b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
@@ -55,7 +55,7 @@ static uint32_t GetDecorationOffset(const spirv_cross::Compiler& Compiler,
VERIFY(Compiler.has_decoration(Res.id, Decoration), "Res \'", Res.name, "\' has no requested decoration");
uint32_t offset = 0;
auto declared = Compiler.get_binary_offset_for_decoration(Res.id, Decoration, offset);
- VERIFY(declared, "Requested decoration is not declared");
+ VERIFY(declared, "Requested decoration is not declared"); (void)declared;
return offset;
}
@@ -396,11 +396,13 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator,
SamplerInd);
if (pNewSepImg->IsValidSepSamplerAssigned())
{
+#ifdef DEVELOPMENT
const auto& SepSmplr = GetSepSmplr(pNewSepImg->GetAssignedSepSamplerInd());
DEV_CHECK_ERR(SepSmplr.ArraySize == 1 || SepSmplr.ArraySize == pNewSepImg->ArraySize,
"Array size (", SepSmplr.ArraySize,") of separate sampler variable '",
SepSmplr.Name, "' must be equal to 1 or be the same as the array size (", pNewSepImg->ArraySize,
") of separate image variable '", pNewSepImg->Name, "' it is assigned to");
+#endif
}
}
VERIFY_EXPR(CurrSepImg == GetNumSepImgs());
@@ -522,13 +524,13 @@ void SPIRVShaderResources::Initialize(IMemoryAllocator& Allocator,
constexpr Uint32 MaxOffset = std::numeric_limits<OffsetType>::max();
auto AdvanceOffset = [&CurrentOffset, MaxOffset](Uint32 NumResources)
{
- VERIFY(CurrentOffset <= MaxOffset, "Current offser (", CurrentOffset, ") exceeds max allowed value (", MaxOffset, ")");
+ VERIFY(CurrentOffset <= MaxOffset, "Current offser (", CurrentOffset, ") exceeds max allowed value (", MaxOffset, ")"); (void)MaxOffset;
auto Offset = static_cast<OffsetType>(CurrentOffset);
CurrentOffset += NumResources;
return Offset;
};
- auto UniformBufferOffset = AdvanceOffset(Counters.NumUBs); UniformBufferOffset; // To suppress warning
+ auto UniformBufferOffset = AdvanceOffset(Counters.NumUBs); (void)UniformBufferOffset;
m_StorageBufferOffset = AdvanceOffset(Counters.NumSBs);
m_StorageImageOffset = AdvanceOffset(Counters.NumImgs);
m_SampledImageOffset = AdvanceOffset(Counters.NumSmpldImgs);
@@ -603,7 +605,7 @@ SPIRVShaderResources::~SPIRVShaderResources()
SPIRVShaderResources::ResourceCounters SPIRVShaderResources::CountResources(const SHADER_VARIABLE_TYPE* AllowedVarTypes,
Uint32 NumAllowedTypes)const noexcept
{
- Uint32 AllowedTypeBits = GetAllowedTypeBits(AllowedVarTypes, NumAllowedTypes);
+ Uint32 AllowedTypeBits = GetAllowedTypeBits(AllowedVarTypes, NumAllowedTypes); (void)AllowedTypeBits;
ResourceCounters Counters;
ProcessResources(