Condense namespaces in tint/inspector.

This PR condenses the namespaces in the tint/inspector folder.

Change-Id: If784b9b726368c7d1afc16b7482fee70fc42b667
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86035
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2022-04-07 17:59:54 +00:00 committed by Dawn LUCI CQ
parent ebfbaf8f22
commit aba5a212ca
13 changed files with 26 additions and 52 deletions

View File

@ -14,8 +14,7 @@
#include "src/tint/inspector/entry_point.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
StageVariable::StageVariable() = default;
StageVariable::StageVariable(const StageVariable& other)
@ -66,5 +65,4 @@ InterpolationSampling ASTToInspectorInterpolationSampling(
return InterpolationSampling::kUnknown;
}
} // namespace inspector
} // namespace tint
} // namespace tint::inspector

View File

@ -22,8 +22,7 @@
#include "src/tint/ast/interpolate_attribute.h"
#include "src/tint/ast/pipeline_stage.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
/// Base component type of a stage variable.
enum class ComponentType {
@ -181,7 +180,6 @@ struct EntryPoint {
}
};
} // namespace inspector
} // namespace tint
} // namespace tint::inspector
#endif // SRC_TINT_INSPECTOR_ENTRY_POINT_H_

View File

@ -45,8 +45,7 @@
#include "src/tint/utils/math.h"
#include "src/tint/utils/unique_vector.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
namespace {
@ -952,5 +951,4 @@ void Inspector::GetOriginatingResources(
}
}
} // namespace inspector
} // namespace tint
} // namespace tint::inspector

View File

@ -29,8 +29,7 @@
#include "src/tint/sem/sampler_texture_pair.h"
#include "src/tint/utils/unique_vector.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
/// A temporary alias to sem::SamplerTexturePair. [DEPRECATED]
using SamplerTexturePair = sem::SamplerTexturePair;
@ -228,7 +227,6 @@ class Inspector {
F&& cb);
};
} // namespace inspector
} // namespace tint
} // namespace tint::inspector
#endif // SRC_TINT_INSPECTOR_INSPECTOR_H_

View File

@ -28,8 +28,7 @@
#include "src/tint/sem/variable.h"
#include "tint/tint.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
namespace {
// All the tests that descend from InspectorBuilder are expected to define their
@ -3027,5 +3026,4 @@ fn main(@location(0) fragUV: vec2<f32>,
}
} // namespace
} // namespace inspector
} // namespace tint
} // namespace tint::inspector

View File

@ -22,8 +22,7 @@
#include "src/tint/sem/u32_type.h"
#include "src/tint/sem/vector_type.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
ResourceBinding::TextureDimension
TypeTextureDimensionToResourceBindingTextureDimension(
@ -112,5 +111,4 @@ ResourceBinding::TexelFormat TypeTexelFormatToResourceBindingTexelFormat(
return ResourceBinding::TexelFormat::kNone;
}
} // namespace inspector
} // namespace tint
} // namespace tint::inspector

View File

@ -20,8 +20,7 @@
#include "src/tint/ast/storage_texture.h"
#include "src/tint/ast/texture.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
/// Container for information about how a resource is bound
struct ResourceBinding {
@ -123,7 +122,6 @@ ResourceBinding::SampledKind BaseTypeToSampledKind(const sem::Type* base_type);
ResourceBinding::TexelFormat TypeTexelFormatToResourceBindingTexelFormat(
const ast::TexelFormat& image_format);
} // namespace inspector
} // namespace tint
} // namespace tint::inspector
#endif // SRC_TINT_INSPECTOR_RESOURCE_BINDING_H_

View File

@ -14,8 +14,7 @@
#include "src/tint/inspector/scalar.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
Scalar::Scalar() : type_(kNull) {}
@ -71,5 +70,4 @@ float Scalar::AsFloat() const {
return value_.f;
}
} // namespace inspector
} // namespace tint
} // namespace tint::inspector

View File

@ -17,8 +17,7 @@
#include <cstdint>
namespace tint {
namespace inspector {
namespace tint::inspector {
/// Contains a literal scalar value
class Scalar {
@ -74,7 +73,6 @@ class Scalar {
Value value_;
};
} // namespace inspector
} // namespace tint
} // namespace tint::inspector
#endif // SRC_TINT_INSPECTOR_SCALAR_H_

View File

@ -22,8 +22,7 @@
#include "gtest/gtest.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
InspectorBuilder::InspectorBuilder() = default;
InspectorBuilder::~InspectorBuilder() = default;
@ -395,5 +394,4 @@ Inspector& InspectorBuilder::Build() {
return *inspector_;
}
} // namespace inspector
} // namespace tint
} // namespace tint::inspector

View File

@ -33,8 +33,7 @@
#include "src/tint/sem/variable.h"
#include "tint/tint.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
/// Utility class for building programs in inspector tests
class InspectorBuilder : public ProgramBuilder {
@ -380,7 +379,6 @@ class InspectorBuilder : public ProgramBuilder {
std::unique_ptr<Inspector> inspector_;
};
} // namespace inspector
} // namespace tint
} // namespace tint::inspector
#endif // SRC_TINT_INSPECTOR_TEST_INSPECTOR_BUILDER_H_

View File

@ -14,8 +14,7 @@
#include "src/tint/inspector/test_inspector_runner.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
InspectorRunner::InspectorRunner() = default;
InspectorRunner::~InspectorRunner() = default;
@ -35,5 +34,4 @@ Inspector& InspectorRunner::Initialize(std::string shader) {
return *inspector_;
}
} // namespace inspector
} // namespace tint
} // namespace tint::inspector

View File

@ -21,8 +21,7 @@
#include "gtest/gtest.h"
#include "tint/tint.h"
namespace tint {
namespace inspector {
namespace tint::inspector {
/// Utility class for running shaders in inspector tests
class InspectorRunner {
@ -45,7 +44,6 @@ class InspectorRunner {
std::unique_ptr<Inspector> inspector_;
};
} // namespace inspector
} // namespace tint
} // namespace tint::inspector
#endif // SRC_TINT_INSPECTOR_TEST_INSPECTOR_RUNNER_H_