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:
Jim Blandy authored and Dzmitry Malyshau committed 2021-08-26 19:08:06 -04:00
1 parent 1e9f2b9287
commit bdf774aa8b
5 files changed
+27 -15

No files matched your search

+3 -3
View File
@@ -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: {}",