dawn::wire::client: ReserveTexture: remove defaulting of descriptor
The usages in Chromium have been updated to pass a descriptor. Bug: dawn:1451 Change-Id: I1f08141759dc7b8e0e805aa8efc9a8db51162876 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94941 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
d23f296a9a
commit
3fa3e5667b
|
@ -70,10 +70,8 @@ class DAWN_WIRE_EXPORT WireClient : public CommandHandler {
|
|||
|
||||
const volatile char* HandleCommands(const volatile char* commands, size_t size) override;
|
||||
|
||||
// TODO(dawn:1451): Remove the defaulting of descriptor once the callers are updated to provide
|
||||
// one.
|
||||
ReservedTexture ReserveTexture(WGPUDevice device,
|
||||
const WGPUTextureDescriptor* descriptor = nullptr);
|
||||
const WGPUTextureDescriptor* descriptor);
|
||||
ReservedSwapChain ReserveSwapChain(WGPUDevice device);
|
||||
ReservedDevice ReserveDevice();
|
||||
ReservedInstance ReserveInstance();
|
||||
|
|
|
@ -82,20 +82,6 @@ void Client::DestroyAllObjects() {
|
|||
}
|
||||
|
||||
ReservedTexture Client::ReserveTexture(WGPUDevice device, const WGPUTextureDescriptor* descriptor) {
|
||||
// Make a fake descriptor so that data returned by wgpu::Texture getters isn't garbage.
|
||||
// TODO(dawn:1451): Remove this defaulting once the descriptor is required for ReserveTexture.
|
||||
WGPUTextureDescriptor defaultDescriptor = {};
|
||||
if (descriptor == nullptr) {
|
||||
defaultDescriptor.size = {1, 1, 1};
|
||||
defaultDescriptor.mipLevelCount = 1;
|
||||
defaultDescriptor.sampleCount = 1;
|
||||
defaultDescriptor.dimension = WGPUTextureDimension_1D;
|
||||
defaultDescriptor.format = WGPUTextureFormat_RGBA8Unorm;
|
||||
defaultDescriptor.usage = 0;
|
||||
|
||||
descriptor = &defaultDescriptor;
|
||||
}
|
||||
|
||||
Texture* texture = Make<Texture>(descriptor);
|
||||
|
||||
ReservedTexture result;
|
||||
|
|
Loading…
Reference in New Issue