[graphite] Clear depth/stencil attachments to 0
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite Bug: skia:12700, skia:12703 Change-Id: I0d32b2542bf779c2e2229ad3f56eca2129ff3b8c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483521 Auto-Submit: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
3ad6e531c3
commit
fdae1b765f
@ -131,8 +131,11 @@ sk_sp<Task> DrawContext::snapRenderPassTask(Recorder* recorder,
|
||||
caps->getDefaultDepthStencilTextureInfo(drawPass->depthStencilFlags(),
|
||||
1 /*sampleCount*/, // TODO: MSAA
|
||||
Protected::kNo);
|
||||
// TODO: handle clears
|
||||
desc.fDepthStencilAttachment.fLoadOp = LoadOp::kDiscard;
|
||||
// Always clear the depth and stencil to 0 at the start of a DrawPass, but discard at the
|
||||
// end since their contents do not affect the next frame.
|
||||
desc.fDepthStencilAttachment.fLoadOp = LoadOp::kClear;
|
||||
desc.fClearDepth = 0.f;
|
||||
desc.fClearStencil = 0;
|
||||
desc.fDepthStencilAttachment.fStoreOp = StoreOp::kDiscard;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user