mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Separate device lost from internal errors.
The effect to the user is the same, the Dawn device gets lost. However we need to make the difference internally because when the backend device is lost we can clean up immediately. On the contrary on internal errors, the backend device is still alive and processing commands so we need to gracefully shut it down. Bug: dawn:269 Change-Id: Ie13b33a4f9ac2e1f5f98b3723d83cf1c6205c988 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17965 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
3da19b843f
commit
a0afd31585
@@ -22,7 +22,7 @@ namespace dawn_native { namespace opengl {
|
||||
MaybeError OpenGLFunctions::Initialize(GetProcAddress getProc) {
|
||||
PFNGLGETSTRINGPROC getString = reinterpret_cast<PFNGLGETSTRINGPROC>(getProc("glGetString"));
|
||||
if (getString == nullptr) {
|
||||
return DAWN_DEVICE_LOST_ERROR("Couldn't load glGetString");
|
||||
return DAWN_INTERNAL_ERROR("Couldn't load glGetString");
|
||||
}
|
||||
|
||||
std::string version = reinterpret_cast<const char*>(getString(GL_VERSION));
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace dawn_native { namespace opengl {
|
||||
DawnSwapChainNextTexture next = {};
|
||||
DawnSwapChainError error = im.GetNextTexture(im.userData, &next);
|
||||
if (error) {
|
||||
GetDevice()->HandleError(wgpu::ErrorType::Unknown, error);
|
||||
GetDevice()->HandleError(InternalErrorType::Internal, error);
|
||||
return nullptr;
|
||||
}
|
||||
GLuint nativeTexture = next.texture.u32;
|
||||
|
||||
Reference in New Issue
Block a user