summaryrefslogtreecommitdiffstats
path: root/Graphics/GLSLTools
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-10 04:47:03 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-10 04:47:03 +0000
commit02742f2efe4d400dc3562730badb5ea13aaa0876 (patch)
treefc41669e1583c22af650cff12746a9f3347bb50c /Graphics/GLSLTools
parentFixed merge conflicts (diff)
downloadDiligentCore-02742f2efe4d400dc3562730badb5ea13aaa0876.tar.gz
DiligentCore-02742f2efe4d400dc3562730badb5ea13aaa0876.zip
Another set of minor updates to mesh shader implementation
Diffstat (limited to 'Graphics/GLSLTools')
-rw-r--r--Graphics/GLSLTools/CMakeLists.txt7
-rw-r--r--Graphics/GLSLTools/src/SPIRVShaderResources.cpp4
-rw-r--r--Graphics/GLSLTools/src/SPIRVUtils.cpp1
3 files changed, 3 insertions, 9 deletions
diff --git a/Graphics/GLSLTools/CMakeLists.txt b/Graphics/GLSLTools/CMakeLists.txt
index 4cc1ecf9..e6977dc8 100644
--- a/Graphics/GLSLTools/CMakeLists.txt
+++ b/Graphics/GLSLTools/CMakeLists.txt
@@ -81,13 +81,6 @@ if(VULKAN_SUPPORTED)
endif()
endif()
-if(NOT ${DILIGENT_NO_GLSLANG})
- target_include_directories(Diligent-GLSLTools
- PRIVATE
- ${spirv-tools_BINARY_DIR}
- ../../ThirdParty/SPIRV-Tools)
-endif()
-
set_common_target_properties(Diligent-GLSLTools)
source_group("src" FILES ${SOURCE})
diff --git a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
index 76018d04..2ba5d90a 100644
--- a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
+++ b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp
@@ -150,6 +150,7 @@ ShaderResourceDesc SPIRVShaderResourceAttribs::GetResourceDesc() const
static spv::ExecutionModel ShaderTypeToExecutionModel(SHADER_TYPE ShaderType)
{
+ static_assert(SHADER_TYPE_LAST == 0x080, "Please handle the new shader type in the switch below");
switch (ShaderType)
{
// clang-format off
@@ -161,8 +162,7 @@ static spv::ExecutionModel ShaderTypeToExecutionModel(SHADER_TYPE ShaderType)
case SHADER_TYPE_COMPUTE: return spv::ExecutionModelGLCompute;
case SHADER_TYPE_AMPLIFICATION: return spv::ExecutionModelTaskNV;
case SHADER_TYPE_MESH: return spv::ExecutionModelMeshNV;
- // clang-format on
-
+ // clang-format on
default:
UNEXPECTED("Unexpected shader type");
return spv::ExecutionModelVertex;
diff --git a/Graphics/GLSLTools/src/SPIRVUtils.cpp b/Graphics/GLSLTools/src/SPIRVUtils.cpp
index 5ae9d3a1..6543d4fb 100644
--- a/Graphics/GLSLTools/src/SPIRVUtils.cpp
+++ b/Graphics/GLSLTools/src/SPIRVUtils.cpp
@@ -69,6 +69,7 @@ void FinalizeGlslang()
EShLanguage ShaderTypeToShLanguage(SHADER_TYPE ShaderType)
{
+ static_assert(SHADER_TYPE_LAST == 0x080, "Please handle the new shader type in the switch below");
switch (ShaderType)
{
// clang-format off