tint: Rename kInvalid to kUndefined for enums

This is a more neutral term for an unassigned enum value.

Change-Id: Ic69d912472f26fd8a2c8348281b27edfcc145eab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105480
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-10-12 18:49:15 +00:00
committed by Dawn LUCI CQ
parent 78c839be97
commit d2e0db3af2
53 changed files with 338 additions and 329 deletions

View File

@@ -120,7 +120,7 @@ std::tuple<InterpolationType, InterpolationSampling> CalculateInterpolationData(
auto ast_interpolation_type = interpolation_attribute->type;
auto ast_sampling_type = interpolation_attribute->sampling;
if (ast_interpolation_type != ast::InterpolationType::kFlat &&
ast_sampling_type == ast::InterpolationSampling::kInvalid) {
ast_sampling_type == ast::InterpolationSampling::kUndefined) {
ast_sampling_type = ast::InterpolationSampling::kCenter;
}
@@ -135,13 +135,13 @@ std::tuple<InterpolationType, InterpolationSampling> CalculateInterpolationData(
case ast::InterpolationType::kFlat:
interpolation_type = InterpolationType::kFlat;
break;
case ast::InterpolationType::kInvalid:
case ast::InterpolationType::kUndefined:
break;
}
auto sampling_type = InterpolationSampling::kUnknown;
switch (ast_sampling_type) {
case ast::InterpolationSampling::kInvalid:
case ast::InterpolationSampling::kUndefined:
sampling_type = InterpolationSampling::kNone;
break;
case ast::InterpolationSampling::kCenter:

View File

@@ -1250,7 +1250,7 @@ INSTANTIATE_TEST_SUITE_P(
ast::InterpolationType::kPerspective, ast::InterpolationSampling::kSample,
InterpolationType::kPerspective, InterpolationSampling::kSample},
InspectorGetEntryPointInterpolateTestParams{
ast::InterpolationType::kPerspective, ast::InterpolationSampling::kInvalid,
ast::InterpolationType::kPerspective, ast::InterpolationSampling::kUndefined,
InterpolationType::kPerspective, InterpolationSampling::kCenter},
InspectorGetEntryPointInterpolateTestParams{
ast::InterpolationType::kLinear, ast::InterpolationSampling::kCenter,
@@ -1262,10 +1262,10 @@ INSTANTIATE_TEST_SUITE_P(
ast::InterpolationType::kLinear, ast::InterpolationSampling::kSample,
InterpolationType::kLinear, InterpolationSampling::kSample},
InspectorGetEntryPointInterpolateTestParams{
ast::InterpolationType::kLinear, ast::InterpolationSampling::kInvalid,
ast::InterpolationType::kLinear, ast::InterpolationSampling::kUndefined,
InterpolationType::kLinear, InterpolationSampling::kCenter},
InspectorGetEntryPointInterpolateTestParams{
ast::InterpolationType::kFlat, ast::InterpolationSampling::kInvalid,
ast::InterpolationType::kFlat, ast::InterpolationSampling::kUndefined,
InterpolationType::kFlat, InterpolationSampling::kNone}));
TEST_F(InspectorGetOverrideDefaultValuesTest, Bool) {

View File

@@ -104,7 +104,7 @@ ResourceBinding::TexelFormat TypeTexelFormatToResourceBindingTexelFormat(
return ResourceBinding::TexelFormat::kRgba32Sint;
case ast::TexelFormat::kRgba32Float:
return ResourceBinding::TexelFormat::kRgba32Float;
case ast::TexelFormat::kInvalid:
case ast::TexelFormat::kUndefined:
return ResourceBinding::TexelFormat::kNone;
}
return ResourceBinding::TexelFormat::kNone;