tint: Fix doxygen errors

Change-Id: I19324ccbf989a66c088f8886411f050820b46d5b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86306
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2022-04-11 17:47:10 +00:00 committed by Dawn LUCI CQ
parent be352ea5b9
commit 05caf3a20f
9 changed files with 27 additions and 12 deletions

View File

@ -149,6 +149,7 @@ struct Construct {
const uint32_t scope_end_pos = 0;
};
/// ConstructList is a list of Construct unique pointers.
using ConstructList = std::vector<std::unique_ptr<Construct>>;
/// Converts a construct kind to a string.

View File

@ -175,6 +175,10 @@ struct BlockInfo {
std::vector<uint32_t> phis_needing_state_vars;
};
/// Writes the BlockInfo to the ostream
/// @param o the ostream
/// @param bi the BlockInfo
/// @returns the ostream so calls can be chained
inline std::ostream& operator<<(std::ostream& o, const BlockInfo& bi) {
o << "BlockInfo{"
<< " id: " << bi.id << " pos: " << bi.pos
@ -312,6 +316,10 @@ struct DefInfo {
SkipReason skip = SkipReason::kDontSkip;
};
/// Writes the DefInfo to the ostream
/// @param o the ostream
/// @param di the DefInfo
/// @returns the ostream so calls can be chained
inline std::ostream& operator<<(std::ostream& o, const DefInfo& di) {
o << "DefInfo{"
<< " inst.result_id: " << di.inst.result_id()

View File

@ -58,6 +58,8 @@ namespace tint::reader::spirv {
/// Example: { SpvDecorationBlock }
/// Example: { SpvDecorationArrayStride, 16 }
using Decoration = std::vector<uint32_t>;
/// DecorationList is a list of decorations
using DecorationList = std::vector<Decoration>;
/// An AST expression with its type.

View File

@ -307,7 +307,8 @@ class SpvParserTestBase : public T {
}
};
// Use this form when you don't need to template any further.
/// SpvParserTest the the base class for SPIR-V reader unit tests.
/// Use this form when you don't need to template any further.
using SpvParserTest = SpvParserTestBase<::testing::Test>;
} // namespace tint::reader::spirv

View File

@ -119,55 +119,47 @@ struct StorageTextureHasher {
};
} // namespace
// Equality operators
//! @cond Doxygen_Suppress
static bool operator==(const Pointer& a, const Pointer& b) {
return a.type == b.type && a.storage_class == b.storage_class;
}
static bool operator==(const Reference& a, const Reference& b) {
return a.type == b.type && a.storage_class == b.storage_class;
}
static bool operator==(const Vector& a, const Vector& b) {
return a.type == b.type && a.size == b.size;
}
static bool operator==(const Matrix& a, const Matrix& b) {
return a.type == b.type && a.columns == b.columns && a.rows == b.rows;
}
static bool operator==(const Array& a, const Array& b) {
return a.type == b.type && a.size == b.size && a.stride == b.stride;
}
static bool operator==(const Named& a, const Named& b) {
return a.name == b.name;
}
static bool operator==(const Sampler& a, const Sampler& b) {
return a.kind == b.kind;
}
static bool operator==(const DepthTexture& a, const DepthTexture& b) {
return a.dims == b.dims;
}
static bool operator==(const DepthMultisampledTexture& a,
const DepthMultisampledTexture& b) {
return a.dims == b.dims;
}
static bool operator==(const MultisampledTexture& a,
const MultisampledTexture& b) {
return a.dims == b.dims && a.type == b.type;
}
static bool operator==(const SampledTexture& a, const SampledTexture& b) {
return a.dims == b.dims && a.type == b.type;
}
static bool operator==(const StorageTexture& a, const StorageTexture& b) {
return a.dims == b.dims && a.format == b.format;
}
//! @endcond
const ast::Type* Void::Build(ProgramBuilder& b) const {
return b.ty.void_();

View File

@ -87,6 +87,7 @@ class Type : public Castable<Type> {
#endif // NDEBUG
};
/// TypeList is a list of Types
using TypeList = std::vector<const Type*>;
/// `void` type

View File

@ -124,6 +124,10 @@ class Usage {
bool is_storage_write_ = false;
};
/// Writes the Usage to the ostream
/// @param out the ostream
/// @param u the Usage
/// @returns the ostream so calls can be chained
inline std::ostream& operator<<(std::ostream& out, const Usage& u) {
return u.operator<<(out);
}

View File

@ -68,6 +68,7 @@ struct SanitizedResult {
/// Sanitize a program in preparation for generating HLSL.
/// @program The program to sanitize
/// @param program the input program
/// @param options The HLSL generator options.
/// @returns the sanitized program and any supplementary information
SanitizedResult Sanitize(const Program* program, const Options& options);

View File

@ -105,8 +105,13 @@ class TestHelperBase : public BODY, public ProgramBuilder {
private:
std::unique_ptr<GeneratorImpl> gen_;
};
/// TestHelper the the base class for HLSL writer unit tests.
/// Use this form when you don't need to template any further.
using TestHelper = TestHelperBase<testing::Test>;
/// TestParamHelper the the base class for HLSL unit tests that take a templated
/// parameter.
template <typename T>
using TestParamHelper = TestHelperBase<testing::TestWithParam<T>>;