summaryrefslogtreecommitdiffstats
path: root/Graphics/GLSLTools
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-12-24 01:43:25 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-12-24 01:43:25 +0000
commitdcd30d944d000fbadc28540d3cef1fbe4224dec3 (patch)
tree7d96a0d6b1d72b066ff77fd341b16550838e3544 /Graphics/GLSLTools
parentFixed TOC in readme (diff)
downloadDiligentCore-dcd30d944d000fbadc28540d3cef1fbe4224dec3.tar.gz
DiligentCore-dcd30d944d000fbadc28540d3cef1fbe4224dec3.zip
A bunch of minor changes to fix clang warnings and errors
Diffstat (limited to 'Graphics/GLSLTools')
-rw-r--r--Graphics/GLSLTools/include/SPIRVShaderResources.h4
-rw-r--r--Graphics/GLSLTools/src/SPIRVShaderResources.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Graphics/GLSLTools/include/SPIRVShaderResources.h b/Graphics/GLSLTools/include/SPIRVShaderResources.h
index 28fb147e..30366aff 100644
--- a/Graphics/GLSLTools/include/SPIRVShaderResources.h
+++ b/Graphics/GLSLTools/include/SPIRVShaderResources.h
@@ -184,8 +184,8 @@ public:
Type == Attribs.Type &&
VarType == Attribs.VarType &&
SepSmplrOrImgInd == Attribs.SepSmplrOrImgInd &&
- ( IsImmutableSamplerAssigned() && Attribs.IsImmutableSamplerAssigned() ||
- !IsImmutableSamplerAssigned() && !Attribs.IsImmutableSamplerAssigned());
+ ( (IsImmutableSamplerAssigned() && Attribs.IsImmutableSamplerAssigned()) ||
+ (!IsImmutableSamplerAssigned() && !Attribs.IsImmutableSamplerAssigned()) );
}
};
static_assert(sizeof(SPIRVShaderResourceAttribs) % sizeof(void*) == 0, "Size of SPIRVShaderResourceAttribs struct must be multiple of sizeof(void*)" );
diff --git a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
index 6ff18255..0702f7ac 100644
--- a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
+++ b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
@@ -527,7 +527,7 @@ void SPIRVShaderResources::Initialize(IMemoryAllocator& Allocator,
CurrentOffset += NumResources;
return Offset;
};
-
+
auto UniformBufferOffset = AdvanceOffset(Counters.NumUBs); UniformBufferOffset; // To suppress warning
m_StorageBufferOffset = AdvanceOffset(Counters.NumSBs);
m_StorageImageOffset = AdvanceOffset(Counters.NumImgs);