Cleanup old/deprecated wire and native APIs
Bug: none Change-Id: Idf9a00d8dc675e1fbc83554c487edcb2dda498c8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30001 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
2931c429c9
commit
875091308b
|
@ -152,12 +152,9 @@ wgpu::Device CreateCppDawnDevice() {
|
||||||
clientDesc.serializer = c2sBuf;
|
clientDesc.serializer = c2sBuf;
|
||||||
|
|
||||||
wireClient = new dawn_wire::WireClient(clientDesc);
|
wireClient = new dawn_wire::WireClient(clientDesc);
|
||||||
WGPUDevice clientDevice = wireClient->GetDevice();
|
cDevice = wireClient->GetDevice();
|
||||||
DawnProcTable clientProcs = dawn_wire::WireClient::GetProcs();
|
procs = dawn_wire::client::GetProcs();
|
||||||
s2cBuf->SetHandler(wireClient);
|
s2cBuf->SetHandler(wireClient);
|
||||||
|
|
||||||
procs = clientProcs;
|
|
||||||
cDevice = clientDevice;
|
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,6 @@ namespace dawn_wire {
|
||||||
mImpl.reset();
|
mImpl.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
const DawnProcTable& WireClient::GetProcs() {
|
|
||||||
return client::GetProcs();
|
|
||||||
}
|
|
||||||
|
|
||||||
WGPUDevice WireClient::GetDevice() const {
|
WGPUDevice WireClient::GetDevice() const {
|
||||||
return mImpl->GetDevice();
|
return mImpl->GetDevice();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,10 @@ namespace {
|
||||||
|
|
||||||
class DevNull : public dawn_wire::CommandSerializer {
|
class DevNull : public dawn_wire::CommandSerializer {
|
||||||
public:
|
public:
|
||||||
|
size_t GetMaximumAllocationSize() const override {
|
||||||
|
// Some fuzzer bots have a 2GB allocation limit. Pick a value reasonably below that.
|
||||||
|
return 1024 * 1024 * 1024;
|
||||||
|
}
|
||||||
void* GetCmdSpace(size_t size) override {
|
void* GetCmdSpace(size_t size) override {
|
||||||
if (size > buf.size()) {
|
if (size > buf.size()) {
|
||||||
buf.resize(size);
|
buf.resize(size);
|
||||||
|
|
|
@ -215,10 +215,7 @@ namespace dawn_native {
|
||||||
public:
|
public:
|
||||||
const ExternalImageType type;
|
const ExternalImageType type;
|
||||||
const WGPUTextureDescriptor* cTextureDescriptor; // Must match image creation params
|
const WGPUTextureDescriptor* cTextureDescriptor; // Must match image creation params
|
||||||
union {
|
|
||||||
bool isInitialized; // Whether the texture is initialized on import
|
bool isInitialized; // Whether the texture is initialized on import
|
||||||
bool isCleared; // DEPRECATED: Sets whether the texture will be cleared before use
|
|
||||||
};
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ExternalImageDescriptor(ExternalImageType type);
|
ExternalImageDescriptor(ExternalImageType type);
|
||||||
|
|
|
@ -33,11 +33,7 @@ namespace dawn_wire {
|
||||||
// a fatal error.
|
// a fatal error.
|
||||||
virtual void* GetCmdSpace(size_t size) = 0;
|
virtual void* GetCmdSpace(size_t size) = 0;
|
||||||
virtual bool Flush() = 0;
|
virtual bool Flush() = 0;
|
||||||
|
virtual size_t GetMaximumAllocationSize() const = 0;
|
||||||
// TODO(enga): Make pure virtual after updating Chromium.
|
|
||||||
virtual size_t GetMaximumAllocationSize() const {
|
|
||||||
return std::numeric_limits<size_t>::max();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class DAWN_WIRE_EXPORT CommandHandler {
|
class DAWN_WIRE_EXPORT CommandHandler {
|
||||||
|
|
|
@ -46,9 +46,6 @@ namespace dawn_wire {
|
||||||
WireClient(const WireClientDescriptor& descriptor);
|
WireClient(const WireClientDescriptor& descriptor);
|
||||||
~WireClient() override;
|
~WireClient() override;
|
||||||
|
|
||||||
// TODO(enga): Remove this and use dawn_wire::client::GetProcs() instead
|
|
||||||
static const DawnProcTable& GetProcs();
|
|
||||||
|
|
||||||
WGPUDevice GetDevice() const;
|
WGPUDevice GetDevice() const;
|
||||||
const volatile char* HandleCommands(const volatile char* commands,
|
const volatile char* HandleCommands(const volatile char* commands,
|
||||||
size_t size) override final;
|
size_t size) override final;
|
||||||
|
|
Loading…
Reference in New Issue