class CompileOptions
Defined at line 140 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
Contains any options that can have default values for a compilation.
Public Methods
void CompileOptions ()
Defined at line 142 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void ~CompileOptions ()
Defined at line 143 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void CompileOptions (const CompileOptions & other)
Defined at line 144 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void CompileOptions (CompileOptions && other)
Defined at line 147 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void AddMacroDefinition (const char * name, size_t name_length, const char * value, size_t value_length)
Adds a predefined macro to the compilation options. It behaves the same as
shaderc_compile_options_add_macro_definition in shaderc.h.
Defined at line 154 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void AddMacroDefinition (const std::string & name)
Adds a valueless predefined macro to the compilation options.
Defined at line 161 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void AddMacroDefinition (const std::string & name, const std::string & value)
Adds a predefined macro to the compilation options.
Defined at line 166 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetGenerateDebugInfo ()
Sets the compiler mode to generate debug information in the output.
Defined at line 171 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetOptimizationLevel (shaderc_optimization_level level)
Sets the compiler optimization level to the given level. Only the last one
takes effect if multiple calls of this function exist.
Defined at line 177 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetIncluder (std::unique_ptr<IncluderInterface> && includer)
Sets the includer instance for libshaderc to call during compilation, as
described in shaderc_compile_options_set_include_callbacks(). Callbacks
are routed to this includer's methods.
Defined at line 199 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetForcedVersionProfile (int version, shaderc_profile profile)
Forces the GLSL language version and profile to a given pair. The version
number is the same as would appear in the #version annotation in the
source. Version and profile specified here overrides the #version
annotation in the source. Use profile: 'shaderc_profile_none' for GLSL
versions that do not define profiles, e.g. versions below 150.
Defined at line 222 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetSuppressWarnings ()
Sets the compiler mode to suppress warnings. Note this option overrides
warnings-as-errors mode. When both suppress-warnings and warnings-as-errors
modes are turned on, warning messages will be inhibited, and will not be
emitted as error message.
Defined at line 231 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetSourceLanguage (shaderc_source_language lang)
Sets the source language. The default is GLSL.
Defined at line 236 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetTargetEnvironment (shaderc_target_env target, uint32_t version)
Sets the target shader environment, affecting which warnings or errors will
be issued. The version will be for distinguishing between different
versions of the target environment. The version value should be either 0
or a value listed in shaderc_env_version. The 0 value maps to Vulkan 1.0
if |target| is Vulkan, and it maps to OpenGL 4.5 if |target| is OpenGL.
Defined at line 245 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetTargetSpirv (shaderc_spirv_version version)
Sets the target SPIR-V version. The generated module will use this version
of SPIR-V. Each target environment determines what versions of SPIR-V
it can consume. Defaults to the highest version of SPIR-V 1.0 which is
required to be supported by the target environment. E.g. Default to SPIR-V
1.0 for Vulkan 1.0 and SPIR-V 1.3 for Vulkan 1.1.
Defined at line 254 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetWarningsAsErrors ()
Sets the compiler mode to make all warnings into errors. Note the
suppress-warnings mode overrides this option, i.e. if both
warning-as-errors and suppress-warnings modes are set on, warnings will not
be emitted as error message.
Defined at line 262 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetLimit (shaderc_limit limit, int value)
Sets a resource limit.
Defined at line 267 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetAutoBindUniforms (bool auto_bind)
Sets whether the compiler should automatically assign bindings to uniforms
that aren't already explicitly bound in the shader source.
Defined at line 273 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetAutoSampledTextures (bool auto_sampled)
Sets whether the compiler should automatically remove sampler variables
and convert image variables to combined image sampler variables.
Defined at line 279 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetHlslIoMapping (bool hlsl_iomap)
Sets whether the compiler should use HLSL IO mapping rules for bindings.
Defaults to false.
Defined at line 286 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetHlslOffsets (bool hlsl_offsets)
Sets whether the compiler should determine block member offsets using HLSL
packing rules instead of standard GLSL rules. Defaults to false. Only
affects GLSL compilation. HLSL rules are always used when compiling HLSL.
Defined at line 293 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetBindingBase (shaderc_uniform_kind kind, uint32_t base)
Sets the base binding number used for for a uniform resource type when
automatically assigning bindings. For GLSL compilation, sets the lowest
automatically assigned number. For HLSL compilation, the regsiter number
assigned to the resource is added to this specified base.
Defined at line 301 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetBindingBaseForStage (shaderc_shader_kind shader_kind, shaderc_uniform_kind kind, uint32_t base)
Like SetBindingBase, but only takes effect when compiling a given shader
stage. The stage is assumed to be one of vertex, fragment, tessellation
evaluation, tesselation control, geometry, or compute.
Defined at line 308 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetPreserveBindings (bool preserve_bindings)
Sets whether the compiler should preserve all bindings, even when those
bindings are not used.
Defined at line 316 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetAutoMapLocations (bool auto_map)
Sets whether the compiler automatically assigns locations to
uniform variables that don't have explicit locations.
Defined at line 322 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetHlslRegisterSetAndBindingForStage (shaderc_shader_kind shader_kind, const std::string & reg, const std::string & set, const std::string & binding)
Sets a descriptor set and binding for an HLSL register in the given stage.
Copies the parameter strings.
Defined at line 328 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetHlslRegisterSetAndBinding (const std::string & reg, const std::string & set, const std::string & binding)
Sets a descriptor set and binding for an HLSL register in any stage.
Copies the parameter strings.
Defined at line 338 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetHlslFunctionality1 (bool enable)
Sets whether the compiler should enable extension
SPV_GOOGLE_hlsl_functionality1.
Defined at line 347 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetHlsl16BitTypes (bool enable)
Sets whether 16-bit types are supported in HLSL or not.
Defined at line 352 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetVulkanRulesRelaxed (bool enable)
Enables or disables relaxed Vulkan rules.
This allows most OpenGL shaders to compile under Vulkan semantics.
Defined at line 359 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetInvertY (bool enable)
Sets whether the compiler should invert position.Y output in vertex shader.
Defined at line 364 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
void SetNanClamp (bool enable)
Sets whether the compiler should generate code for max and min which,
if given a NaN operand, will return the other operand. Similarly, the
clamp builtin will favour the non-NaN operands, as if clamp were
implemented as a composition of max and min.
Defined at line 372 of file ../../third_party/shaderc/src/libshaderc/include/shaderc/shaderc.hpp
Records
Friends
class Compiler