mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 03:41:34 +00:00
We were missing an include for uint32_t, and a forward declaration. Change-Id: I4a2eed757364e335e12d14aaeda18fc7aafb2886 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93261 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: James Price <jrprice@google.com>
51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
// Copyright 2021 The Dawn Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#ifndef SRC_DAWN_UTILS_WIREHELPER_H_
|
|
#define SRC_DAWN_UTILS_WIREHELPER_H_
|
|
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <utility>
|
|
|
|
#include "dawn/webgpu_cpp.h"
|
|
|
|
struct DawnProcTable;
|
|
|
|
namespace utils {
|
|
|
|
class WireHelper {
|
|
public:
|
|
virtual ~WireHelper();
|
|
|
|
// Registers the instance on the wire, if present.
|
|
// Returns the wgpu::Instance which is the client instance on the wire, and
|
|
// the backend instance without the wire.
|
|
// The function should not take ownership of |backendInstance|.
|
|
virtual wgpu::Instance RegisterInstance(WGPUInstance backendInstance) = 0;
|
|
|
|
virtual void BeginWireTrace(const char* name) = 0;
|
|
|
|
virtual bool FlushClient() = 0;
|
|
virtual bool FlushServer() = 0;
|
|
};
|
|
|
|
std::unique_ptr<WireHelper> CreateWireHelper(const DawnProcTable& procs,
|
|
bool useWire,
|
|
const char* wireTraceDir = nullptr);
|
|
|
|
} // namespace utils
|
|
|
|
#endif // SRC_DAWN_UTILS_WIREHELPER_H_
|