mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Rename BoundsCheckPolicy::UndefinedBehavior to Unchecked.
When we are leaning on robust buffer access to do the job for us, there's no undefined behavior going on. So `UndefinedBehavior` suggests people are doing something reckless even if they're not. The policy just says what Naga is doing, and it shouldn't pretend to say what the rest of the system is doing.
This commit is contained in:
committed by
Dzmitry Malyshau
parent
1e9f2b9287
commit
bdf774aa8b
@@ -13,13 +13,13 @@ struct Args {
|
||||
/// what policy to use for index bounds checking for arrays, vectors, and
|
||||
/// matrices.
|
||||
///
|
||||
/// May be `Restrict`, `ReadZeroSkipWrite`, or `UndefinedBehavior`
|
||||
/// May be `Restrict`, `ReadZeroSkipWrite`, or `Unchecked`
|
||||
#[argh(option)]
|
||||
index_bounds_check_policy: Option<BoundsCheckPolicyArg>,
|
||||
|
||||
/// what policy to use for texture bounds checking.
|
||||
///
|
||||
/// May be `Restrict`, `ReadZeroSkipWrite`, or `UndefinedBehavior`
|
||||
/// May be `Restrict`, `ReadZeroSkipWrite`, or `Unchecked`
|
||||
#[argh(option)]
|
||||
image_bounds_check_policy: Option<BoundsCheckPolicyArg>,
|
||||
|
||||
@@ -62,7 +62,7 @@ impl FromStr for BoundsCheckPolicyArg {
|
||||
Ok(Self(match s.to_lowercase().as_str() {
|
||||
"restrict" => BoundsCheckPolicy::Restrict,
|
||||
"readzeroskipwrite" => BoundsCheckPolicy::ReadZeroSkipWrite,
|
||||
"undefinedbehavior" => BoundsCheckPolicy::UndefinedBehavior,
|
||||
"unchecked" => BoundsCheckPolicy::Unchecked,
|
||||
_ => {
|
||||
return Err(format!(
|
||||
"Invalid value for --index-bounds-check-policy: {}",
|
||||
|
||||
Reference in New Issue
Block a user