Make dawn_wire use the webgpu.h header

BUG=dawn:22

Change-Id: I4963aa27322086e74947a1a6265c921e2c7d3d85
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12700
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2019-10-24 22:27:27 +00:00
committed by Commit Bot service account
parent 15e751e418
commit 1fdcb16b69
30 changed files with 179 additions and 180 deletions

View File

@@ -17,7 +17,7 @@
#include <cstdint>
#include "dawn/dawn.h"
#include "dawn/webgpu.h"
#include "dawn_wire/dawn_wire_export.h"
namespace dawn_wire {
@@ -36,13 +36,13 @@ namespace dawn_wire {
};
DAWN_WIRE_EXPORT size_t
SerializedWGPUDevicePropertiesSize(const DawnDeviceProperties* deviceProperties);
SerializedWGPUDevicePropertiesSize(const WGPUDeviceProperties* deviceProperties);
DAWN_WIRE_EXPORT void SerializeWGPUDeviceProperties(
const DawnDeviceProperties* deviceProperties,
const WGPUDeviceProperties* deviceProperties,
char* serializeBuffer);
DAWN_WIRE_EXPORT bool DeserializeWGPUDeviceProperties(DawnDeviceProperties* deviceProperties,
DAWN_WIRE_EXPORT bool DeserializeWGPUDeviceProperties(WGPUDeviceProperties* deviceProperties,
const volatile char* deserializeBuffer);
} // namespace dawn_wire

View File

@@ -29,7 +29,7 @@ namespace dawn_wire {
}
struct ReservedTexture {
DawnTexture texture;
WGPUTexture texture;
uint32_t id;
uint32_t generation;
};
@@ -44,12 +44,12 @@ namespace dawn_wire {
WireClient(const WireClientDescriptor& descriptor);
~WireClient();
DawnDevice GetDevice() const;
WGPUDevice GetDevice() const;
DawnProcTable GetProcs() const;
const volatile char* HandleCommands(const volatile char* commands,
size_t size) override final;
ReservedTexture ReserveTexture(DawnDevice device);
ReservedTexture ReserveTexture(WGPUDevice device);
private:
std::unique_ptr<client::Client> mImpl;
@@ -74,8 +74,8 @@ namespace dawn_wire {
// Imported memory implementation needs to override these to create Read/Write
// handles associated with a particular buffer. The client should receive a file
// descriptor for the buffer out-of-band.
virtual ReadHandle* CreateReadHandle(DawnBuffer, uint64_t offset, size_t size);
virtual WriteHandle* CreateWriteHandle(DawnBuffer, uint64_t offset, size_t size);
virtual ReadHandle* CreateReadHandle(WGPUBuffer, uint64_t offset, size_t size);
virtual WriteHandle* CreateWriteHandle(WGPUBuffer, uint64_t offset, size_t size);
class DAWN_WIRE_EXPORT ReadHandle {
public:

View File

@@ -29,7 +29,7 @@ namespace dawn_wire {
}
struct DAWN_WIRE_EXPORT WireServerDescriptor {
DawnDevice device;
WGPUDevice device;
const DawnProcTable* procs;
CommandSerializer* serializer;
server::MemoryTransferService* memoryTransferService = nullptr;
@@ -43,7 +43,7 @@ namespace dawn_wire {
const volatile char* HandleCommands(const volatile char* commands,
size_t size) override final;
bool InjectTexture(DawnTexture texture, uint32_t id, uint32_t generation);
bool InjectTexture(WGPUTexture texture, uint32_t id, uint32_t generation);
private:
std::unique_ptr<server::Server> mImpl;