Skip to content

Commit 4cda8f7

Browse files
committed
Work-around iOS driver bug: stencil initial value must be explicitly set to zero.
Even though the doc says its default value is already zero, without setting it, stencil operations won't work properly on iOS devices (except emulator).
1 parent 5d4c30d commit 4cda8f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/libANGLE/renderer/metal/mtl_command_buffer.mm

+4
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,10 @@ void PopDebugGroupCmd(id<MTLRenderCommandEncoder> encoder, IntermediateCommandSt
11531153
// Verify that it was created successfully
11541154
ASSERT(get());
11551155

1156+
// Work-around driver bug on iOS devices: stencil must be explicitly set to zero
1157+
// even if the doc says the default value is already zero.
1158+
[metalCmdEncoder setStencilReferenceValue:0];
1159+
11561160
while (mCommands.good())
11571161
{
11581162
auto cmdType = mCommands.fetch<CmdType>();

0 commit comments

Comments
 (0)