Fix the webGL and SDL2 renderer's stencil and depth buffers