[parser] Remove assert about input validity
This assert is only enforcing that the input is valid, not that it is safe. This should be deferred until validation. Bug: dawn:578 Change-Id: I083a62292ff7ca0fc35080d8c66dabf3188c7bca Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34480 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
ed2b97811e
commit
15f80a706c
|
@ -23,19 +23,6 @@
|
||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
namespace type {
|
namespace type {
|
||||||
namespace {
|
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
|
|
||||||
bool IsValidStorageDimension(TextureDimension dim) {
|
|
||||||
return dim == TextureDimension::k1d || dim == TextureDimension::k1dArray ||
|
|
||||||
dim == TextureDimension::k2d || dim == TextureDimension::k2dArray ||
|
|
||||||
dim == TextureDimension::k3d;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // NDEBUG
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
// Note, these names match the names in the WGSL spec. This behaviour is used
|
// Note, these names match the names in the WGSL spec. This behaviour is used
|
||||||
// in the WGSL writer to emit the texture format names.
|
// in the WGSL writer to emit the texture format names.
|
||||||
|
@ -156,9 +143,7 @@ std::ostream& operator<<(std::ostream& out, ImageFormat format) {
|
||||||
StorageTexture::StorageTexture(TextureDimension dim,
|
StorageTexture::StorageTexture(TextureDimension dim,
|
||||||
ast::AccessControl access,
|
ast::AccessControl access,
|
||||||
ImageFormat format)
|
ImageFormat format)
|
||||||
: Base(dim), access_(access), image_format_(format) {
|
: Base(dim), access_(access), image_format_(format) {}
|
||||||
assert(IsValidStorageDimension(dim));
|
|
||||||
}
|
|
||||||
|
|
||||||
void StorageTexture::set_type(Type* const type) {
|
void StorageTexture::set_type(Type* const type) {
|
||||||
type_ = type;
|
type_ = type;
|
||||||
|
|
Loading…
Reference in New Issue