Release 2018.0
This commit is contained in:
parent
0862c53e13
commit
8b725acd6f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/shaderc-7a23a01.tar.gz
|
/shaderc-7a23a01.tar.gz
|
||||||
|
/shaderc-7d8582b.tar.gz
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
From ae4cdbf6d82676222ab3af481a1e164e529f6c16 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
|
||||||
Date: Mon, 24 Sep 2018 13:28:05 +0200
|
|
||||||
Subject: [PATCH] Add SONAME version to the library
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
|
|
||||||
---
|
|
||||||
libshaderc/CMakeLists.txt | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
|
|
||||||
index 14da8ce..0eb3698 100644
|
|
||||||
--- a/libshaderc/CMakeLists.txt
|
|
||||||
+++ b/libshaderc/CMakeLists.txt
|
|
||||||
@@ -21,6 +21,7 @@ target_compile_definitions(shaderc_shared
|
|
||||||
PRIVATE SHADERC_IMPLEMENTATION
|
|
||||||
PUBLIC SHADERC_SHAREDLIB
|
|
||||||
)
|
|
||||||
+set_target_properties(shaderc_shared PROPERTIES SOVERSION 1)
|
|
||||||
|
|
||||||
if(SHADERC_ENABLE_INSTALL)
|
|
||||||
install(
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
521
0001-Revert-Add-support-for-SPV_NV_mesh_shader.patch
Normal file
521
0001-Revert-Add-support-for-SPV_NV_mesh_shader.patch
Normal file
@ -0,0 +1,521 @@
|
|||||||
|
From 7867887019541322b08cc31257c447d20e79a40c Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
||||||
|
Date: Wed, 3 Oct 2018 16:37:42 +0200
|
||||||
|
Subject: [PATCH] Revert "Add-support-for-SPV_NV_mesh_shader"
|
||||||
|
|
||||||
|
This reverts commit e8ffa069fa40f79824cb1499eaa78cb56af84d0a.
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 8 --
|
||||||
|
glslc/src/shader_stage.cc | 23 +-----
|
||||||
|
glslc/src/stage_test.cc | 25 ------
|
||||||
|
libshaderc/include/shaderc/shaderc.h | 27 -------
|
||||||
|
libshaderc/src/common_shaders_for_test.h | 38 ----------
|
||||||
|
libshaderc/src/shaderc.cc | 57 --------------
|
||||||
|
libshaderc/src/shaderc_private.h | 18 -----
|
||||||
|
libshaderc/src/shaderc_private_test.cc | 18 -----
|
||||||
|
libshaderc/src/shaderc_test.cc | 76 -------------------
|
||||||
|
.../include/libshaderc_util/compiler.h | 34 +--------
|
||||||
|
libshaderc_util/src/resources.cc | 10 ---
|
||||||
|
11 files changed, 5 insertions(+), 329 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index b982eab..422d9c2 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -19,19 +19,11 @@ else()
|
||||||
|
message(STATUS "Configuring Shaderc to avoid building tests.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-set (CMAKE_CXX_STANDARD 11)
|
||||||
|
-
|
||||||
|
-option(SHADERC_ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
include(cmake/setup_build.cmake)
|
||||||
|
include(cmake/utils.cmake)
|
||||||
|
|
||||||
|
-
|
||||||
|
-if(SHADERC_ENABLE_NV_EXTENSIONS)
|
||||||
|
- add_definitions(-DNV_EXTENSIONS)
|
||||||
|
-endif(SHADERC_ENABLE_NV_EXTENSIONS)
|
||||||
|
-
|
||||||
|
add_custom_target(check-copyright ALL
|
||||||
|
${PYTHON_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/utils/add_copyright.py
|
||||||
|
--check
|
||||||
|
diff --git a/glslc/src/shader_stage.cc b/glslc/src/shader_stage.cc
|
||||||
|
index 3e4716d..142195a 100644
|
||||||
|
--- a/glslc/src/shader_stage.cc
|
||||||
|
+++ b/glslc/src/shader_stage.cc
|
||||||
|
@@ -43,18 +43,7 @@ shaderc_shader_kind MapStageNameToForcedKind(const string_piece& stage_name) {
|
||||||
|
{"geometry", shaderc_glsl_geometry_shader},
|
||||||
|
{"geom", shaderc_glsl_geometry_shader},
|
||||||
|
{"compute", shaderc_glsl_compute_shader},
|
||||||
|
- {"comp", shaderc_glsl_compute_shader},
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- {"rgen", shaderc_glsl_raygen_shader },
|
||||||
|
- {"rahit", shaderc_glsl_anyhit_shader },
|
||||||
|
- {"rchit", shaderc_glsl_closesthit_shader },
|
||||||
|
- {"rmiss", shaderc_glsl_miss_shader },
|
||||||
|
- {"rint", shaderc_glsl_intersection_shader },
|
||||||
|
- {"rcall", shaderc_glsl_callable_shader },
|
||||||
|
- {"task", shaderc_glsl_task_shader },
|
||||||
|
- {"mesh", shaderc_glsl_mesh_shader },
|
||||||
|
-#endif
|
||||||
|
- };
|
||||||
|
+ {"comp", shaderc_glsl_compute_shader}};
|
||||||
|
for (const auto& entry : string_to_kind) {
|
||||||
|
if (stage_name == entry.id) return entry.stage;
|
||||||
|
}
|
||||||
|
@@ -79,16 +68,6 @@ shaderc_shader_kind DeduceDefaultShaderKindFromFileName(
|
||||||
|
{"geom", shaderc_glsl_default_geometry_shader},
|
||||||
|
{"comp", shaderc_glsl_default_compute_shader},
|
||||||
|
{"spvasm", shaderc_spirv_assembly},
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- {"rgen", shaderc_glsl_default_raygen_shader },
|
||||||
|
- {"rahit", shaderc_glsl_default_anyhit_shader },
|
||||||
|
- {"rchit", shaderc_glsl_default_closesthit_shader },
|
||||||
|
- {"rmiss", shaderc_glsl_default_miss_shader },
|
||||||
|
- {"rint", shaderc_glsl_default_intersection_shader },
|
||||||
|
- {"rcall", shaderc_glsl_default_callable_shader },
|
||||||
|
- {"task", shaderc_glsl_default_task_shader },
|
||||||
|
- {"mesh", shaderc_glsl_default_mesh_shader },
|
||||||
|
-#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
const string_piece extension = glslc::GetFileExtension(file_name);
|
||||||
|
diff --git a/glslc/src/stage_test.cc b/glslc/src/stage_test.cc
|
||||||
|
index 80eef92..2ee0271 100644
|
||||||
|
--- a/glslc/src/stage_test.cc
|
||||||
|
+++ b/glslc/src/stage_test.cc
|
||||||
|
@@ -49,31 +49,6 @@ TEST(DeduceDefaultShaderKindFromFileName, ValidStage) {
|
||||||
|
EXPECT_EQ(shaderc_glsl_default_compute_shader,
|
||||||
|
glslc::DeduceDefaultShaderKindFromFileName("a.comp"));
|
||||||
|
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_raygen_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.rgen"));
|
||||||
|
-
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_anyhit_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.rahit"));
|
||||||
|
-
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_closesthit_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.rchit"));
|
||||||
|
-
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_miss_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.rmiss"));
|
||||||
|
-
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_intersection_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.rint"));
|
||||||
|
-
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_callable_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.rcall"));
|
||||||
|
-
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_task_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.task"));
|
||||||
|
-
|
||||||
|
- EXPECT_EQ(shaderc_glsl_default_mesh_shader,
|
||||||
|
- glslc::DeduceDefaultShaderKindFromFileName("a.mesh"));
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(DeduceDefaultShaderKindFromFileName, InvalidStage) {
|
||||||
|
diff --git a/libshaderc/include/shaderc/shaderc.h b/libshaderc/include/shaderc/shaderc.h
|
||||||
|
index 6addebf..093bb12 100644
|
||||||
|
--- a/libshaderc/include/shaderc/shaderc.h
|
||||||
|
+++ b/libshaderc/include/shaderc/shaderc.h
|
||||||
|
@@ -64,7 +64,6 @@ typedef enum {
|
||||||
|
shaderc_glsl_geometry_shader = shaderc_geometry_shader,
|
||||||
|
shaderc_glsl_tess_control_shader = shaderc_tess_control_shader,
|
||||||
|
shaderc_glsl_tess_evaluation_shader = shaderc_tess_evaluation_shader,
|
||||||
|
-
|
||||||
|
// Deduce the shader kind from #pragma annotation in the source code. Compiler
|
||||||
|
// will emit error if #pragma annotation is not found.
|
||||||
|
shaderc_glsl_infer_from_source,
|
||||||
|
@@ -78,32 +77,6 @@ typedef enum {
|
||||||
|
shaderc_glsl_default_tess_control_shader,
|
||||||
|
shaderc_glsl_default_tess_evaluation_shader,
|
||||||
|
shaderc_spirv_assembly,
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- shaderc_raygen_shader,
|
||||||
|
- shaderc_anyhit_shader,
|
||||||
|
- shaderc_closesthit_shader,
|
||||||
|
- shaderc_miss_shader,
|
||||||
|
- shaderc_intersection_shader,
|
||||||
|
- shaderc_callable_shader,
|
||||||
|
- shaderc_glsl_raygen_shader = shaderc_raygen_shader,
|
||||||
|
- shaderc_glsl_anyhit_shader = shaderc_anyhit_shader,
|
||||||
|
- shaderc_glsl_closesthit_shader = shaderc_closesthit_shader,
|
||||||
|
- shaderc_glsl_miss_shader = shaderc_miss_shader,
|
||||||
|
- shaderc_glsl_intersection_shader = shaderc_intersection_shader,
|
||||||
|
- shaderc_glsl_callable_shader = shaderc_callable_shader,
|
||||||
|
- shaderc_glsl_default_raygen_shader,
|
||||||
|
- shaderc_glsl_default_anyhit_shader,
|
||||||
|
- shaderc_glsl_default_closesthit_shader,
|
||||||
|
- shaderc_glsl_default_miss_shader,
|
||||||
|
- shaderc_glsl_default_intersection_shader,
|
||||||
|
- shaderc_glsl_default_callable_shader,
|
||||||
|
- shaderc_task_shader,
|
||||||
|
- shaderc_mesh_shader,
|
||||||
|
- shaderc_glsl_task_shader = shaderc_task_shader,
|
||||||
|
- shaderc_glsl_mesh_shader = shaderc_mesh_shader,
|
||||||
|
- shaderc_glsl_default_task_shader,
|
||||||
|
- shaderc_glsl_default_mesh_shader,
|
||||||
|
-#endif
|
||||||
|
} shaderc_shader_kind;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
diff --git a/libshaderc/src/common_shaders_for_test.h b/libshaderc/src/common_shaders_for_test.h
|
||||||
|
index e1e52be..d4e15c1 100644
|
||||||
|
--- a/libshaderc/src/common_shaders_for_test.h
|
||||||
|
+++ b/libshaderc/src/common_shaders_for_test.h
|
||||||
|
@@ -259,44 +259,6 @@ const char kGlslShaderComputeSubgroupBarrier[] =
|
||||||
|
#extension GL_KHR_shader_subgroup_basic : enable
|
||||||
|
void main() { subgroupBarrier(); })";
|
||||||
|
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
-// A GLSL task shader using a regular barrier.
|
||||||
|
-const char kGlslShaderTaskBarrier[] =
|
||||||
|
- R"(#version 450
|
||||||
|
- #extension GL_NV_mesh_shader : enable
|
||||||
|
- layout(local_size_x = 32) in;
|
||||||
|
- void main() { barrier(); })";
|
||||||
|
-
|
||||||
|
-// A GLSL task shader using the Subgroups feature.
|
||||||
|
-const char kGlslShaderTaskSubgroupBarrier[] =
|
||||||
|
- R"(#version 450
|
||||||
|
- #extension GL_NV_mesh_shader : enable
|
||||||
|
- #extension GL_KHR_shader_subgroup_basic : enable
|
||||||
|
- layout(local_size_x = 32) in;
|
||||||
|
- void main() { subgroupBarrier(); })";
|
||||||
|
-
|
||||||
|
-// A GLSL mesh shader using a regular barrier.
|
||||||
|
-const char kGlslShaderMeshBarrier[] =
|
||||||
|
- R"(#version 450
|
||||||
|
- #extension GL_NV_mesh_shader : enable
|
||||||
|
- layout(local_size_x = 32) in;
|
||||||
|
- layout(max_vertices=81) out;
|
||||||
|
- layout(max_primitives=32) out;
|
||||||
|
- layout(triangles) out;
|
||||||
|
- void main() { barrier(); })";
|
||||||
|
-
|
||||||
|
-// A GLSL mesh shader using the Subgroups feature.
|
||||||
|
-const char kGlslShaderMeshSubgroupBarrier[] =
|
||||||
|
- R"(#version 450
|
||||||
|
- #extension GL_NV_mesh_shader : enable
|
||||||
|
- #extension GL_KHR_shader_subgroup_basic : enable
|
||||||
|
- layout(local_size_x = 32) in;
|
||||||
|
- layout(max_vertices=81) out;
|
||||||
|
- layout(max_primitives=32) out;
|
||||||
|
- layout(triangles) out;
|
||||||
|
- void main() { subgroupBarrier(); })";
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
const char kGlslMultipleFnShader[] =
|
||||||
|
R"(#version 450
|
||||||
|
layout(location=0) flat in int inVal;
|
||||||
|
diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc
|
||||||
|
index 5f5db16..17a6562 100644
|
||||||
|
--- a/libshaderc/src/shaderc.cc
|
||||||
|
+++ b/libshaderc/src/shaderc.cc
|
||||||
|
@@ -56,26 +56,6 @@ EShLanguage GetForcedStage(shaderc_shader_kind kind) {
|
||||||
|
return EShLangTessControl;
|
||||||
|
case shaderc_glsl_tess_evaluation_shader:
|
||||||
|
return EShLangTessEvaluation;
|
||||||
|
-
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- case shaderc_glsl_raygen_shader:
|
||||||
|
- return EShLangRayGenNV;
|
||||||
|
- case shaderc_glsl_anyhit_shader:
|
||||||
|
- return EShLangAnyHitNV;
|
||||||
|
- case shaderc_glsl_closesthit_shader:
|
||||||
|
- return EShLangClosestHitNV;
|
||||||
|
- case shaderc_glsl_miss_shader:
|
||||||
|
- return EShLangMissNV;
|
||||||
|
- case shaderc_glsl_intersection_shader:
|
||||||
|
- return EShLangIntersectNV;
|
||||||
|
- case shaderc_glsl_callable_shader:
|
||||||
|
- return EShLangCallableNV;
|
||||||
|
- case shaderc_glsl_task_shader:
|
||||||
|
- return EShLangTaskNV;
|
||||||
|
- case shaderc_glsl_mesh_shader:
|
||||||
|
- return EShLangMeshNV;
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
case shaderc_glsl_infer_from_source:
|
||||||
|
case shaderc_glsl_default_vertex_shader:
|
||||||
|
case shaderc_glsl_default_fragment_shader:
|
||||||
|
@@ -83,16 +63,6 @@ EShLanguage GetForcedStage(shaderc_shader_kind kind) {
|
||||||
|
case shaderc_glsl_default_geometry_shader:
|
||||||
|
case shaderc_glsl_default_tess_control_shader:
|
||||||
|
case shaderc_glsl_default_tess_evaluation_shader:
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- case shaderc_glsl_default_raygen_shader:
|
||||||
|
- case shaderc_glsl_default_anyhit_shader:
|
||||||
|
- case shaderc_glsl_default_closesthit_shader:
|
||||||
|
- case shaderc_glsl_default_miss_shader:
|
||||||
|
- case shaderc_glsl_default_intersection_shader:
|
||||||
|
- case shaderc_glsl_default_callable_shader:
|
||||||
|
- case shaderc_glsl_default_task_shader:
|
||||||
|
- case shaderc_glsl_default_mesh_shader:
|
||||||
|
-#endif
|
||||||
|
case shaderc_spirv_assembly:
|
||||||
|
return EShLangCount;
|
||||||
|
}
|
||||||
|
@@ -150,16 +120,6 @@ class StageDeducer {
|
||||||
|
case shaderc_glsl_tess_control_shader:
|
||||||
|
case shaderc_glsl_tess_evaluation_shader:
|
||||||
|
case shaderc_glsl_infer_from_source:
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- case shaderc_glsl_raygen_shader:
|
||||||
|
- case shaderc_glsl_anyhit_shader:
|
||||||
|
- case shaderc_glsl_closesthit_shader:
|
||||||
|
- case shaderc_glsl_miss_shader:
|
||||||
|
- case shaderc_glsl_intersection_shader:
|
||||||
|
- case shaderc_glsl_callable_shader:
|
||||||
|
- case shaderc_glsl_task_shader:
|
||||||
|
- case shaderc_glsl_mesh_shader:
|
||||||
|
-#endif
|
||||||
|
return EShLangCount;
|
||||||
|
case shaderc_glsl_default_vertex_shader:
|
||||||
|
return EShLangVertex;
|
||||||
|
@@ -173,23 +133,6 @@ class StageDeducer {
|
||||||
|
return EShLangTessControl;
|
||||||
|
case shaderc_glsl_default_tess_evaluation_shader:
|
||||||
|
return EShLangTessEvaluation;
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- case shaderc_glsl_default_raygen_shader:
|
||||||
|
- return EShLangRayGenNV;
|
||||||
|
- case shaderc_glsl_default_anyhit_shader:
|
||||||
|
- return EShLangAnyHitNV;
|
||||||
|
- case shaderc_glsl_default_closesthit_shader:
|
||||||
|
- return EShLangClosestHitNV;
|
||||||
|
- case shaderc_glsl_default_miss_shader:
|
||||||
|
- return EShLangMissNV;
|
||||||
|
- case shaderc_glsl_default_intersection_shader:
|
||||||
|
- return EShLangIntersectNV;
|
||||||
|
- case shaderc_glsl_default_callable_shader:
|
||||||
|
- return EShLangCallableNV;
|
||||||
|
- case shaderc_glsl_default_task_shader:
|
||||||
|
- return EShLangTaskNV;
|
||||||
|
- case shaderc_glsl_default_mesh_shader:
|
||||||
|
-#endif
|
||||||
|
case shaderc_spirv_assembly:
|
||||||
|
return EShLangCount;
|
||||||
|
}
|
||||||
|
diff --git a/libshaderc/src/shaderc_private.h b/libshaderc/src/shaderc_private.h
|
||||||
|
index 30dc863..47de8f5 100644
|
||||||
|
--- a/libshaderc/src/shaderc_private.h
|
||||||
|
+++ b/libshaderc/src/shaderc_private.h
|
||||||
|
@@ -111,24 +111,6 @@ inline shaderc_util::Compiler::Stage shaderc_convert_specific_stage(
|
||||||
|
return shaderc_util::Compiler::Stage::Geometry;
|
||||||
|
case shaderc_compute_shader:
|
||||||
|
return shaderc_util::Compiler::Stage::Compute;
|
||||||
|
-#if NV_EXTENSIONS
|
||||||
|
- case shaderc_raygen_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::RayGenNV;
|
||||||
|
- case shaderc_intersection_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::IntersectNV;
|
||||||
|
- case shaderc_anyhit_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::AnyHitNV;
|
||||||
|
- case shaderc_closesthit_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::ClosestHitNV;
|
||||||
|
- case shaderc_miss_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::MissNV;
|
||||||
|
- case shaderc_callable_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::CallableNV;
|
||||||
|
- case shaderc_task_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::TaskNV;
|
||||||
|
- case shaderc_mesh_shader:
|
||||||
|
- return shaderc_util::Compiler::Stage::MeshNV;
|
||||||
|
-#endif
|
||||||
|
default:
|
||||||
|
// We don't care about the other kinds.
|
||||||
|
break;
|
||||||
|
diff --git a/libshaderc/src/shaderc_private_test.cc b/libshaderc/src/shaderc_private_test.cc
|
||||||
|
index 3b64551..2d6ebf8 100644
|
||||||
|
--- a/libshaderc/src/shaderc_private_test.cc
|
||||||
|
+++ b/libshaderc/src/shaderc_private_test.cc
|
||||||
|
@@ -30,23 +30,5 @@ TEST(ConvertSpecificStage, Exhaustive) {
|
||||||
|
shaderc_convert_specific_stage(shaderc_geometry_shader));
|
||||||
|
EXPECT_EQ(shaderc_util::Compiler::Stage::Compute,
|
||||||
|
shaderc_convert_specific_stage(shaderc_compute_shader));
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::RayGenNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_raygen_shader));
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::AnyHitNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_anyhit_shader));
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::ClosestHitNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_closesthit_shader));
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::IntersectNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_intersection_shader));
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::MissNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_miss_shader));
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::CallableNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_callable_shader));
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::TaskNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_task_shader));
|
||||||
|
- EXPECT_EQ(shaderc_util::Compiler::Stage::MeshNV,
|
||||||
|
- shaderc_convert_specific_stage(shaderc_mesh_shader));
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
} // anonymous namespace
|
||||||
|
diff --git a/libshaderc/src/shaderc_test.cc b/libshaderc/src/shaderc_test.cc
|
||||||
|
index e68ebcb..93acc09 100644
|
||||||
|
--- a/libshaderc/src/shaderc_test.cc
|
||||||
|
+++ b/libshaderc/src/shaderc_test.cc
|
||||||
|
@@ -1198,82 +1198,6 @@ TEST_F(CompileStringWithOptionsTest,
|
||||||
|
shaderc_glsl_compute_shader, options_.get()));
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
-// task shader
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_0TaskShaderToVulkan1_0Succeeds) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_0);
|
||||||
|
- EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderTaskBarrier,
|
||||||
|
- shaderc_glsl_task_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_0TaskShaderToVulkan1_1Succeeds) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_1);
|
||||||
|
- EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderTaskBarrier,
|
||||||
|
- shaderc_glsl_task_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_1TaskShaderToVulkan1_0Fails) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_0);
|
||||||
|
- EXPECT_FALSE(CompilesToValidSpv(compiler_, kGlslShaderTaskSubgroupBarrier,
|
||||||
|
- shaderc_glsl_task_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_1TaskShaderToVulkan1_1Succeeds) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_1);
|
||||||
|
- EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderTaskSubgroupBarrier,
|
||||||
|
- shaderc_glsl_task_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-// mesh shader
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_0MeshShaderToVulkan1_0Succeeds) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_0);
|
||||||
|
- EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderMeshBarrier,
|
||||||
|
- shaderc_glsl_mesh_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_0MeshShaderToVulkan1_1Succeeds) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_1);
|
||||||
|
- EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderMeshBarrier,
|
||||||
|
- shaderc_glsl_mesh_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_1MeshShaderToVulkan1_0Fails) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_0);
|
||||||
|
- EXPECT_FALSE(CompilesToValidSpv(compiler_, kGlslShaderMeshSubgroupBarrier,
|
||||||
|
- shaderc_glsl_mesh_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-TEST_F(CompileStringWithOptionsTest,
|
||||||
|
- TargetEnvRespectedWhenCompilingVulkan1_1MeshShaderToVulkan1_1Succeeds) {
|
||||||
|
- shaderc_compile_options_set_target_env(options_.get(),
|
||||||
|
- shaderc_target_env_vulkan,
|
||||||
|
- shaderc_env_version_vulkan_1_1);
|
||||||
|
- EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderMeshSubgroupBarrier,
|
||||||
|
- shaderc_glsl_mesh_shader, options_.get()));
|
||||||
|
-}
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
TEST_F(CompileStringWithOptionsTest,
|
||||||
|
DISABLED_TargetEnvIgnoredWhenPreprocessing) {
|
||||||
|
// This test is disabled since some versions of glslang may refuse to compile
|
||||||
|
diff --git a/libshaderc_util/include/libshaderc_util/compiler.h b/libshaderc_util/include/libshaderc_util/compiler.h
|
||||||
|
index f36a97f..bbbab86 100644
|
||||||
|
--- a/libshaderc_util/include/libshaderc_util/compiler.h
|
||||||
|
+++ b/libshaderc_util/include/libshaderc_util/compiler.h
|
||||||
|
@@ -171,40 +171,14 @@ class Compiler {
|
||||||
|
Geometry,
|
||||||
|
Fragment,
|
||||||
|
Compute,
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- RayGenNV,
|
||||||
|
- IntersectNV,
|
||||||
|
- AnyHitNV,
|
||||||
|
- ClosestHitNV,
|
||||||
|
- MissNV,
|
||||||
|
- CallableNV,
|
||||||
|
- TaskNV,
|
||||||
|
- MeshNV,
|
||||||
|
-#endif
|
||||||
|
- StageEnd,
|
||||||
|
};
|
||||||
|
- enum { kNumStages = int(Stage::StageEnd) };
|
||||||
|
+ enum { kNumStages = int(Stage::Compute) + 1 };
|
||||||
|
|
||||||
|
// Returns a std::array of all the Stage values.
|
||||||
|
const std::array<Stage, kNumStages>& stages() const {
|
||||||
|
- static std::array<Stage, kNumStages> values{{
|
||||||
|
- Stage::Vertex,
|
||||||
|
- Stage::TessEval,
|
||||||
|
- Stage::TessControl,
|
||||||
|
- Stage::Geometry,
|
||||||
|
- Stage::Fragment,
|
||||||
|
- Stage::Compute,
|
||||||
|
-#ifdef NV_EXTENSIONS
|
||||||
|
- Stage::RayGenNV,
|
||||||
|
- Stage::IntersectNV,
|
||||||
|
- Stage::AnyHitNV,
|
||||||
|
- Stage::ClosestHitNV,
|
||||||
|
- Stage::MissNV,
|
||||||
|
- Stage::CallableNV,
|
||||||
|
- Stage::TaskNV,
|
||||||
|
- Stage::MeshNV,
|
||||||
|
-#endif
|
||||||
|
- }};
|
||||||
|
+ static std::array<Stage, kNumStages> values{
|
||||||
|
+ {Stage::Vertex, Stage::TessEval, Stage::TessControl, Stage::Geometry,
|
||||||
|
+ Stage::Fragment, Stage::Compute}};
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/libshaderc_util/src/resources.cc b/libshaderc_util/src/resources.cc
|
||||||
|
index 458a63f..1617b0a 100644
|
||||||
|
--- a/libshaderc_util/src/resources.cc
|
||||||
|
+++ b/libshaderc_util/src/resources.cc
|
||||||
|
@@ -116,16 +116,6 @@ const TBuiltInResource kDefaultTBuiltInResource = {
|
||||||
|
/*.maxCullDistances = */ 8, // ARB_cull_distance.
|
||||||
|
/*.maxCombinedClipAndCullDistances = */ 8, // ARB_cull_distance.
|
||||||
|
/*.maxSamples = */ 4,
|
||||||
|
- /* .maxMeshOutputVerticesNV = */ 256,
|
||||||
|
- /* .maxMeshOutputPrimitivesNV = */ 512,
|
||||||
|
- /* .maxMeshWorkGroupSizeX_NV = */ 32,
|
||||||
|
- /* .maxMeshWorkGroupSizeY_NV = */ 1,
|
||||||
|
- /* .maxMeshWorkGroupSizeZ_NV = */ 1,
|
||||||
|
- /* .maxTaskWorkGroupSizeX_NV = */ 32,
|
||||||
|
- /* .maxTaskWorkGroupSizeY_NV = */ 1,
|
||||||
|
- /* .maxTaskWorkGroupSizeZ_NV = */ 1,
|
||||||
|
- /* .maxMeshViewCountNV = */ 4,
|
||||||
|
-
|
||||||
|
// This is the glslang TLimits structure.
|
||||||
|
// It defines whether or not the following features are enabled.
|
||||||
|
// We want them to all be enabled.
|
||||||
|
--
|
||||||
|
2.19.0
|
||||||
|
|
22
shaderc.spec
22
shaderc.spec
@ -1,14 +1,14 @@
|
|||||||
# Release 2017.2
|
# Release 2018.0
|
||||||
%global commit 7a23a01742b88329fb2260eda007172135ba25d4
|
%global commit 7d8582bb10c94889f0fc603cb10728faa58b93e1
|
||||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||||
%global snapshotdate 20180924
|
%global snapshotdate 20181003
|
||||||
%global gitversion beginning-449-g7a23a01
|
%global gitversion v2018.0
|
||||||
|
|
||||||
# Need to keep this in sync with spirv-tools
|
# Need to keep this in sync with spirv-tools
|
||||||
%global spirv_commit f508896d6487d09f5c9a2a3835595446fec0791a
|
%global spirv_commit 26a698c34788bb69123a1f3789970a16cf4d9641
|
||||||
|
|
||||||
Name: shaderc
|
Name: shaderc
|
||||||
Version: 2017.2
|
Version: 2018.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A collection of tools, libraries, and tests for Vulkan shader compilation
|
Summary: A collection of tools, libraries, and tests for Vulkan shader compilation
|
||||||
|
|
||||||
@ -18,10 +18,11 @@ Source0: %url/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
|||||||
|
|
||||||
# https://github.com/google/shaderc/pull/463
|
# https://github.com/google/shaderc/pull/463
|
||||||
Patch0: https://patch-diff.githubusercontent.com/raw/google/shaderc/pull/463.patch#/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
|
Patch0: https://patch-diff.githubusercontent.com/raw/google/shaderc/pull/463.patch#/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
|
||||||
# https://github.com/google/shaderc/pull/493
|
|
||||||
Patch1: https://patch-diff.githubusercontent.com/raw/google/shaderc/pull/493.patch#/0001-Add-SONAME-version-to-the-library.patch
|
|
||||||
# Patch to unbundle 3rd party code
|
# Patch to unbundle 3rd party code
|
||||||
Patch2: 0001-Drop-third-party-code-in-CMakeLists.txt.patch
|
Patch1: 0001-Drop-third-party-code-in-CMakeLists.txt.patch
|
||||||
|
# SPV_NV_mesh_shader is only available in theGIT master of glslang
|
||||||
|
# Delaying inclusion until neyt glslang release
|
||||||
|
Patch2: 0001-Revert-Add-support-for-SPV_NV_mesh_shader.patch
|
||||||
|
|
||||||
BuildRequires: cmake3
|
BuildRequires: cmake3
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -138,6 +139,9 @@ ctest -V
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 03 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2018.0-1
|
||||||
|
- Release 2018.0
|
||||||
|
|
||||||
* Mon Sep 24 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2017.2-1
|
* Mon Sep 24 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2017.2-1
|
||||||
- Initial build
|
- Initial build
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (shaderc-7a23a01.tar.gz) = 558447bc29b0c7610fda0f6c2a6b66f3c8fc7f2f5e336ad190ae959caa8c7aa1e09d3c2efe0e197cb2cbe1fa97e0c68623ce423c658b29fcbd1f1e1ea4c85f18
|
SHA512 (shaderc-7d8582b.tar.gz) = 20c77170265bb5dba61a47df7c369fdbece1d7a457f78f04c0a1ee4c728802b673857da8f91456de35627832781d2064ba2daf2b6859a4f1b14bfd53fc6e8588
|
||||||
|
Loading…
Reference in New Issue
Block a user