resolver: Validate pipline stage use for intrinsics

Use the new [[stage()]] decorations in intrinsics.def to validate that intrinsics are only called from the correct pipeline stages.

Fixed: tint:657
Change-Id: I9efda26369c45c6f816bdaa53408d3909db403a1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53084
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton
2021-06-03 16:07:34 +00:00
committed by Tint LUCI CQ
parent 7b366475ed
commit 71786c99b3
21 changed files with 611 additions and 148 deletions

View File

@@ -37,6 +37,10 @@ struct UniqueVector {
}
}
/// @returns true if the vector contains `item`
/// @param item the item
bool contains(const T& item) const { return set.count(item); }
/// @returns the number of items in the vector
size_t size() const { return vector.size(); }
@@ -47,7 +51,7 @@ struct UniqueVector {
ConstIterator end() const { return vector.end(); }
/// @returns a const reference to the internal vector
operator const std::vector<T>&() const { return vector; }
operator const std::vector<T> &() const { return vector; }
private:
std::vector<T> vector;