mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
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:
committed by
Dawn LUCI CQ
parent
f102e1138b
commit
6133e5cf3d
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user