mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Default initialize all descriptors
Some dawn_unittests crash on some configurations because the uninitialized |label| member crashed string serialization. Default initialize all descriptors to avoid this problem. Bug: none Change-Id: I6ea1851ebb6f54690a28ba396e0beaa85d8670cc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/16260 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@google.com> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
e299afa9ec
commit
3ded65e807
@@ -52,9 +52,7 @@ namespace {
|
||||
WGPUSwapChain ErrorDeviceCreateSwapChain(WGPUDevice device,
|
||||
WGPUSurface surface,
|
||||
const WGPUSwapChainDescriptor*) {
|
||||
WGPUSwapChainDescriptor desc;
|
||||
desc.nextInChain = nullptr;
|
||||
desc.label = nullptr;
|
||||
WGPUSwapChainDescriptor desc = {};
|
||||
// A 0 implementation will trigger a swapchain creation error.
|
||||
desc.implementation = 0;
|
||||
return sOriginalDeviceCreateSwapChain(device, surface, &desc);
|
||||
|
||||
Reference in New Issue
Block a user