mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Resolver: Track storage class usages of structures
This will be used to validate layout rules, as well as preventing illegal types from being used in a uniform / storage buffer. Also: Cleanup logic around VariableDeclStatement This was spread across 3 places, entirely unnecessarily. Bug: tint:643 Change-Id: I9d309c3a5dfb5676984f49ce51763a97bcac93bb Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45125 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
893afdfd2c
commit
a88090b04d
@@ -34,6 +34,12 @@ enum class StorageClass {
|
||||
kFunction
|
||||
};
|
||||
|
||||
/// @returns true if the StorageClass is host-sharable
|
||||
/// @see https://gpuweb.github.io/gpuweb/wgsl.html#host-shareable
|
||||
inline bool IsHostSharable(StorageClass sc) {
|
||||
return sc == ast::StorageClass::kUniform || sc == ast::StorageClass::kStorage;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, StorageClass sc);
|
||||
|
||||
} // namespace ast
|
||||
|
||||
Reference in New Issue
Block a user