Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit 223e3cb

Browse files
committed
8262313: Override stencilAttachmentPixelFormat to maintain appropriate state
1 parent 07ce809 commit 223e3cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLPipelineStatesStorage.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ - (NSPointerArray * ) getSubStates:(NSString *)vertexShaderId fragmentShader:(NS
196196
}
197197
if (stencilNeeded) {
198198
pipelineDesc.stencilAttachmentPixelFormat = MTLPixelFormatStencil8;
199+
} else {
200+
// We continue to use same encoder when we move from shape clip
201+
// to other opcodes. So we need to maintain apprppriate state
202+
// for stencilAttachmentPixelFormat until we end the encoder
203+
pipelineDesc.stencilAttachmentPixelFormat = MTLPixelFormatInvalid;
199204
}
200205

201206
if (renderOptions->isAA) {

0 commit comments

Comments
 (0)