diff --git a/src/dawn_native/Queue.cpp b/src/dawn_native/Queue.cpp index 6fc9af92e4..ae070e3192 100644 --- a/src/dawn_native/Queue.cpp +++ b/src/dawn_native/Queue.cpp @@ -51,14 +51,14 @@ namespace dawn_native { DAWN_TRY(GetDevice()->ValidateObject(this)); for (uint32_t i = 0; i < numCommands; ++i) { - DAWN_TRY(GetDevice()->ValidateObject(commands[i])); - // TODO(cwallez@chromium.org): Remove this once CommandBufferBuilder doesn't use the // builder mechanism anymore. if (commands[i] == nullptr) { return DAWN_VALIDATION_ERROR("Command buffers cannot be null"); } + DAWN_TRY(GetDevice()->ValidateObject(commands[i])); + const CommandBufferResourceUsage& usages = commands[i]->GetResourceUsages(); for (const PassResourceUsage& passUsages : usages.perPass) {