Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2019-03-29 12:29:44 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2019-03-29 12:29:44 +0300
commit9b92e68d71153c6dea2bf11ae08791e620c12b6e (patch)
treef53f68bd4a89c2904a4d105dd23d6dcb8cbae1ec /spirv_parser.cpp
parent3fa09f5677c7a62c71a1c25fd09c1d1c4842d922 (diff)
Add an option to override the namespace used for spirv_cross.
This is a pragmatic trick to avoid symbol collision where a project links against SPIRV-Cross statically, while linking to other projects which also use SPIRV-Cross statically. We can end up with very awkward symbol collisions which can resolve themselves silently because SPIRV-Cross is pulled in as necessary. To fix this, we must use different symbols and embed two copies of SPIRV-Cross in this scenario, now with different namespaces, which in turn leads to different symbols.
Diffstat (limited to 'spirv_parser.cpp')
-rw-r--r--spirv_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/spirv_parser.cpp b/spirv_parser.cpp
index fa87fa37..a82d05be 100644
--- a/spirv_parser.cpp
+++ b/spirv_parser.cpp
@@ -20,7 +20,7 @@
using namespace std;
using namespace spv;
-namespace spirv_cross
+namespace SPIRV_CROSS_NAMESPACE
{
Parser::Parser(std::vector<uint32_t> spirv)
{