mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 03:11:29 +00:00
Enable empty_if_body lint.
This CL updates the one instance of an empty if body in Dawn to remove the if. This allows enabling the empty_if_body lint check. Change-Id: I5c05db828e8033b4f3155a34c3a6723bfd3181d6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86082 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
c9fcc45843
commit
566d7f25b8
@ -10,4 +10,3 @@ filter=-readability/namespace
|
|||||||
filter=-runtime/explicit
|
filter=-runtime/explicit
|
||||||
filter=-runtime/indentation_namespace
|
filter=-runtime/indentation_namespace
|
||||||
filter=-runtime/int
|
filter=-runtime/int
|
||||||
filter=-whitespace/empty_if_body
|
|
||||||
|
@ -131,31 +131,30 @@ namespace dawn::native {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RenderPassEncoder::APIEnd() {
|
void RenderPassEncoder::APIEnd() {
|
||||||
if (mEncodingContext->TryEncode(
|
mEncodingContext->TryEncode(
|
||||||
this,
|
this,
|
||||||
[&](CommandAllocator* allocator) -> MaybeError {
|
[&](CommandAllocator* allocator) -> MaybeError {
|
||||||
if (IsValidationEnabled()) {
|
if (IsValidationEnabled()) {
|
||||||
DAWN_TRY(ValidateProgrammableEncoderEnd());
|
DAWN_TRY(ValidateProgrammableEncoderEnd());
|
||||||
|
|
||||||
DAWN_INVALID_IF(
|
DAWN_INVALID_IF(
|
||||||
mOcclusionQueryActive,
|
mOcclusionQueryActive,
|
||||||
"Render pass %s ended with incomplete occlusion query index %u of %s.",
|
"Render pass %s ended with incomplete occlusion query index %u of %s.",
|
||||||
this, mCurrentOcclusionQueryIndex, mOcclusionQuerySet.Get());
|
this, mCurrentOcclusionQueryIndex, mOcclusionQuerySet.Get());
|
||||||
}
|
}
|
||||||
|
|
||||||
EndRenderPassCmd* cmd =
|
EndRenderPassCmd* cmd =
|
||||||
allocator->Allocate<EndRenderPassCmd>(Command::EndRenderPass);
|
allocator->Allocate<EndRenderPassCmd>(Command::EndRenderPass);
|
||||||
// The query availability has already been updated at the beginning of render
|
// The query availability has already been updated at the beginning of render
|
||||||
// pass, and no need to do update here.
|
// pass, and no need to do update here.
|
||||||
cmd->timestampWrites = std::move(mTimestampWritesAtEnd);
|
cmd->timestampWrites = std::move(mTimestampWritesAtEnd);
|
||||||
|
|
||||||
DAWN_TRY(mEncodingContext->ExitRenderPass(this, std::move(mUsageTracker),
|
DAWN_TRY(mEncodingContext->ExitRenderPass(this, std::move(mUsageTracker),
|
||||||
mCommandEncoder.Get(),
|
mCommandEncoder.Get(),
|
||||||
std::move(mIndirectDrawMetadata)));
|
std::move(mIndirectDrawMetadata)));
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
"encoding %s.End().", this)) {
|
"encoding %s.End().", this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderPassEncoder::APIEndPass() {
|
void RenderPassEncoder::APIEndPass() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user