vec3: add option to force disabling of the vec3 pass (#797)
no-vec3-to-vec4 takes priority over vec3-to-vec4 as it intends to
avoid running into bugs in the vec3 pass implementation.
Ref #795
* throw error if both force and disable vec3 pass option are specified
diff --git a/lib/Compiler.cpp b/lib/Compiler.cpp
index d3be208..d8d4da3 100644
--- a/lib/Compiler.cpp
+++ b/lib/Compiler.cpp
@@ -889,6 +889,13 @@
return -1;
}
+ if (clspv::Option::Vec3ToVec4() ==
+ clspv::Option::Vec3ToVec4SupportClass::vec3ToVec4SupportError) {
+ llvm::errs() << "error: -vec3-to-vec4 and -no-vec3-to-vec4 are exclusive "
+ "so they cannot be used together!\n";
+ return -1;
+ }
+
return 0;
}