summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-14 05:27:46 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-14 05:27:46 +0000
commitd748358793c89dd77a2c5dbbf3ca64050b1d3bb4 (patch)
tree25008f90079aee9988a9e27851a31709df4777fa /Graphics/GraphicsEngineVulkan
parentMinor fix for timer query support detection in OpenGLES (diff)
downloadDiligentCore-d748358793c89dd77a2c5dbbf3ca64050b1d3bb4.tar.gz
DiligentCore-d748358793c89dd77a2c5dbbf3ca64050b1d3bb4.zip
Refactoring shader compilation tools - part I (https://github.com/DiligentGraphics/DiligentCore/issues/160)
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/CMakeLists.txt3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp14
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp6
4 files changed, 14 insertions, 15 deletions
diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
index 2e9458f7..8299915a 100644
--- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt
+++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
@@ -178,8 +178,7 @@ set(PRIVATE_DEPENDENCIES
Diligent-Common
Diligent-TargetPlatform
Diligent-GraphicsEngineNextGenBase
- Diligent-GLSLTools
- Diligent-HLSLTools
+ Diligent-ShaderTools
)
if (${DILIGENT_NO_HLSL})
diff --git a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp
index caf198cd..25a9f44b 100644
--- a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp
@@ -48,7 +48,7 @@
#include "FramebufferCache.hpp"
#include "RenderPassCache.hpp"
#include "CommandPoolManager.hpp"
-#include "DXILUtils.hpp"
+#include "DXCompiler.hpp"
namespace Diligent
{
@@ -177,7 +177,7 @@ public:
void FlushStaleResources(Uint32 CmdQueueIndex);
- IDxCompilerLibrary* GetDxCompiler() const { return m_pDxCompiler.get(); }
+ IDXCompiler* GetDxCompiler() const { return m_pDxCompiler.get(); }
private:
virtual void TestTextureFormat(TEXTURE_FORMAT TexFormat) override final;
@@ -209,7 +209,7 @@ private:
VulkanDynamicMemoryManager m_DynamicMemoryManager;
- std::unique_ptr<IDxCompilerLibrary> m_pDxCompiler;
+ std::unique_ptr<IDXCompiler> m_pDxCompiler;
};
} // namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
index 7cfa5f97..733f5b74 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
@@ -32,11 +32,11 @@
#include "ShaderVkImpl.hpp"
#include "RenderDeviceVkImpl.hpp"
#include "DataBlobImpl.hpp"
-#include "GLSLSourceBuilder.hpp"
-#include "DXILUtils.hpp"
+#include "GLSLUtils.hpp"
+#include "DXCompiler.hpp"
#if !DILIGENT_NO_GLSLANG
-# include "SPIRVUtils.hpp"
+# include "GLSLangUtils.hpp"
#endif
namespace Diligent
@@ -78,7 +78,7 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters,
#else
if (CreationAttribs.SourceLanguage == SHADER_SOURCE_LANGUAGE_HLSL)
{
- m_SPIRV = HLSLtoSPIRV(CreationAttribs, VulkanDefine, CreationAttribs.ppCompilerOutput);
+ m_SPIRV = GLSLangUtils::HLSLtoSPIRV(CreationAttribs, VulkanDefine, CreationAttribs.ppCompilerOutput);
}
else
{
@@ -86,9 +86,9 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters,
TargetGLSLCompiler::glslang,
VulkanDefine);
- m_SPIRV = GLSLtoSPIRV(m_Desc.ShaderType, GLSLSource.c_str(),
- static_cast<int>(GLSLSource.length()),
- CreationAttribs.ppCompilerOutput);
+ m_SPIRV = GLSLangUtils::GLSLtoSPIRV(m_Desc.ShaderType, GLSLSource.c_str(),
+ static_cast<int>(GLSLSource.length()),
+ CreationAttribs.ppCompilerOutput);
}
#endif
break;
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp
index 99620e7d..ead31fe5 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp
@@ -38,7 +38,7 @@
#include "VulkanUtilities/VulkanDebug.hpp"
#if !DILIGENT_NO_GLSLANG
-# include "SPIRVUtils.hpp"
+# include "GLSLangUtils.hpp"
#endif
#include "PlatformDefinitions.h"
@@ -262,7 +262,7 @@ VulkanInstance::VulkanInstance(bool EnableValidation,
VERIFY_EXPR(m_PhysicalDevices.size() == PhysicalDeviceCount);
}
#if !DILIGENT_NO_GLSLANG
- Diligent::InitializeGlslang();
+ Diligent::GLSLangUtils::InitializeGlslang();
#endif
}
@@ -275,7 +275,7 @@ VulkanInstance::~VulkanInstance()
vkDestroyInstance(m_VkInstance, m_pVkAllocator);
#if !DILIGENT_NO_GLSLANG
- Diligent::FinalizeGlslang();
+ Diligent::GLSLangUtils::FinalizeGlslang();
#endif
}