     gl.bindFramebuffer(gl.FRAMEBUFFER, this.multisampleFramebuffer);

          // Check to see if we need to resize the renderbuffer
          if (layer.framebufferWidth != this.renderbufferWidth ||
              layer.framebufferHeight != this.renderbufferHeight ||
              ((this.target !== this.getXRTarget()) && session.isImmersive)) {
            this.renderbufferWidth = layer.framebufferWidth;
            this.renderbufferHeight = layer.framebufferHeight;

            this.target = this.getXRTar