diff options
author | dan sinclair <dj2@everburning.com> | 2019-02-07 15:26:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-07 15:26:45 -0500 |
commit | de7c1aa073f241093e730f6f44e034a73cb58d02 (patch) | |
tree | 3aecd33992cbd793dff8664bc3b783ff4c89e49a /src/shader_compiler.h | |
parent | 43c8b2d2e187c7c81ac47d63314ee019191c5cd6 (diff) | |
download | amber-de7c1aa073f241093e730f6f44e034a73cb58d02.tar.gz |
Allow setting SPIR-V target environment. (#273)
This CL adds an option to the amber sample application to set the SPIR-V
target environment. The environment name matches the names accepted by
the other spirv-tools applications.
The environment is set into the script and used by the shader compiler.
Diffstat (limited to 'src/shader_compiler.h')
-rw-r--r-- | src/shader_compiler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shader_compiler.h b/src/shader_compiler.h index 7c0c265..2636bfc 100644 --- a/src/shader_compiler.h +++ b/src/shader_compiler.h @@ -28,6 +28,7 @@ namespace amber { class ShaderCompiler { public: ShaderCompiler(); + explicit ShaderCompiler(const std::string& env); ~ShaderCompiler(); std::pair<Result, std::vector<uint32_t>> Compile( @@ -37,6 +38,8 @@ class ShaderCompiler { private: Result ParseHex(const std::string& data, std::vector<uint32_t>* result) const; Result CompileGlsl(Shader* shader, std::vector<uint32_t>* result) const; + + std::string spv_env_; }; } // namespace amber |