mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
dawn::wire::client: Make object constructors less barebones.
This uses the variadic template arguments to Client::Make to pass more data to object constructors and move the copying of data from descriptors into the constructors. This required adding a descriptor to the textures created in ReserveTexture. The descriptor should come from the outside to give the correct reflection data to textures (for example textures from GPUCanvasContext). So a descriptor argument is added to ReserveTexture that currently defaults to nullptr, but will be required once current uses are updated. Bug: dawn:1451 Change-Id: I44cbd5718b8d75fdde3ab1321d24f69a8e2486de Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93142 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
a55b29e0bd
commit
04f12142bd
@@ -70,7 +70,10 @@ class DAWN_WIRE_EXPORT WireClient : public CommandHandler {
|
||||
|
||||
const volatile char* HandleCommands(const volatile char* commands, size_t size) override;
|
||||
|
||||
ReservedTexture ReserveTexture(WGPUDevice device);
|
||||
// TODO(dawn:1451): Remove the defaulting of descriptor once the callers are updated to provide
|
||||
// one.
|
||||
ReservedTexture ReserveTexture(WGPUDevice device,
|
||||
const WGPUTextureDescriptor* descriptor = nullptr);
|
||||
ReservedSwapChain ReserveSwapChain(WGPUDevice device);
|
||||
ReservedDevice ReserveDevice();
|
||||
ReservedInstance ReserveInstance();
|
||||
|
||||
Reference in New Issue
Block a user