[spirv-writer] Simplify the texture intrinsic tests

This CL removes the complete coverage of the possible input formats
infavor of simpler testing of a few of the inputs. This should be
sufficient coverage and makes the tests easier to read.

The incorrect OpConstantNull for the samplers and textures has also been
removed.

Change-Id: I9cd7d6299f0454bb8e2019968e0422221e4ec183
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28581
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2020-09-21 15:46:00 +00:00 committed by Commit Bot service account
parent 4dc0d7d311
commit 64f9cdec68
2 changed files with 641 additions and 754 deletions

View File

@ -597,7 +597,7 @@ bool Builder::GenerateGlobalVariable(ast::Variable* var) {
Operand::Int(ConvertStorageClass(sc))}; Operand::Int(ConvertStorageClass(sc))};
if (var->has_constructor()) { if (var->has_constructor()) {
ops.push_back(Operand::Int(init_id)); ops.push_back(Operand::Int(init_id));
} else { } else if (!var->type()->IsTexture() && !var->type()->IsSampler()) {
// If we don't have a constructor and we're an Output or Private variable // If we don't have a constructor and we're an Output or Private variable
// then WGSL requires an initializer. // then WGSL requires an initializer.
if (var->storage_class() == ast::StorageClass::kPrivate || if (var->storage_class() == ast::StorageClass::kPrivate ||

File diff suppressed because it is too large Load Diff