Check if fence is nullptr in PostHandleQueueSignal

PostHandleQueueSignal assumed that fence was not null because QueueSignal
generates an error if it is. The errors are not surfaced immediately so
this additional check is needed before doing the post-handler.

Bug: chromium:914808
Change-Id: I2a99f5229712d49d3c9a2d1f3f2dd1009247a24c
Reviewed-on: https://dawn-review.googlesource.com/c/3280
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng 2018-12-14 08:29:38 +00:00 committed by Commit Bot service account
parent fd3717fa7c
commit 08aa58f8d6
2 changed files with 3 additions and 1 deletions

View File

@ -509,6 +509,9 @@ namespace dawn_wire {
{% set custom_post_handler_commands = ["QueueSignal"] %}
bool PostHandleQueueSignal(const QueueSignalCmd& cmd) {
if (cmd.fence == nullptr) {
return false;
}
ObjectId fenceId = mFenceIdTable.Get(cmd.fence);
ASSERT(fenceId != 0);
auto* fence = mKnownFence.Get(fenceId);

View File

@ -18,7 +18,6 @@
#include "dawn_native/Device.h"
#include "dawn_native/ValidationUtils_autogen.h"
#include <cstdio>
#include <utility>
namespace dawn_native {