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

View File

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

View File

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

View File

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

View File

@ -28,8 +28,7 @@
#include "src/tint/sem/variable.h" #include "src/tint/sem/variable.h"
#include "tint/tint.h" #include "tint/tint.h"
namespace tint { namespace tint::inspector {
namespace inspector {
namespace { namespace {
// All the tests that descend from InspectorBuilder are expected to define their // 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
} // namespace inspector } // namespace tint::inspector
} // namespace tint

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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