Wrap call stmts with non-void rets, with ignore()

We have a new validation rule that states that all calls to functions that return a value must use that value. ignore() is the escape hatch.

Bug: tint:886
Change-Id: I9ab8d288b3c54ad4b7e46feda129c36c9136c20b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54200
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2021-06-11 14:01:29 +00:00
committed by Dawn LUCI CQ
parent f102e1138b
commit 6133e5cf3d
4 changed files with 28 additions and 28 deletions

View File

@@ -387,7 +387,7 @@ TEST_F(RenderPipelineValidationTest, TextureComponentTypeCompatibility) {
<< kScalarTypes[i] << R"(>;
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
ignore(textureDimensions(myTexture));
})";
descriptor.cFragment.module = utils::CreateShaderModule(device, stream.str().c_str());
@@ -435,7 +435,7 @@ TEST_F(RenderPipelineValidationTest, TextureViewDimensionCompatibility) {
[[group(0), binding(0)]] var myTexture : )"
<< kTextureKeywords[i] << R"(<f32>;
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
ignore(textureDimensions(myTexture));
})";
descriptor.cFragment.module = utils::CreateShaderModule(device, stream.str().c_str());