Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bb1da00b9ba878d228a5e9834a0767dbca2fee43
https://github.com/WebKit/WebKit/commit/bb1da00b9ba878d228a5e9834a0767dbca2fee43
Author: Kyle Piddington <[email protected]>
Date: 2022-10-26 (Wed, 26 Oct 2022)
Changed paths:
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.h
Log Message:
-----------
[ANGLE] Render pipeline descriptor missing casses GPU-Process crash
https://bugs.webkit.org/show_bug.cgi?id=246777
rdar://97847673
Reviewed by Dean Jackson.
Following on from https://bugs.webkit.org/show_bug.cgi?id=240896, we are
still experiencing some cases where the Metal backend does not
correctly configure the render pipeline state. In rarer cases, we end up in
a state where the render encoder is valid, but the pipeline state is not set.
Attempt to correct this error with three additional checks
1) When setting up a program, if the render encoder in question does not
have a render pipeline state set, attempt to set it, even if the render pass
descriptor has not changes.
2) When validating if an encoder is valid, also check if it has a valid
render pipeline state during setupDraw. After setupDrawImpl, it should either
be invalid (Due to a flush and invalidate all) or not have a render pipeline
state (Due to a misconfiguration on the program, or within the state bits.)
If we end up in the case of 2, attempt to set up the program one more time.
(Usually due to a flush and invalidate all). If we've failed to create a render
encoder again, attempt to recover the graphics context by dropping flushing the
command buffer, invalidating the entire GL state, and dropping the draw call.
This may lead to a rendering error, but will not cause a browser crash.
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm:
(rx::ContextMtl::setupDraw):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.mm:
(rx::ProgramMtl::setupDraw):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.h:
Canonical link: https://commits.webkit.org/256013@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes