aboutsummaryrefslogtreecommitdiff
path: root/src/shader_compiler.h
diff options
context:
space:
mode:
authorPaul Thomson <paulthomson@users.noreply.github.com>2019-08-03 16:12:59 +0100
committerdan sinclair <dsinclair@chromium.org>2019-08-03 11:12:59 -0400
commit5bb9c644ec17a298d901152e9a8e10f8d08c2ee3 (patch)
tree0b0945abe3a145c6c0bb0768af47e9b634c695f7 /src/shader_compiler.h
parent50d59468756253e3be11b96e6d780cc8e71f0e50 (diff)
downloadamber-5bb9c644ec17a298d901152e9a8e10f8d08c2ee3.tar.gz
Add option to disable SPIR-V validation (#615)
This CL adds a command inline flag --disable-spirv-val which will skip the validation of the generated SPIR-V binary.
Diffstat (limited to 'src/shader_compiler.h')
-rw-r--r--src/shader_compiler.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shader_compiler.h b/src/shader_compiler.h
index f9566e5..bf5fc49 100644
--- a/src/shader_compiler.h
+++ b/src/shader_compiler.h
@@ -30,7 +30,7 @@ namespace amber {
class ShaderCompiler {
public:
ShaderCompiler();
- explicit ShaderCompiler(const std::string& env);
+ ShaderCompiler(const std::string& env, bool disable_spirv_validation);
~ShaderCompiler();
/// Returns a result code and a compilation of the given shader.
@@ -53,6 +53,7 @@ class ShaderCompiler {
std::vector<uint32_t>* result) const;
std::string spv_env_;
+ bool disable_spirv_validation_ = false;
};
// Parses the SPIR-V environment string, and returns the corresponding