Skip to content

Commit

Permalink
Add error callback for webgpu device
Browse files Browse the repository at this point in the history
Bug: angleproject:8547
Change-Id: I9946311a1f93cc5f49fb0e17e65c92789bdb3b6a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5443428
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Liza Burakova <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
  • Loading branch information
Liza Burakova authored and Angle LUCI CQ committed Apr 15, 2024
1 parent f4d3041 commit 2218db2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libANGLE/renderer/wgpu/DisplayWgpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ egl::Error DisplayWgpu::createWgpuDevice()

WGPUDeviceDescriptor deviceDesc = {};
mDevice = wgpu::Device::Acquire(preferredAdapter->CreateDevice(&deviceDesc));
mDevice.SetUncapturedErrorCallback(
[](WGPUErrorType type, const char *message, void *userdata) {
ERR() << "Error: " << type << " - message: " << message;
},
nullptr);
return egl::NoError();
}

Expand Down

0 comments on commit 2218db2

Please sign in to comment.