diff --git a/src/dawn_wire/server/Server.h b/src/dawn_wire/server/Server.h index 5f4dbbecbb..ac622ea954 100644 --- a/src/dawn_wire/server/Server.h +++ b/src/dawn_wire/server/Server.h @@ -68,7 +68,8 @@ namespace dawn_wire { namespace server { void* ptr, uint32_t dataLength, MapUserdata* userdata); - void OnFenceCompletedValueUpdated(FenceCompletionUserdata* userdata); + void OnFenceCompletedValueUpdated(DawnFenceCompletionStatus status, + FenceCompletionUserdata* userdata); #include "dawn_wire/server/ServerPrototypes_autogen.inl" diff --git a/src/dawn_wire/server/ServerFence.cpp b/src/dawn_wire/server/ServerFence.cpp index 96a78c6ac5..b52d3bd3bd 100644 --- a/src/dawn_wire/server/ServerFence.cpp +++ b/src/dawn_wire/server/ServerFence.cpp @@ -21,14 +21,17 @@ namespace dawn_wire { namespace server { void Server::ForwardFenceCompletedValue(DawnFenceCompletionStatus status, DawnCallbackUserdata userdata) { auto data = reinterpret_cast(static_cast(userdata)); - if (status == DAWN_FENCE_COMPLETION_STATUS_SUCCESS) { - data->server->OnFenceCompletedValueUpdated(data); - } + data->server->OnFenceCompletedValueUpdated(status, data); } - void Server::OnFenceCompletedValueUpdated(FenceCompletionUserdata* userdata) { + void Server::OnFenceCompletedValueUpdated(DawnFenceCompletionStatus status, + FenceCompletionUserdata* userdata) { std::unique_ptr data(userdata); + if (status != DAWN_FENCE_COMPLETION_STATUS_SUCCESS) { + return; + } + ReturnFenceUpdateCompletedValueCmd cmd; cmd.fence = data->fence; cmd.value = data->value;