rb = brw_get_rb_for_slice(brw, mt, 0, 0, false);
_mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
- _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER,
- GL_COLOR_ATTACHMENT0,
- GL_RENDERBUFFER, rb->Name);
+ _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, GL_COLOR_ATTACHMENT0,
+ rb);
_mesa_DrawBuffer(GL_COLOR_ATTACHMENT0);
brw_fast_clear_init(brw);
adjust_tiling(&dims, dst_mt->num_samples);
_mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
- _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_RENDERBUFFER, rb->Name);
+ _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, GL_COLOR_ATTACHMENT0,
+ rb);
_mesa_DrawBuffer(GL_COLOR_ATTACHMENT0);
ctx->DrawBuffer->_Status = GL_FRAMEBUFFER_COMPLETE;
rb = brw_get_rb_for_slice(brw, src, 0, 0, false);
_mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
- _mesa_FramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
- GL_RENDERBUFFER, rb->Name);
+ _mesa_framebuffer_renderbuffer(ctx, ctx->ReadBuffer, GL_STENCIL_ATTACHMENT,
+ rb);
brw_meta_stencil_blit(brw, dst, 0, 0, &dims);
brw_emit_mi_flush(brw);
dst_fbo = fbos[1];
_mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, src_fbo);
- _mesa_FramebufferRenderbuffer(GL_READ_FRAMEBUFFER, attachment,
- GL_RENDERBUFFER, src_rb->Name);
+ _mesa_framebuffer_renderbuffer(ctx, ctx->ReadBuffer, attachment, src_rb);
_mesa_ReadBuffer(drawbuffer);
_mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, dst_fbo);
- _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, attachment,
- GL_RENDERBUFFER, dst_rb->Name);
+ _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, attachment, dst_rb);
_mesa_DrawBuffer(drawbuffer);
_mesa_BlitFramebuffer(0, 0,