mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
Widen checks for the creation of the indirect validator
This commit is contained in:
1 parent
e3149bac9e
commit
136edde52a
1 file changed
+6
-3
@@ -433,14 +433,17 @@ impl Device {
|
||||
}
|
||||
.map_err(DeviceError::from_hal)?;
|
||||
|
||||
// Cloned as we need them below anyway.
|
||||
let alignments = adapter.raw.capabilities.alignments.clone();
|
||||
let downlevel = adapter.raw.capabilities.downlevel.clone();
|
||||
let limits = &adapter.raw.capabilities.limits;
|
||||
|
||||
let enable_indirect_validation = instance_flags
|
||||
.contains(wgt::InstanceFlags::VALIDATION_INDIRECT_CALL)
|
||||
&& downlevel
|
||||
.flags
|
||||
.contains(wgt::DownlevelFlags::INDIRECT_EXECUTION);
|
||||
&& downlevel.flags.contains(
|
||||
wgt::DownlevelFlags::INDIRECT_EXECUTION | wgt::DownlevelFlags::COMPUTE_SHADERS,
|
||||
)
|
||||
&& limits.max_storage_buffers_per_shader_stage >= 2;
|
||||
|
||||
let indirect_validation = if enable_indirect_validation {
|
||||
Some(crate::indirect_validation::IndirectValidation::new(
|
||||
|
||||
Reference in new issue
Block a user