зеркало из https://github.com/AvaloniaUI/angle.git
WebGL Aquarium doesn't render with ANGLE Metal
Blits should not be using the context's write mask, this leads to missed color information on blits. Bug: chromium:1257769 Change-Id: Iaf4ff00a727b1bec2424b4d3939fddd4c802a8ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212644 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
This commit is contained in:
Родитель
4ca3d7d643
Коммит
fab8834323
|
@ -472,10 +472,9 @@ angle::Result FramebufferMtl::blitWithDraw(const gl::Context *context,
|
|||
colorBlitParams.srcLevel = srcColorRt->getLevelIndex();
|
||||
colorBlitParams.srcLayer = srcColorRt->getLayerIndex();
|
||||
|
||||
colorBlitParams.blitWriteMaskArray = contextMtl->getWriteMaskArray();
|
||||
colorBlitParams.enabledBuffers = getState().getEnabledDrawBuffers();
|
||||
colorBlitParams.filter = filter;
|
||||
colorBlitParams.dstLuminance = srcColorRt->getFormat()->actualAngleFormat().isLUMA();
|
||||
colorBlitParams.enabledBuffers = getState().getEnabledDrawBuffers();
|
||||
colorBlitParams.filter = filter;
|
||||
colorBlitParams.dstLuminance = srcColorRt->getFormat()->actualAngleFormat().isLUMA();
|
||||
|
||||
ANGLE_TRY(contextMtl->getDisplay()->getUtils().blitColorWithDraw(
|
||||
context, renderEncoder, srcColorRt->getFormat()->actualAngleFormat(), colorBlitParams));
|
||||
|
|
|
@ -80,9 +80,8 @@ struct BlitParams
|
|||
|
||||
struct ColorBlitParams : public BlitParams
|
||||
{
|
||||
ColorBlitParams() { blitWriteMaskArray.fill(MTLColorWriteMaskAll); }
|
||||
ColorBlitParams() {}
|
||||
|
||||
WriteMaskArray blitWriteMaskArray;
|
||||
gl::DrawBufferMask enabledBuffers;
|
||||
GLenum filter = GL_NEAREST;
|
||||
bool unpackPremultiplyAlpha = false;
|
||||
|
|
|
@ -1487,8 +1487,7 @@ id<MTLRenderPipelineState> ColorBlitUtils::getColorBlitRenderPipelineState(
|
|||
RenderPipelineDesc pipelineDesc;
|
||||
const RenderPassDesc &renderPassDesc = cmdEncoder->renderPassDesc();
|
||||
|
||||
renderPassDesc.populateRenderPipelineOutputDesc(params.blitWriteMaskArray,
|
||||
&pipelineDesc.outputDescriptor);
|
||||
renderPassDesc.populateRenderPipelineOutputDesc(&pipelineDesc.outputDescriptor);
|
||||
|
||||
// Disable blit for some outputs that are not enabled
|
||||
pipelineDesc.outputDescriptor.updateEnabledDrawBuffers(params.enabledBuffers);
|
||||
|
|
Загрузка…
Ссылка в новой задаче