summaryrefslogtreecommitdiffstats
path: root/Graphics/GLSLTools
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-02-27 06:49:28 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-02-27 06:49:28 +0000
commitc03fae535f3e5080906c43690e800ae34572278c (patch)
tree0e59cce8a40dc1e34886fe28d6ef67e2e7c3fa0f /Graphics/GLSLTools
parentUpdated SaderVkImpl: removed static resources (diff)
downloadDiligentCore-c03fae535f3e5080906c43690e800ae34572278c.tar.gz
DiligentCore-c03fae535f3e5080906c43690e800ae34572278c.zip
Updating some files to match the new API
Diffstat (limited to 'Graphics/GLSLTools')
-rw-r--r--Graphics/GLSLTools/include/GLSLSourceBuilder.h2
-rw-r--r--Graphics/GLSLTools/include/SPIRVUtils.h2
-rw-r--r--Graphics/GLSLTools/src/GLSLSourceBuilder.cpp2
-rw-r--r--Graphics/GLSLTools/src/SPIRVShaderResources.cpp12
-rw-r--r--Graphics/GLSLTools/src/SPIRVUtils.cpp2
5 files changed, 16 insertions, 4 deletions
diff --git a/Graphics/GLSLTools/include/GLSLSourceBuilder.h b/Graphics/GLSLTools/include/GLSLSourceBuilder.h
index bfd6e55c..958f0faf 100644
--- a/Graphics/GLSLTools/include/GLSLSourceBuilder.h
+++ b/Graphics/GLSLTools/include/GLSLSourceBuilder.h
@@ -36,7 +36,7 @@ enum TargetGLSLCompiler
driver
};
-String BuildGLSLSourceString(const ShaderCreationAttribs& CreationAttribs,
+String BuildGLSLSourceString(const ShaderCreateInfo& CreationAttribs,
const DeviceCaps& deviceCaps,
TargetGLSLCompiler TargetCompiler,
const char* ExtraDefinitions = nullptr);
diff --git a/Graphics/GLSLTools/include/SPIRVUtils.h b/Graphics/GLSLTools/include/SPIRVUtils.h
index 75fa8108..3859a587 100644
--- a/Graphics/GLSLTools/include/SPIRVUtils.h
+++ b/Graphics/GLSLTools/include/SPIRVUtils.h
@@ -33,6 +33,6 @@ namespace Diligent
void InitializeGlslang();
void FinalizeGlslang();
std::vector<unsigned int> GLSLtoSPIRV(SHADER_TYPE ShaderType, const char* ShaderSource, int SourceCodeLen, IDataBlob** ppCompilerOutput);
-std::vector<unsigned int> HLSLtoSPIRV(const ShaderCreationAttribs& Attribs, IDataBlob** ppCompilerOutput);
+std::vector<unsigned int> HLSLtoSPIRV(const ShaderCreateInfo& Attribs, IDataBlob** ppCompilerOutput);
} \ No newline at end of file
diff --git a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp
index 905ecfa1..2da42437 100644
--- a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp
+++ b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp
@@ -33,7 +33,7 @@
namespace Diligent
{
-String BuildGLSLSourceString(const ShaderCreationAttribs& CreationAttribs,
+String BuildGLSLSourceString(const ShaderCreateInfo& CreationAttribs,
const DeviceCaps& deviceCaps,
TargetGLSLCompiler TargetCompiler,
const char* ExtraDefinitions)
diff --git a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
index 4f733103..8c8f673f 100644
--- a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
+++ b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
@@ -392,6 +392,18 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator,
VERIFY(m_ResourceNames.GetRemainingSize() == 0, "Names pool must be empty");
//LOG_INFO_MESSAGE(DumpResources());
+
+#ifdef DEVELOPMENT
+ if (CombinedSamplerSuffix != nullptr)
+ {
+ for (Uint32 n=0; n < GetNumSepSmplrs(); ++n)
+ {
+ const auto& SepSmplr = GetSepSmplr(n);
+ if (!SepSmplr.IsValidSepImageAssigned())
+ LOG_ERROR_MESSAGE("Shader '", shaderDesc.Name, "' uses combined texture samplers, but separate sampler '", SepSmplr.Name, "' is not assigned to any texture");
+ }
+ }
+#endif
}
void SPIRVShaderResources::Initialize(IMemoryAllocator& Allocator,
diff --git a/Graphics/GLSLTools/src/SPIRVUtils.cpp b/Graphics/GLSLTools/src/SPIRVUtils.cpp
index 9f9a7d88..894560fe 100644
--- a/Graphics/GLSLTools/src/SPIRVUtils.cpp
+++ b/Graphics/GLSLTools/src/SPIRVUtils.cpp
@@ -411,7 +411,7 @@ private:
std::unordered_map<IncludeResult*, RefCntAutoPtr<IDataBlob>> m_DataBlobs;
};
-std::vector<unsigned int> HLSLtoSPIRV(const ShaderCreationAttribs& Attribs, IDataBlob** ppCompilerOutput)
+std::vector<unsigned int> HLSLtoSPIRV(const ShaderCreateInfo& Attribs, IDataBlob** ppCompilerOutput)
{
EShLanguage ShLang = ShaderTypeToShLanguage(Attribs.Desc.ShaderType);
glslang::TShader Shader(ShLang);