Struct spirv_cross2::compile::glsl::CompilerOptions
source · #[non_exhaustive]pub struct CompilerOptions {Show 13 fields
pub common: CommonOptions,
pub version: GlslVersion,
pub vulkan_semantics: bool,
pub seperate_shader_objects: bool,
pub enable_420pack_extension: bool,
pub support_nonzero_base_instance: bool,
pub es_default_float_precision_highp: bool,
pub es_default_int_precision_highp: bool,
pub emit_push_constant_as_uniform_buffer: bool,
pub emit_uniform_buffer_as_plain_uniforms: bool,
pub force_flattened_io_blocks: bool,
pub enable_row_major_load_workaround: bool,
pub ovr_multiview_view_count: u32,
}Expand description
GLSL compiler options.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.common: CommonOptionsCompile options common to GLSL, HLSL, and MSL.
version: GlslVersionThe GLSL version to output. The default is #version 450.
vulkan_semantics: boolIf true, Vulkan GLSL features are used instead of GL-compatible features. Mostly useful for debugging SPIR-V files.
seperate_shader_objects: boolIf true, gl_PerVertex is explicitly redeclared in vertex, geometry and tessellation shaders. The members of gl_PerVertex is determined by which built-ins are declared by the shader. This option is ignored in ES versions, as redeclaration in ES is not required, and it depends on a different extension (EXT_shader_io_blocks) which makes things a bit more fuzzy.
enable_420pack_extension: boolFor older desktop GLSL targets than version 420, the GL_ARB_shading_language_420pack extensions is used to be able to support layout(binding) on UBOs and samplers. If disabled on older targets, binding decorations will be stripped.
The default is true.
support_nonzero_base_instance: boolIf true, the backend will assume that InstanceIndex will need to apply a base instance offset. Set to false if you know you will never use base instance functionality as it might remove some internal uniforms.
es_default_float_precision_highp: boolIf true, sets the default float precision in ES targets to highp, otherwise the default is mediump.
es_default_int_precision_highp: boolIf false, sets the default float precision in ES targets to mediump, otherwise the default is highp.
emit_push_constant_as_uniform_buffer: boolIn non-Vulkan GLSL, emit push constant blocks as UBOs rather than plain uniforms.
emit_uniform_buffer_as_plain_uniforms: boolAlways emit uniform blocks as plain uniforms, regardless of the GLSL version, even when UBOs are supported. Does not apply to shader storage or push constant blocks.
force_flattened_io_blocks: boolIn GLSL, force use of I/O block flattening, similar to what happens on legacy GLSL targets for blocks and structs.
enable_row_major_load_workaround: boolLoading row-major matrices from UBOs on older AMD Windows OpenGL drivers is problematic. To load these types correctly, we must generate a wrapper. them in a dummy function which only purpose is to ensure row_major decoration is actually respected. This workaround may cause significant performance degeneration on some Android devices.
ovr_multiview_view_count: u32If non-zero, controls layout(num_views = N) in; in GL_OVR_multiview2.