type::StorageTexture: Remove set_type()

The subtype of a storage texture is statically determinisic from the ImageFormat, and does not need to be late-set by the TypeDeterminer.

Add StorageTexture::SubtypeFor() helper for returning the subtype for a given ImageFormat, and add the subtype as another immutable constructor parameter.

Bug: tint:390
Change-Id: Ibe732293e3142064b60f4e666a7eb39ae8db50e7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40064
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/src/type_determiner_test.cc b/src/type_determiner_test.cc
index 96def37..4878e01 100644
--- a/src/type_determiner_test.cc
+++ b/src/type_determiner_test.cc
@@ -1323,7 +1323,8 @@
 
   auto* coords_type = get_coords_type(dim, ty.i32());
 
-  type::Type* texture_type = create<type::StorageTexture>(dim, format);
+  auto* subtype = type::StorageTexture::SubtypeFor(format, this);
+  type::Type* texture_type = create<type::StorageTexture>(dim, format, subtype);
 
   ast::ExpressionList call_params;