Direct3D: recover better from command list submission failure

If a command list failed to submit, it was remaining the current
command list, which put things in an invalid state. This CL
sets things back to something reasonable.

Bug: skia:12359
Change-Id: Ia64d993925999b69eded790358ee0d922bc45bcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448377
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Jim Van verth 2021-09-13 17:03:17 -04:00 committed by SkCQ
parent 81b7060ef0
commit 646f693982

View File

@ -155,6 +155,7 @@ bool GrD3DGpu::submitDirectCommandList(SyncQueue sync) {
GrD3DDirectCommandList::SubmitResult result = fCurrentDirectCommandList->submit(fQueue.get());
if (result == GrD3DDirectCommandList::SubmitResult::kFailure) {
fCurrentDirectCommandList = fResourceProvider.findOrCreateDirectCommandList();
return false;
} else if (result == GrD3DDirectCommandList::SubmitResult::kNoWork) {
if (sync == SyncQueue::kForce) {