Struct spirv_tools::val::ValidatorOptions
source · pub struct ValidatorOptions {
pub relax_struct_store: bool,
pub relax_logical_pointer: bool,
pub before_legalization: bool,
pub relax_block_layout: Option<bool>,
pub uniform_buffer_standard_layout: bool,
pub scalar_block_layout: bool,
pub skip_block_layout: bool,
pub max_limits: Vec<(ValidatorLimits, u32)>,
}
Fields§
§relax_struct_store: bool
Record whether or not the validator should relax the rules on types for stores to structs. When relaxed, it will allow a type mismatch as long as the types are structs with the same layout. Two structs have the same layout if
-
the members of the structs are either the same type or are structs with same layout, and
-
the decorations that affect the memory layout are identical for both types. Other decorations are not relevant.
relax_logical_pointer: bool
Records whether or not the validator should relax the rules on pointer usage in logical addressing mode.
When relaxed, it will allow the following usage cases of pointers:
- OpVariable allocating an object whose type is a pointer type
- OpReturnValue returning a pointer value
before_legalization: bool
Records whether or not the validator should relax the rules because it is expected that the optimizations will make the code legal.
When relaxed, it will allow the following:
- It will allow relaxed logical pointers. Setting this option will also set that option.
- Pointers that are pass as parameters to function calls do not have to match the storage class of the formal parameter.
- Pointers that are actaul parameters on function calls do not have to point to the same type pointed as the formal parameter. The types just need to logically match.
relax_block_layout: Option<bool>
Records whether the validator should use “relaxed” block layout rules. Relaxed layout rules are described by Vulkan extension VK_KHR_relaxed_block_layout, and they affect uniform blocks, storage blocks, and push constants.
This is enabled by default when targeting Vulkan 1.1 or later. Relaxed layout is more permissive than the default rules in Vulkan 1.0.
uniform_buffer_standard_layout: bool
Records whether the validator should use standard block layout rules for uniform blocks.
scalar_block_layout: bool
Records whether the validator should use “scalar” block layout rules. Scalar layout rules are more permissive than relaxed block layout.
See Vulkan extnesion VK_EXT_scalar_block_layout. The scalar alignment is defined as follows:
- scalar alignment of a scalar is the scalar size
- scalar alignment of a vector is the scalar alignment of its component
- scalar alignment of a matrix is the scalar alignment of its component
- scalar alignment of an array is the scalar alignment of its element
- scalar alignment of a struct is the max scalar alignment among its members
For a struct in Uniform, StorageClass, or PushConstant:
- a member Offset must be a multiple of the member’s scalar alignment
- ArrayStride or MatrixStride must be a multiple of the array or matrix scalar alignment
skip_block_layout: bool
Records whether or not the validator should skip validating standard uniform/storage block layout.
max_limits: Vec<(ValidatorLimits, u32)>
Applies a maximum to one or more Universal limits
Trait Implementations§
source§impl Clone for ValidatorOptions
impl Clone for ValidatorOptions
source§fn clone(&self) -> ValidatorOptions
fn clone(&self) -> ValidatorOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more